# Processing

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

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

**Page:** 146

---

## [What is the difference between Shadertoy and Processing?](https://discourse.processing.org/t/what-is-the-difference-between-shadertoy-and-processing/28359)

<div class="topic-metadata">

**Author:** [@kokoo](https://discourse.processing.org/u/kokoo)\
**Replies:** 1\
**Last updated:** [March 8, 2021, 10:57pm UTC](https://discourse.processing.org/t/what-is-the-difference-between-shadertoy-and-processing/28359 "2021-03-08T22:57:11Z")

</div>

I stumbled upon tool called Shadertoy. What difference between shadertoy and processing? Which one is faster and more capable? And what is GLSL?

---

## [Funky curveVertx results](https://discourse.processing.org/t/funky-curvevertx-results/28317)

<div class="topic-metadata">

**Author:** [@travis.stdenis](https://discourse.processing.org/u/travis.stdenis)\
**Replies:** 4\
**Last updated:** [March 8, 2021, 10:48pm UTC](https://discourse.processing.org/t/funky-curvevertx-results/28317 "2021-03-08T22:48:18Z")

</div>

I’m drawing a series of lines that diverge in the middle of the screen using a gaussian function (getGaussian below). Usually this is fine as you can see in theis picture (only two lines here to see the issue. The pro…

---

## [OSC message to Run Processing Sketch](https://discourse.processing.org/t/osc-message-to-run-processing-sketch/28318)

<div class="topic-metadata">

**Author:** [@L0RDZed](https://discourse.processing.org/u/L0RDZed)\
**Replies:** 7\
**Last updated:** [March 8, 2021, 7:05pm UTC](https://discourse.processing.org/t/osc-message-to-run-processing-sketch/28318 "2021-03-08T19:05:33Z")

</div>

Hi, Is it possible to send an OSC message to processing that will initiate the Run command? I am using Supercollider to send OSC messages to trigger events in Processing. I need to add another message command to my OS…

---

## [Help on video effect](https://discourse.processing.org/t/help-on-video-effect/27942)

<div class="topic-metadata">

**Author:** [@Morais](https://discourse.processing.org/u/Morais)\
**Replies:** 1\
**Last updated:** [March 8, 2021, 5:48pm UTC](https://discourse.processing.org/t/help-on-video-effect/27942 "2021-03-08T17:48:09Z")

</div>

Hi everyone. I am new to coding. This “effect” is almost done in terms of the overall look, but I can’t understand how to smooth out the pixelated lines (examples below). There’s a difference between P2D/P3D, but it’s …

---

## [How to rotate pixels based on other light values?](https://discourse.processing.org/t/how-to-rotate-pixels-based-on-other-light-values/28303)

<div class="topic-metadata">

**Author:** [@Morais](https://discourse.processing.org/u/Morais)\
**Replies:** 4\
**Last updated:** [March 8, 2021, 4:22pm UTC](https://discourse.processing.org/t/how-to-rotate-pixels-based-on-other-light-values/28303 "2021-03-08T16:22:34Z")

</div>

Hi everybody, I am new to coding. Given this code example, how can I rotate pixels based on other light values? Do I need to define 3 different brightness values? In this code example, there is this brightness(\_c) ins…

---

## [Why isn't the ellipse displaying?](https://discourse.processing.org/t/why-isnt-the-ellipse-displaying/28341)

<div class="topic-metadata">

**Author:** [@psn](https://discourse.processing.org/u/psn)\
**Replies:** 1\
**Last updated:** [March 8, 2021, 3:58pm UTC](https://discourse.processing.org/t/why-isnt-the-ellipse-displaying/28341 "2021-03-08T15:58:32Z")

</div>

Title is pretty self-explanatory, i need help to see what’s wrong with my code. Any help is appreciated, thanks! class Ellipse { int x; int y; int w; int h; int c; Ellipse(int inputX, int inputY, int inputWi…

---

## [Transformation matrix artifacts](https://discourse.processing.org/t/transformation-matrix-artifacts/28337)

<div class="topic-metadata">

**Author:** [@krigga](https://discourse.processing.org/u/krigga)\
**Replies:** 2\
**Last updated:** [March 8, 2021, 2:26pm UTC](https://discourse.processing.org/t/transformation-matrix-artifacts/28337 "2021-03-08T14:26:19Z")

</div>

I was generating a linear gradient using code I found online and then tried adding rotation using transformation matrix. The gradient did rotate, however artifacts appeared: the gradient was no longer perfect, dark lines…

---

## [How to add multiple values to array within class?](https://discourse.processing.org/t/how-to-add-multiple-values-to-array-within-class/28294)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 4\
**Last updated:** [March 8, 2021, 2:07pm UTC](https://discourse.processing.org/t/how-to-add-multiple-values-to-array-within-class/28294 "2021-03-08T14:07:44Z")

</div>

I have the following array: class Foo { int\[\] myArray; int val1; int val2; int val3; int val4; Foo(int val1, int val2, int val3, int val4) { this.myArray = new int\[4\]; myArray = val1, val2, val3, va…

---

## [Select random element from list](https://discourse.processing.org/t/select-random-element-from-list/28178)

<div class="topic-metadata">

**Author:** [@Criste44](https://discourse.processing.org/u/Criste44)\
**Replies:** 6\
**Last updated:** [March 2, 2021, 10:30am UTC](https://discourse.processing.org/t/select-random-element-from-list/28178 "2021-03-02T10:30:28Z")

</div>

I want to select a random element from a list and make an if operation on the selected item. Can I do them in void awake or void start?

---

## [Having trouble hiding Controllers](https://discourse.processing.org/t/having-trouble-hiding-controllers/28282)

<div class="topic-metadata">

**Author:** [@Bluebottle](https://discourse.processing.org/u/Bluebottle)\
**Replies:** 4\
**Last updated:** [March 7, 2021, 10:27pm UTC](https://discourse.processing.org/t/having-trouble-hiding-controllers/28282 "2021-03-07T22:27:41Z")

</div>

I’ve been trying to have different knobs and buttons available depending on the tab pressed in the button bar at the top. Unfortunately, I haven’t been able to get this knob to hide using the button bar and am unsure as …

---

## [Variable for Arduino Timer](https://discourse.processing.org/t/variable-for-arduino-timer/28066)

<div class="topic-metadata">

**Author:** [@saaqib.m](https://discourse.processing.org/u/saaqib.m)\
**Replies:** 4\
**Last updated:** [March 7, 2021, 9:56pm UTC](https://discourse.processing.org/t/variable-for-arduino-timer/28066 "2021-03-07T21:56:55Z")

</div>

Hi, I have been trying to set the timer constant of OCR1A to the variable TImer\_count so that when I change Sfreq it automatically updates Timer\_count and hence OCR1A. Does anyone know how to and what kind of variable I …

---

## [I need help for a code please](https://discourse.processing.org/t/i-need-help-for-a-code-please/28314)

<div class="topic-metadata">

**Author:** [@KIRA](https://discourse.processing.org/u/KIRA)\
**Replies:** 2\
**Last updated:** [March 7, 2021, 8:32pm UTC](https://discourse.processing.org/t/i-need-help-for-a-code-please/28314 "2021-03-07T20:32:59Z")

</div>

Hello i have to do a game on processing, This game is an aim trainer with circles and when we click on them, other spawn… The game must have 3 levels of difficulty and a point counter. If the circles can have differen…

---

## [Having trouble undoing a camera() transformation](https://discourse.processing.org/t/having-trouble-undoing-a-camera-transformation/28293)

<div class="topic-metadata">

**Author:** [@Sethran](https://discourse.processing.org/u/Sethran)\
**Replies:** 5\
**Last updated:** [March 7, 2021, 7:08pm UTC](https://discourse.processing.org/t/having-trouble-undoing-a-camera-transformation/28293 "2021-03-07T19:08:27Z")

</div>

hi, I’ve tried searching for a solution online but I wasn’t able to find one I could understand. I’m kinda new to coding in general. This is what I’ve got so far; //make varuables PVector offset = new PVector(width/…

---

## [Processing stopped opening](https://discourse.processing.org/t/processing-stopped-opening/28197)

<div class="topic-metadata">

**Author:** [@humbertoscorza](https://discourse.processing.org/u/humbertoscorza)\
**Replies:** 6\
**Last updated:** [March 7, 2021, 6:56pm UTC](https://discourse.processing.org/t/processing-stopped-opening/28197 "2021-03-07T18:56:49Z")

</div>

Hi I downloaded processing 3.5.4 las week and everything was fine , it opened correctly and work properly. Today i tried opening it again and tha logo/splash screen apear for around 5-10 seconds and then closes. It d…

---

## [Processing suggestion: make parseX(...) functions for all loadX(...) functions](https://discourse.processing.org/t/processing-suggestion-make-parsex-functions-for-all-loadx-functions/28310)

<div class="topic-metadata">

**Author:** [@Kitulous](https://discourse.processing.org/u/Kitulous)\
**Replies:** 2\
**Last updated:** [March 7, 2021, 11:25am UTC](https://discourse.processing.org/t/processing-suggestion-make-parsex-functions-for-all-loadx-functions/28310 "2021-03-07T11:25:52Z")

</div>

So I have had this problem: Load custom font in Processing Android Core (made not in PDE) - Processing for Android - Processing Foundation Im not asking for solving it now as I guess I have to resort to a workaround. E…

---

## [Problem with drawing a Pythagoras Tree using L-system](https://discourse.processing.org/t/problem-with-drawing-a-pythagoras-tree-using-l-system/28270)

<div class="topic-metadata">

**Author:** [@Esther](https://discourse.processing.org/u/Esther)\
**Replies:** 3\
**Last updated:** [March 6, 2021, 10:53am UTC](https://discourse.processing.org/t/problem-with-drawing-a-pythagoras-tree-using-l-system/28270 "2021-03-06T10:53:42Z")

</div>

Hi, I am drawing a Pythagoras Tree using L-system and 2 production rules. I managed to use the first rule called “F-rule” to draw the right handside of the tree. I tried using the second rule “H-rule” to draw the left ha…

---

## [Save Value in ArrayList controlP5/Processing/Intellij](https://discourse.processing.org/t/save-value-in-arraylist-controlp5-processing-intellij/28264)

<div class="topic-metadata">

**Author:** [@deerfox](https://discourse.processing.org/u/deerfox)\
**Replies:** 1\
**Last updated:** [March 6, 2021, 10:18am UTC](https://discourse.processing.org/t/save-value-in-arraylist-controlp5-processing-intellij/28264 "2021-03-06T10:18:16Z")

</div>

Hey Everybody, Nooby here :slight\_smile: I’m doing my first GUI and I don’t know how to save the Values in an ArrayList by pressing the Buttons this is my Code so far: import processing.core.PApplet; import controlP5…

---

## [Start stop read encoder](https://discourse.processing.org/t/start-stop-read-encoder/28218)

<div class="topic-metadata">

**Author:** [@r0x15](https://discourse.processing.org/u/r0x15)\
**Replies:** 10\
**Last updated:** [March 5, 2021, 11:52pm UTC](https://discourse.processing.org/t/start-stop-read-encoder/28218 "2021-03-05T23:52:55Z")

</div>

Any one explane me howto start and stop read encoder from arduino ? I read encoder position but i need start and stop from button or proximity Who help me please Tankyou PS. when start begin from 0 position.

---

## [How to extract values from custom class?](https://discourse.processing.org/t/how-to-extract-values-from-custom-class/28268)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 3\
**Last updated:** [March 5, 2021, 9:50am UTC](https://discourse.processing.org/t/how-to-extract-values-from-custom-class/28268 "2021-03-05T09:50:44Z")

</div>

I have a class with some variables like so class Foo { // Instance Variables String myString; int myNums1; int myNums2; // Constructor Declaration of Class Flow(String myString, int myNums){ this.myStri…

---

## [Steering a Shape along a pathway](https://discourse.processing.org/t/steering-a-shape-along-a-pathway/17787)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 19\
**Last updated:** [March 5, 2021, 8:26am UTC](https://discourse.processing.org/t/steering-a-shape-along-a-pathway/17787 "2021-03-05T08:26:22Z")

</div>

Hello all, I want to steer a shape along a pathway. Let’s say a spaceship that first goes along x axis and when at a certain point stops and rotates slowly around its axis and then starts in another direction. Like a f…

---

## [ChildPApplet and closing when not disposed](https://discourse.processing.org/t/childpapplet-and-closing-when-not-disposed/28277)

<div class="topic-metadata">

**Author:** [@MiguelSanches](https://discourse.processing.org/u/MiguelSanches)\
**Replies:** 0\
**Last updated:** [March 5, 2021, 8:54am UTC](https://discourse.processing.org/t/childpapplet-and-closing-when-not-disposed/28277 "2021-03-05T08:54:15Z")

</div>

Hi all, I am trying to do a simple user interface on processing and I am running into a problem when closing a PApplet. The main window is able to create/reopen and close the second window without problems and disposes…

---

## [Problem with P3D on Mac OS 11.2.1](https://discourse.processing.org/t/problem-with-p3d-on-mac-os-11-2-1/28248)

<div class="topic-metadata">

**Author:** [@paulstgeorge](https://discourse.processing.org/u/paulstgeorge)\
**Replies:** 9\
**Last updated:** [March 5, 2021, 6:18am UTC](https://discourse.processing.org/t/problem-with-p3d-on-mac-os-11-2-1/28248 "2021-03-05T06:18:22Z")

</div>

If I run this: void setup() { size(100, 100, P3D); } I get an error: 0 AppKit 0x00007fff22e8147f -\[NSWindow(NSWindow\_Theme) \_postWindowNeedsToResetDragMarginsUnlessPostingDisabled\] +…

---

## [Changing Icon of Exported Executable](https://discourse.processing.org/t/changing-icon-of-exported-executable/28271)

<div class="topic-metadata">

**Author:** [@s31](https://discourse.processing.org/u/s31)\
**Replies:** 0\
**Last updated:** [March 5, 2021, 12:25am UTC](https://discourse.processing.org/t/changing-icon-of-exported-executable/28271 "2021-03-05T00:25:06Z")

</div>

After you export a sketch to an .exe file, how would you go about changing the default processing icon to a custom one?

---

## [How to store random coordinates?](https://discourse.processing.org/t/how-to-store-random-coordinates/28235)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 15\
**Last updated:** [March 4, 2021, 8:09pm UTC](https://discourse.processing.org/t/how-to-store-random-coordinates/28235 "2021-03-04T20:09:25Z")

</div>

I would like to arrange some spheres randomly in space. To do that I run the following: import peasy.\*; PeasyCam cam; void setup(){ size(1300, 1300, P3D); cam = new PeasyCam(this, 200); randomSeed(0); float…

---

## [Grab mouse using OpenGL](https://discourse.processing.org/t/grab-mouse-using-opengl/28259)

<div class="topic-metadata">

**Author:** [@yeppii](https://discourse.processing.org/u/yeppii)\
**Replies:** 11\
**Last updated:** [March 4, 2021, 5:29pm UTC](https://discourse.processing.org/t/grab-mouse-using-opengl/28259 "2021-03-04T17:29:49Z")

</div>

I am making a game and I want to grab the mouse using OpenGL. How could I do this?

---

## [Structural diagrams for processing code](https://discourse.processing.org/t/structural-diagrams-for-processing-code/28253)

<div class="topic-metadata">

**Author:** [@kalle](https://discourse.processing.org/u/kalle)\
**Replies:** 0\
**Last updated:** [March 4, 2021, 11:12am UTC](https://discourse.processing.org/t/structural-diagrams-for-processing-code/28253 "2021-03-04T11:12:40Z")

</div>

Processing is now an interesting alternative to other programming languages at many universities in courses. As far as algorithms are concerned different graphical representations are used: UML, flow charts, structure …

---

## [Export Application](https://discourse.processing.org/t/export-application/28187)

<div class="topic-metadata">

**Author:** [@anog\_jani](https://discourse.processing.org/u/anog_jani)\
**Replies:** 3\
**Last updated:** [March 4, 2021, 11:13am UTC](https://discourse.processing.org/t/export-application/28187 "2021-03-04T11:13:27Z")

</div>

I was having trouble exporting my processing project to a .exe file, I’ve searched in many forums and videos, and I’ve asked many people and still I could not find an answer. If someone could help me, it would be greatly…

---

## [Get location of a PApplet window](https://discourse.processing.org/t/get-location-of-a-papplet-window/28039)

<div class="topic-metadata">

**Author:** [@yeppii](https://discourse.processing.org/u/yeppii)\
**Replies:** 11\
**Last updated:** [March 4, 2021, 10:40am UTC](https://discourse.processing.org/t/get-location-of-a-papplet-window/28039 "2021-03-04T10:40:00Z")

</div>

How can I get the location of a PApplet window?

---

## [Dynamite screen clear game](https://discourse.processing.org/t/dynamite-screen-clear-game/28241)

<div class="topic-metadata">

**Author:** [@boomstick55](https://discourse.processing.org/u/boomstick55)\
**Replies:** 2\
**Last updated:** [March 4, 2021, 9:56am UTC](https://discourse.processing.org/t/dynamite-screen-clear-game/28241 "2021-03-04T09:56:17Z")

</div>

Im trying to simulate a player pushing down ignition for dynamite to explode and clear the screen of bad guys but I cant figure out how to detect the rect reaching a certain point of the screen to clear it here’s my cod…

---

## [Checking objects in a certain area](https://discourse.processing.org/t/checking-objects-in-a-certain-area/28220)

<div class="topic-metadata">

**Author:** [@Criste44](https://discourse.processing.org/u/Criste44)\
**Replies:** 8\
**Last updated:** [March 3, 2021, 5:33pm UTC](https://discourse.processing.org/t/checking-objects-in-a-certain-area/28220 "2021-03-03T17:33:23Z")

</div>

İ = 8 J= 6 How can I check if there is a part between these rows and columns? If there is no part, I want to have an operation. Edit; I’m doing a chess-like game … example I want to check if there is a piece in row 6…

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

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