# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?page=110

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

**Page:** 111

---

## [Issues adding libraries to Processing for Linux](https://discourse.processing.org/t/issues-adding-libraries-to-processing-for-linux/32656)

<div class="topic-metadata">

**Author:** [@PhineasGreene](https://discourse.processing.org/u/PhineasGreene)\
**Replies:** 1\
**Last updated:** [October 7, 2021, 7:47am UTC](https://discourse.processing.org/t/issues-adding-libraries-to-processing-for-linux/32656 "2021-10-07T07:47:08Z")

</div>

I installed Processing from the Arch Linux AUR, and it works fine except for adding external libraries. When I use the Add Library GUI, I always get an error saying Could not download \[githuburl\] to /tmp/download\[numbers…

---

## [Translate PGS Shape](https://discourse.processing.org/t/translate-pgs-shape/32652)

<div class="topic-metadata">

**Author:** [@matheplica](https://discourse.processing.org/u/matheplica)\
**Replies:** 2\
**Last updated:** [October 7, 2021, 7:14am UTC](https://discourse.processing.org/t/translate-pgs-shape/32652 "2021-10-07T07:14:45Z")

</div>

Hi friends, I’m trying to translate a shape with the PGS library. But this code give me no results, the shape does’nt move. It’s the same problem with all function from PGS\_Transformation class. Where I’m wrong ? im…

---

## [Using PShader and GLSL to make swaying grass](https://discourse.processing.org/t/using-pshader-and-glsl-to-make-swaying-grass/32666)

<div class="topic-metadata">

**Author:** [@Vertexia](https://discourse.processing.org/u/Vertexia)\
**Replies:** 5\
**Last updated:** [October 7, 2021, 6:45am UTC](https://discourse.processing.org/t/using-pshader-and-glsl-to-make-swaying-grass/32666 "2021-10-07T06:45:23Z")

</div>

I’m trying to add swaying grass using both a vector and a fragment shader in a 2d game, and I’m up to the point where i need to add the image to the fragment shader. Right now I’m using image() to render the image, but t…

---

## [Let syntax error](https://discourse.processing.org/t/let-syntax-error/32662)

<div class="topic-metadata">

**Author:** [@Arche](https://discourse.processing.org/u/Arche)\
**Replies:** 1\
**Last updated:** [October 7, 2021, 3:34am UTC](https://discourse.processing.org/t/let-syntax-error/32662 "2021-10-07T03:34:35Z")

</div>

I am new to processing and java and was trying to use let but when I compile it says syntax error. Do I have to add a plugin for that and how do I do it?

---

## [Video Pixels Changing While I Process Them](https://discourse.processing.org/t/video-pixels-changing-while-i-process-them/32589)

<div class="topic-metadata">

**Author:** [@stevensrmiller](https://discourse.processing.org/u/stevensrmiller)\
**Replies:** 15\
**Last updated:** [October 6, 2021, 6:52pm UTC](https://discourse.processing.org/t/video-pixels-changing-while-i-process-them/32589 "2021-10-06T18:52:37Z")

</div>

I’m using the Video 2.0 library with Processing 3.5.4 on Windows 10. I start capturing from my laptop’s camera, and just do an xor against 0xFFFFFF for every pixel. The output should look like this: But every so ofte…

---

## [Need to Hire someone for reactive audio](https://discourse.processing.org/t/need-to-hire-someone-for-reactive-audio/32651)

<div class="topic-metadata">

**Author:** [@patcantin](https://discourse.processing.org/u/patcantin)\
**Replies:** 0\
**Last updated:** [October 6, 2021, 1:28pm UTC](https://discourse.processing.org/t/need-to-hire-someone-for-reactive-audio/32651 "2021-10-06T13:28:26Z")

</div>

Hi, I’m having a project where I need it to react with my audio file. Can someone help me? thanks Pat

---

## [Trying to make objects move away from cursor](https://discourse.processing.org/t/trying-to-make-objects-move-away-from-cursor/27915)

<div class="topic-metadata">

**Author:** [@spamelim](https://discourse.processing.org/u/spamelim)\
**Replies:** 10\
**Last updated:** [October 6, 2021, 12:29pm UTC](https://discourse.processing.org/t/trying-to-make-objects-move-away-from-cursor/27915 "2021-10-06T12:29:28Z")

</div>

I have a class called ball and I’m creating 100 ellipses using an array and for loop in main. My goal is to make them all move away from the cursor and so far this is what I have: void cursor() { if(dist(x,y,mouse…

---

## [Creating voronoi patterns](https://discourse.processing.org/t/creating-voronoi-patterns/14635)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 16\
**Last updated:** [October 6, 2021, 10:34am UTC](https://discourse.processing.org/t/creating-voronoi-patterns/14635 "2021-10-06T10:34:01Z")

</div>

Hi again everyone, I’m trying to code a program to generate voronoi diagrams, however I’m having issues generating the function that draws arcs in between each line. Voronoi generation is supposed to produce this type …

---

## [Help websocket IOS](https://discourse.processing.org/t/help-websocket-ios/32647)

<div class="topic-metadata">

**Author:** [@r0x15](https://discourse.processing.org/u/r0x15)\
**Replies:** 0\
**Last updated:** [October 6, 2021, 7:04am UTC](https://discourse.processing.org/t/help-websocket-ios/32647 "2021-10-06T07:04:38Z")

</div>

Amnyone know becouse websocket not work on IOS but Android yes?? Tankyou

---

## [Pick Random Number Based on Preceding Number](https://discourse.processing.org/t/pick-random-number-based-on-preceding-number/32558)

<div class="topic-metadata">

**Author:** [@alenmartel](https://discourse.processing.org/u/alenmartel)\
**Replies:** 12\
**Last updated:** [October 3, 2021, 11:40am UTC](https://discourse.processing.org/t/pick-random-number-based-on-preceding-number/32558 "2021-10-03T11:40:56Z")

</div>

Good morning all; I’m trying to write a random number generator that generates twelve different random numbers and displays them in a column. However, what random number can follow each other one is limited to certain n…

---

## [PGS point in Shape - eratic behavior](https://discourse.processing.org/t/pgs-point-in-shape-eratic-behavior/32633)

<div class="topic-metadata">

**Author:** [@matheplica](https://discourse.processing.org/u/matheplica)\
**Replies:** 1\
**Last updated:** [October 5, 2021, 1:57pm UTC](https://discourse.processing.org/t/pgs-point-in-shape-eratic-behavior/32633 "2021-10-05T13:57:46Z")

</div>

Hi, I’m trying to see if my mouse is inside a shape with the PGS library. There’s maybe something wrong, I’ve got sometimes “ok” in the console. Here’s my code : import micycle.pgs.\*; PShape sh; void setup() { sh …

---

## [Why isn't the box in the center of the screen?](https://discourse.processing.org/t/why-isnt-the-box-in-the-center-of-the-screen/32580)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 10\
**Last updated:** [October 5, 2021, 1:50pm UTC](https://discourse.processing.org/t/why-isnt-the-box-in-the-center-of-the-screen/32580 "2021-10-05T13:50:02Z")

</div>

float x=height/2; float y=width/2; float z=0; void setup(){ size(400,400,P3D); } void draw(){ print(x,y,z); background(255); translate(x, y, z); noFill(); box(160); print(z); z++; }

---

## [A Processing Quine](https://discourse.processing.org/t/a-processing-quine/31332)

<div class="topic-metadata">

**Author:** [@TomD](https://discourse.processing.org/u/TomD)\
**Replies:** 16\
**Last updated:** [October 5, 2021, 1:29pm UTC](https://discourse.processing.org/t/a-processing-quine/31332 "2021-10-05T13:29:20Z")

</div>

Hi There, Earlier I made a Quine in Processing, that is code that prints it’s source code without any input. It works, it prints to the canvas what I can see in the text editor. I am wondering if anyone can see any fu…

---

## [Export sound and gif from a sketch](https://discourse.processing.org/t/export-sound-and-gif-from-a-sketch/32628)

<div class="topic-metadata">

**Author:** [@matteo](https://discourse.processing.org/u/matteo)\
**Replies:** 2\
**Last updated:** [October 5, 2021, 11:37am UTC](https://discourse.processing.org/t/export-sound-and-gif-from-a-sketch/32628 "2021-10-05T11:37:07Z")

</div>

Hi, I’ve put together a very easy sketch which uses the Sound library to create a basic show which i then visualize on the sketch. What i would like to achive: Export the sound Save the visual as a gif (i’ve been rea…

---

## [Use a fragment and vertex shader through GL4](https://discourse.processing.org/t/use-a-fragment-and-vertex-shader-through-gl4/32585)

<div class="topic-metadata">

**Author:** [@honeyjar](https://discourse.processing.org/u/honeyjar)\
**Replies:** 1\
**Last updated:** [October 5, 2021, 8:46am UTC](https://discourse.processing.org/t/use-a-fragment-and-vertex-shader-through-gl4/32585 "2021-10-05T08:46:01Z")

</div>

I’m attempting to set up a fragment and vertex shader where the vertex shader outputs a quad that covers the entire screen and the fragment shader draws a signed distance function on it. I know that you can attach fragm…

---

## [Could not run the sketch (Target VM failed to initialize)](https://discourse.processing.org/t/could-not-run-the-sketch-target-vm-failed-to-initialize/1841)

<div class="topic-metadata">

**Author:** [@jkarlos4](https://discourse.processing.org/u/jkarlos4)\
**Replies:** 6\
**Last updated:** [October 5, 2021, 2:54am UTC](https://discourse.processing.org/t/could-not-run-the-sketch-target-vm-failed-to-initialize/1841 "2021-10-05T02:54:33Z")

</div>

Help, I am getting this error message every time a run a code: Could not run the sketch (Target VM failed to initialize). have tried to run other included examples and they work pretty well, but not my code. here it is: …

---

## [How to have all platforms stay?](https://discourse.processing.org/t/how-to-have-all-platforms-stay/32610)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 2\
**Last updated:** [October 4, 2021, 9:33pm UTC](https://discourse.processing.org/t/how-to-have-all-platforms-stay/32610 "2021-10-04T21:33:47Z")

</div>

how to have all of the platforms stay visible? //visual PImage shrek; boolean invert= false; PImage\[\] soldier= new PImage\[3\]; platform platform; //timer //moving float charx=0; float chary=563-100; boolean jumping= fal…

---

## [Why is the bullet not shooting?](https://discourse.processing.org/t/why-is-the-bullet-not-shooting/32613)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 3\
**Last updated:** [October 4, 2021, 9:29pm UTC](https://discourse.processing.org/t/why-is-the-bullet-not-shooting/32613 "2021-10-04T21:29:40Z")

</div>

why is the bullet not shooting/ //visual PImage shrek; boolean invert= false; boolean shooting; PImage\[\] soldier= new PImage\[3\]; PImage crosseye; PImage nocrosseye; PImage eyebot; PImage heart; //timer //moving float…

---

## [Not shooting when inverted and eyebot not dissapearing](https://discourse.processing.org/t/not-shooting-when-inverted-and-eyebot-not-dissapearing/32615)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 0\
**Last updated:** [October 4, 2021, 8:30pm UTC](https://discourse.processing.org/t/not-shooting-when-inverted-and-eyebot-not-dissapearing/32615 "2021-10-04T20:30:57Z")

</div>

why can I not shoot when the screen is inverted? //visual PImage shrek; boolean invert= false; boolean shooting; PImage\[\] soldier= new PImage\[3\]; PImage crosseye; PImage nocrosseye; PImage eyebot; PImage heart; //time…

---

## [Help with improving my rect-rect collision detection](https://discourse.processing.org/t/help-with-improving-my-rect-rect-collision-detection/32609)

<div class="topic-metadata">

**Author:** [@Kenga123456](https://discourse.processing.org/u/Kenga123456)\
**Replies:** 1\
**Last updated:** [October 4, 2021, 5:21pm UTC](https://discourse.processing.org/t/help-with-improving-my-rect-rect-collision-detection/32609 "2021-10-04T17:21:30Z")

</div>

int ellipseRadius = 40; int r = 0; int b = 0; int g = 0; int rectPowerShowSize = 1; float xVel = 1; float yVel = 1; //images pImage img; void setup() { size(800, 400); background(0); frameRate(60); img = loadIm…

---

## [Collision Detection with Bullet](https://discourse.processing.org/t/collision-detection-with-bullet/32557)

<div class="topic-metadata">

**Author:** [@MarkShaker](https://discourse.processing.org/u/MarkShaker)\
**Replies:** 4\
**Last updated:** [October 4, 2021, 7:32am UTC](https://discourse.processing.org/t/collision-detection-with-bullet/32557 "2021-10-04T07:32:40Z")

</div>

Hi everyone, I’m unsure on how to code collision detection in processing. I get the overall idea of how it works and have watched tutorials on YouTube however they mainly show collision detection in terms of changing col…

---

## [Repositioning my bird character](https://discourse.processing.org/t/repositioning-my-bird-character/32529)

<div class="topic-metadata">

**Author:** [@CharrR](https://discourse.processing.org/u/CharrR)\
**Replies:** 6\
**Last updated:** [October 4, 2021, 5:12am UTC](https://discourse.processing.org/t/repositioning-my-bird-character/32529 "2021-10-04T05:12:16Z")

</div>

Hi all, I’m new to processing and I’m sorta stuck. I made a bird character and I want to make a duplicate right beside it without having to re-enter and adjust all the codes. I’m also a bit confused by the “translate” fu…

---

## [simpleHTTPServer, saveStrings / ajax?](https://discourse.processing.org/t/simplehttpserver-savestrings-ajax/32591)

<div class="topic-metadata">

**Author:** [@rkdnson](https://discourse.processing.org/u/rkdnson)\
**Replies:** 1\
**Last updated:** [October 4, 2021, 3:48am UTC](https://discourse.processing.org/t/simplehttpserver-savestrings-ajax/32591 "2021-10-04T03:48:40Z")

</div>

Hello everyone, I am using the SimpleHTTPServer by transfluxus. It works great, but I am have some general HTTP questions. I want to host a local site that has constantly updating information. This is my current workf…

---

## [How to stop the ball from moving when no key is beying pressed?](https://discourse.processing.org/t/how-to-stop-the-ball-from-moving-when-no-key-is-beying-pressed/32559)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 4\
**Last updated:** [October 3, 2021, 9:07pm UTC](https://discourse.processing.org/t/how-to-stop-the-ball-from-moving-when-no-key-is-beying-pressed/32559 "2021-10-03T21:07:24Z")

</div>

how to stop the ellipse from moving when no key is being pressed? PImage shrek; float charx=0; float chary=0; boolean invert= false; void setup() { size(600, 500); shrek= loadImage("shrek.jpg"); chary= height/2; …

---

## [Wait between port writes](https://discourse.processing.org/t/wait-between-port-writes/32550)

<div class="topic-metadata">

**Author:** [@PaladinBobcat](https://discourse.processing.org/u/PaladinBobcat)\
**Replies:** 4\
**Last updated:** [October 3, 2021, 7:56pm UTC](https://discourse.processing.org/t/wait-between-port-writes/32550 "2021-10-03T19:56:37Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I’m trying to figure out a way to wait a certain amount of time between sending serial data to my arduino. I want to be a able to “animate” wha…

---

## [Change variable alternatingly](https://discourse.processing.org/t/change-variable-alternatingly/32230)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 8\
**Last updated:** [October 2, 2021, 9:30am UTC](https://discourse.processing.org/t/change-variable-alternatingly/32230 "2021-10-02T09:30:57Z")

</div>

how to change i to 2 every couple of seconds/frames and then back direction\[1\]= loadImage("left.png"); direction\[2\]= loadImage("right.png"); i; void setup(){ fullScreen(); } void draw(){ image(direction\[i\], image…

---

## [Rotating object around camera](https://discourse.processing.org/t/rotating-object-around-camera/32401)

<div class="topic-metadata">

**Author:** [@SNICKRS](https://discourse.processing.org/u/SNICKRS)\
**Replies:** 9\
**Last updated:** [October 3, 2021, 6:51pm UTC](https://discourse.processing.org/t/rotating-object-around-camera/32401 "2021-10-03T18:51:35Z")

</div>

Hello everyone, I am trying to make an accurate sky simulation in the voxel game I am working on, as an update. So far, I have day and night working, with clouds (though they are kind of buggy). However, I want to make a…

---

## [Cannot use array variable defined in setup()](https://discourse.processing.org/t/cannot-use-array-variable-defined-in-setup/32578)

<div class="topic-metadata">

**Author:** [@dirknbr](https://discourse.processing.org/u/dirknbr)\
**Replies:** 2\
**Last updated:** [October 3, 2021, 12:04pm UTC](https://discourse.processing.org/t/cannot-use-array-variable-defined-in-setup/32578 "2021-10-03T12:04:10Z")

</div>

I want each of 30 lines to have a distinct random colour, but I get a ‘cols cannnot be resolved’ error in the draw() part. //https://funprogramming.org/76-Slowly-morphing-bezier-curves.html void setup() { size(500, 40…

---

## [Stop ball less abruptly](https://discourse.processing.org/t/stop-ball-less-abruptly/32572)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 2\
**Last updated:** [October 3, 2021, 11:06am UTC](https://discourse.processing.org/t/stop-ball-less-abruptly/32572 "2021-10-03T11:06:22Z")

</div>

if you press space the ellipse jumps, but it stops very abruptly how can i slow it down instead? //visual PImage shrek; boolean invert= false; //timer //moving float charx=0; float chary=563-25; boolean jumping= false;…

---

## [Why does my program return the error, RuntimeException: Too many popStyle() without enough pushStyle()?](https://discourse.processing.org/t/why-does-my-program-return-the-error-runtimeexception-too-many-popstyle-without-enough-pushstyle/32560)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 3\
**Last updated:** [October 2, 2021, 1:27pm UTC](https://discourse.processing.org/t/why-does-my-program-return-the-error-runtimeexception-too-many-popstyle-without-enough-pushstyle/32560 "2021-10-02T13:27:59Z")

</div>

why does my program return the error, RuntimeException: Too many popStyle() without enough pushStyle()? i have the same amount of pop as i do push (I want to have the screen be inverted, and go back to normal every fiv…

[Previous page](https://discourse.processing.org/c/processing/6.md?page=109)

[Next page](https://discourse.processing.org/c/processing/6.md?page=111)
