# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=182

[Latest](https://discourse.processing.org/latest.md) · [Categories](https://discourse.processing.org/categories.md) · [Tags](https://discourse.processing.org/tags.md)

**Page:** 183

---

## [Close JPopupMenu on Keystroke](https://discourse.processing.org/t/close-jpopupmenu-on-keystroke/23961)

<div class="topic-metadata">

**Author:** [@Okaghana](https://discourse.processing.org/u/Okaghana)\
**Replies:** 1\
**Last updated:** [September 20, 2020, 4:30pm UTC](https://discourse.processing.org/t/close-jpopupmenu-on-keystroke/23961 "2020-09-20T16:30:08Z")

</div>

Hey Guys. Im creating tool to autocomplete Text for the Processing IDE. The following class Is the popup-menu that pops up to present the different fill-in possibilities: class Entry extends JPopupMenu implements KeyLis…

---

## [How to Can I turn a flat drawing into 3D?](https://discourse.processing.org/t/how-to-can-i-turn-a-flat-drawing-into-3d/23930)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 6\
**Last updated:** [September 20, 2020, 8:37am UTC](https://discourse.processing.org/t/how-to-can-i-turn-a-flat-drawing-into-3d/23930 "2020-09-20T08:37:10Z")

</div>

Can I turn a flat drawing into 3D? I want to change it like a slanted picture like a 3D feel. Is there any way?

---

## [Minim library: trying to make beautiful representations of chords but getting glitchy output](https://discourse.processing.org/t/minim-library-trying-to-make-beautiful-representations-of-chords-but-getting-glitchy-output/23921)

<div class="topic-metadata">

**Author:** [@gamgades](https://discourse.processing.org/u/gamgades)\
**Replies:** 2\
**Last updated:** [September 20, 2020, 5:32am UTC](https://discourse.processing.org/t/minim-library-trying-to-make-beautiful-representations-of-chords-but-getting-glitchy-output/23921 "2020-09-20T05:32:05Z")

</div>

Hey everybody, hope you’re all doing swell. I’m working on using the minim library’s oscillator generators to create static shapes with sounds by manipulating the note intervals. However, I’m running into a bit of an is…

---

## [Loading large amount of image files](https://discourse.processing.org/t/loading-large-amount-of-image-files/23971)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 1\
**Last updated:** [September 20, 2020, 5:16am UTC](https://discourse.processing.org/t/loading-large-amount-of-image-files/23971 "2020-09-20T05:16:49Z")

</div>

I have made an image viewer unfortunately it isn’t really efficient. I can only load a maximum of around 60 medium resolution images, anything high rez or in larger volumes and the program suffers from memory errors. My…

---

## [How to initialize CLASS by it's own function?](https://discourse.processing.org/t/how-to-initialize-class-by-its-own-function/23946)

<div class="topic-metadata">

**Author:** [@IpNeNaEcRe](https://discourse.processing.org/u/IpNeNaEcRe)\
**Replies:** 2\
**Last updated:** [September 19, 2020, 9:34pm UTC](https://discourse.processing.org/t/how-to-initialize-class-by-its-own-function/23946 "2020-09-19T21:34:30Z")

</div>

I can assign a new value to the variables. But I can’t use constructor to initialize the variables in the object function. int nums = 20; Drop\[\] drops = new Drop\[nums\]; void setup() { size(800, 800); smooth(); …

---

## [Int array and Int dict](https://discourse.processing.org/t/int-array-and-int-dict/23879)

<div class="topic-metadata">

**Author:** [@rattus](https://discourse.processing.org/u/rattus)\
**Replies:** 6\
**Last updated:** [September 19, 2020, 7:53pm UTC](https://discourse.processing.org/t/int-array-and-int-dict/23879 "2020-09-19T19:53:54Z")

</div>

hi, i am foreign with java, and processing but i know just enough to “get around” now, i have a lattice/2d array, and I would like to assign a dictionary to each one ex: int myArray = new int\[2\]\[2\]; for (int x = 0;…

---

## [Rect Overlap error](https://discourse.processing.org/t/rect-overlap-error/23871)

<div class="topic-metadata">

**Author:** [@tribblesontoast](https://discourse.processing.org/u/tribblesontoast)\
**Replies:** 5\
**Last updated:** [September 19, 2020, 5:38pm UTC](https://discourse.processing.org/t/rect-overlap-error/23871 "2020-09-19T17:38:08Z")

</div>

Hi, I’m building a program to add rectangles in random locations that don’t overlap. My issue is that for some reason I can’t see, the checking of the rectangles is happening incorrectly and then adding them with overl…

---

## [Kinect with Windows 10 or any alternative?](https://discourse.processing.org/t/kinect-with-windows-10-or-any-alternative/23963)

<div class="topic-metadata">

**Author:** [@730](https://discourse.processing.org/u/730)\
**Replies:** 0\
**Last updated:** [September 19, 2020, 3:20pm UTC](https://discourse.processing.org/t/kinect-with-windows-10-or-any-alternative/23963 "2020-09-19T15:20:44Z")

</div>

Hi everyone, I’m about to start teaching Processing at an art academy and I would like to propose the students some interactive works with Kinect. It’s been some years I don’t use this device and as I should buy one to…

---

## [Will the monetization of Java kill processing?](https://discourse.processing.org/t/will-the-monetization-of-java-kill-processing/23952)

<div class="topic-metadata">

**Author:** [@Leon](https://discourse.processing.org/u/Leon)\
**Replies:** 4\
**Last updated:** [September 19, 2020, 2:05pm UTC](https://discourse.processing.org/t/will-the-monetization-of-java-kill-processing/23952 "2020-09-19T14:05:59Z")

</div>

Isn’t Java supposed to be code once run everywhere? So how are we supposed to do that if we have to pay for the JRE that packages a JVM? Will this stop processing? I wonder if I am ever able to contribute to new librari…

---

## [Fractal zoom animation](https://discourse.processing.org/t/fractal-zoom-animation/23727)

<div class="topic-metadata">

**Author:** [@noel](https://discourse.processing.org/u/noel)\
**Replies:** 15\
**Last updated:** [September 17, 2020, 5:43pm UTC](https://discourse.processing.org/t/fractal-zoom-animation/23727 "2020-09-17T17:43:13Z")

</div>

Hi. I would like to code an animated fractal as shown as in this animation. My first thought was to just zoom in at every frame, but the result of this code was of course not the same, because you have to split the fra…

---

## [Not able to install processing](https://discourse.processing.org/t/not-able-to-install-processing/23957)

<div class="topic-metadata">

**Author:** [@Yuvaan](https://discourse.processing.org/u/Yuvaan)\
**Replies:** 3\
**Last updated:** [September 19, 2020, 1:21pm UTC](https://discourse.processing.org/t/not-able-to-install-processing/23957 "2020-09-19T13:21:00Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I am not being able to install processing on my windows 64 bit machine

---

## [Processing 4 Alpha 2 Release](https://discourse.processing.org/t/processing-4-alpha-2-release/23958)

<div class="topic-metadata">

**Author:** [@glv](https://discourse.processing.org/u/glv)\
**Replies:** 0\
**Last updated:** [September 19, 2020, 12:27pm UTC](https://discourse.processing.org/t/processing-4-alpha-2-release/23958 "2020-09-19T12:27:23Z")

</div>

Hello, Processing 4 Alpha 2 Release is available now… Announced on Twitter: Available here: This is an alpha release: Stable releases here: :)

---

## [Can I do boolean operation for PShape in processing?](https://discourse.processing.org/t/can-i-do-boolean-operation-for-pshape-in-processing/23955)

<div class="topic-metadata">

**Author:** [@Timi](https://discourse.processing.org/u/Timi)\
**Replies:** 1\
**Last updated:** [September 19, 2020, 12:22pm UTC](https://discourse.processing.org/t/can-i-do-boolean-operation-for-pshape-in-processing/23955 "2020-09-19T12:22:47Z")

</div>

Such as subtract, divide, union… The following effect is what I want, but this library is for javascript:

---

## [How to draw a "three-quarter circle"?](https://discourse.processing.org/t/how-to-draw-a-three-quarter-circle/23448)

<div class="topic-metadata">

**Author:** [@Schred](https://discourse.processing.org/u/Schred)\
**Replies:** 8\
**Last updated:** [September 19, 2020, 8:21am UTC](https://discourse.processing.org/t/how-to-draw-a-three-quarter-circle/23448 "2020-09-19T08:21:21Z")

</div>

I am trying to draw the following in a Processing sketch: The lines are no problem, but I am searching for a way to implement the curves by also just using vertexes. Ideally, I would just have to tell the code the pos…

---

## [How can I create a SVG shape from a svg code?](https://discourse.processing.org/t/how-can-i-create-a-svg-shape-from-a-svg-code/23948)

<div class="topic-metadata">

**Author:** [@Timi](https://discourse.processing.org/u/Timi)\
**Replies:** 1\
**Last updated:** [September 19, 2020, 7:14am UTC](https://discourse.processing.org/t/how-can-i-create-a-svg-shape-from-a-svg-code/23948 "2020-09-19T07:14:06Z")

</div>

Hi everyone, I have a svg code: path class=“st0” d=“M39.28,4.19c0,0-40,19-36,61s26,72,55,82S39.28,4.19,39.28,4.19z”/\> I want to use this code to generate svg shapes, is there any function or library can I use? Current…

---

## [Null pointer error in thread](https://discourse.processing.org/t/null-pointer-error-in-thread/21499)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 49\
**Last updated:** [September 19, 2020, 2:53am UTC](https://discourse.processing.org/t/null-pointer-error-in-thread/21499 "2020-09-19T02:53:57Z")

</div>

I’m trying to implement threading, however anything that is called on the canvas results in a nullpointer error. String \[\] messages = {"Test string for secondary thread", "Here's another message.",…

---

## [On/off with keypressed and released](https://discourse.processing.org/t/on-off-with-keypressed-and-released/17211)

<div class="topic-metadata">

**Author:** [@floflopm](https://discourse.processing.org/u/floflopm)\
**Replies:** 2\
**Last updated:** [September 18, 2020, 9:49pm UTC](https://discourse.processing.org/t/on-off-with-keypressed-and-released/17211 "2020-09-18T21:49:02Z")

</div>

Hi, the following bit of my script I would like to activate only when a key is pressed and hold. I would like to deactivate it as soon as the key is released. How can I do this? Thanks, // (it is located at the end of…

---

## [How to connect and "read" two light sensors (photoresistors)](https://discourse.processing.org/t/how-to-connect-and-read-two-light-sensors-photoresistors/23254)

<div class="topic-metadata">

**Author:** [@Mirzohid](https://discourse.processing.org/u/Mirzohid)\
**Replies:** 12\
**Last updated:** [September 18, 2020, 2:19pm UTC](https://discourse.processing.org/t/how-to-connect-and-read-two-light-sensors-photoresistors/23254 "2020-09-18T14:19:21Z")

</div>

Hi, everyone I wanted to connect 2 photoresistors and creat 2 rectangles which reflects lighting on that photoresistors seperatly. 1 st question is is it even possible 'cause i couldn’t find anything about it on the int…

---

## [CA air imitation issues](https://discourse.processing.org/t/ca-air-imitation-issues/23869)

<div class="topic-metadata">

**Author:** [@PinkyRng](https://discourse.processing.org/u/PinkyRng)\
**Replies:** 2\
**Last updated:** [September 18, 2020, 11:23am UTC](https://discourse.processing.org/t/ca-air-imitation-issues/23869 "2020-09-18T11:23:24Z")

</div>

Hey! So I’m trying to create and prototype a small simulation for fun. I’m using CA(Cellular Automata) in 2D environment to imitate air. Now I done some progress and ironed out some issues I think… My math is sub par and…

---

## [Fisica Library, how to avoid contact](https://discourse.processing.org/t/fisica-library-how-to-avoid-contact/23835)

<div class="topic-metadata">

**Author:** [@doloresgarcia](https://discourse.processing.org/u/doloresgarcia)\
**Replies:** 1\
**Last updated:** [September 18, 2020, 10:22am UTC](https://discourse.processing.org/t/fisica-library-how-to-avoid-contact/23835 "2020-09-18T10:22:40Z")

</div>

Hi, i have to do a project and i am having problems with my code. In my game i have to shoot a spear and it has to hit a fish. The problem is that the spear doesn´t have to collide with the plataforms. Can somebody help…

---

## [Platform game mechanics](https://discourse.processing.org/t/platform-game-mechanics/23889)

<div class="topic-metadata">

**Author:** [@koenterheegde57](https://discourse.processing.org/u/koenterheegde57)\
**Replies:** 3\
**Last updated:** [September 18, 2020, 10:22am UTC](https://discourse.processing.org/t/platform-game-mechanics/23889 "2020-09-18T10:22:39Z")

</div>

Hi guys, I’m trying to make a simple platform game but I can’t solve the problem of my Ball having a different y level after a jump. When my yvelocity is high, my Ball just goes through the platform, because it’s not de…

---

## [Refering to a class rather than an object for collision](https://discourse.processing.org/t/refering-to-a-class-rather-than-an-object-for-collision/23933)

<div class="topic-metadata">

**Author:** [@Dan999](https://discourse.processing.org/u/Dan999)\
**Replies:** 1\
**Last updated:** [September 18, 2020, 10:06am UTC](https://discourse.processing.org/t/refering-to-a-class-rather-than-an-object-for-collision/23933 "2020-09-18T10:06:54Z")

</div>

I want to refer to a class rather than an object, so I don’t need a seperate if statement for each object, does anybody know how to do this?

---

## [Snapping the mouse to the center of the window?](https://discourse.processing.org/t/snapping-the-mouse-to-the-center-of-the-window/23896)

<div class="topic-metadata">

**Author:** [@sashakoshka](https://discourse.processing.org/u/sashakoshka)\
**Replies:** 2\
**Last updated:** [September 18, 2020, 8:36am UTC](https://discourse.processing.org/t/snapping-the-mouse-to-the-center-of-the-window/23896 "2020-09-18T08:36:23Z")

</div>

I am trying to snap the mouse cursor to the center of the window every frame. I tried using the robot class to do this, but the problem with that solution is it positions the cursor relative to the screen, not the window…

---

## [Translating twice, Once to rotate around center, Again for placement on page](https://discourse.processing.org/t/translating-twice-once-to-rotate-around-center-again-for-placement-on-page/23881)

<div class="topic-metadata">

**Author:** [@tobie](https://discourse.processing.org/u/tobie)\
**Replies:** 2\
**Last updated:** [September 17, 2020, 6:49pm UTC](https://discourse.processing.org/t/translating-twice-once-to-rotate-around-center-again-for-placement-on-page/23881 "2020-09-17T18:49:23Z")

</div>

void setup() { background(240, 237, 235); size(500, 500); } void draw(){ background(240, 237, 235); noStroke(); int gap = 20; float mult = 2; for(int i = -width; i \<= width; i+=(gap\*mult)){ pushMatrix(…

---

## [Holding the same angle](https://discourse.processing.org/t/holding-the-same-angle/23919)

<div class="topic-metadata">

**Author:** [@koenterheegde57](https://discourse.processing.org/u/koenterheegde57)\
**Replies:** 1\
**Last updated:** [September 17, 2020, 4:00pm UTC](https://discourse.processing.org/t/holding-the-same-angle/23919 "2020-09-17T16:00:31Z")

</div>

Hi guys, A few days ago i posted a question about a bubbleshooter game i wanted to make. I’ve now managed to make the bullet move towards my mouse position, but the angle keeps changing if i move the mouse. I want the a…

---

## [How to wrap with circular motion](https://discourse.processing.org/t/how-to-wrap-with-circular-motion/23906)

<div class="topic-metadata">

**Author:** [@lkalotihos](https://discourse.processing.org/u/lkalotihos)\
**Replies:** 3\
**Last updated:** [September 17, 2020, 1:34pm UTC](https://discourse.processing.org/t/how-to-wrap-with-circular-motion/23906 "2020-09-17T13:34:31Z")

</div>

Hi there, I’m trying to get this circular motion to bound off the border of my container (wrap I think) how would I go about that? Thanks, Lena float x; float y; float x1; float y1; float x2; float y2; //float = deci…

---

## [Error opening SVG with PShape](https://discourse.processing.org/t/error-opening-svg-with-pshape/23902)

<div class="topic-metadata">

**Author:** [@Zabot](https://discourse.processing.org/u/Zabot)\
**Replies:** 1\
**Last updated:** [September 17, 2020, 11:30am UTC](https://discourse.processing.org/t/error-opening-svg-with-pshape/23902 "2020-09-17T11:30:44Z")

</div>

Hello, I’m getting started with PShape with SVG exported from Illustrator, but i keep always receiving the following error message: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at processing.…

---

## [Delay occurs in real time plotting using threads](https://discourse.processing.org/t/delay-occurs-in-real-time-plotting-using-threads/23885)

<div class="topic-metadata">

**Author:** [@KGS](https://discourse.processing.org/u/KGS)\
**Replies:** 1\
**Last updated:** [September 17, 2020, 7:54am UTC](https://discourse.processing.org/t/delay-occurs-in-real-time-plotting-using-threads/23885 "2020-09-17T07:54:39Z")

</div>

I’m using 7 serial ports with 7 sensors required to be plotted in rela time without any delays. I have used separate thread functions to plot the data. However, after 5 minutes of plotting I have observed there is a dela…

---

## [Processing closes before fully launching. (help me read --l4j-debug)](https://discourse.processing.org/t/processing-closes-before-fully-launching-help-me-read-l4j-debug/23786)

<div class="topic-metadata">

**Author:** [@AndersLind99](https://discourse.processing.org/u/AndersLind99)\
**Replies:** 4\
**Last updated:** [September 17, 2020, 7:21am UTC](https://discourse.processing.org/t/processing-closes-before-fully-launching-help-me-read-l4j-debug/23786 "2020-09-17T07:21:21Z")

</div>

Hello I’m trying to install processing on my desktop but for some reason the program won’t open, i’ve tried the different solutions posted on the troubleshooting site and other posts. but the problem remains. I tried to …

---

## [Different Rendering Output when Processing is used with IntelliJ, please help](https://discourse.processing.org/t/different-rendering-output-when-processing-is-used-with-intellij-please-help/21362)

<div class="topic-metadata">

**Author:** [@Bufofa](https://discourse.processing.org/u/Bufofa)\
**Replies:** 3\
**Last updated:** [September 17, 2020, 3:08am UTC](https://discourse.processing.org/t/different-rendering-output-when-processing-is-used-with-intellij-please-help/21362 "2020-09-17T03:08:50Z")

</div>

Hello I want to use Processing on IntelliJ, so I did the basic setup to keep things working but every time I try to render something, the border of the shapes look jagged. What is interesting is that if I run the same …

[Previous page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=181)

[Next page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=183)
