# Latest

**URL:** https://discourse.processing.org/latest.md?page=171

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

**Page:** 172

---

## [Drawing array of curves from PVector](https://discourse.processing.org/t/drawing-array-of-curves-from-pvector/33775)

<div class="topic-metadata">

**Author:** [@mrbro](https://discourse.processing.org/u/mrbro)\
**Replies:** 12\
**Last updated:** [December 9, 2021, 12:41am UTC](https://discourse.processing.org/t/drawing-array-of-curves-from-pvector/33775 "2021-12-09T00:41:34Z")

</div>

Hi friends! I am trying to draw an array of curves from PVector coordinates. Basically it is similar to Particle system tutorial, just instead of points, I need to get curves. I try to use begin shape (in class Particl…

---

## [Obj rigging in p5.js or combined with another lib?](https://discourse.processing.org/t/obj-rigging-in-p5-js-or-combined-with-another-lib/27088)

<div class="topic-metadata">

**Author:** [@ffd8](https://discourse.processing.org/u/ffd8)\
**Replies:** 3\
**Last updated:** [December 8, 2021, 11:18pm UTC](https://discourse.processing.org/t/obj-rigging-in-p5-js-or-combined-with-another-lib/27088 "2021-12-08T23:18:31Z")

</div>

Curious if anyone has tips/advice on how to do OBJ rigging (like animating the model from a skeleton) within p5.js? There was an abandoned issue on the topic some years ago… Found one of many tutorials using three.js – b…

---

## [WEBGL context lost error](https://discourse.processing.org/t/webgl-context-lost-error/34005)

<div class="topic-metadata">

**Author:** [@Sap](https://discourse.processing.org/u/Sap)\
**Replies:** 1\
**Last updated:** [December 8, 2021, 10:50pm UTC](https://discourse.processing.org/t/webgl-context-lost-error/34005 "2021-12-08T22:50:41Z")

</div>

Hello, I created a website where I’m using face detection (ml5js), video capture of the webcam, and 3d shapes. I’m using the video as a texture of the 3d shapes. When I’m using only 1 shape everything is okay but when…

---

## [Connecting Cells](https://discourse.processing.org/t/connecting-cells/33835)

<div class="topic-metadata">

**Author:** [@eltrem](https://discourse.processing.org/u/eltrem)\
**Replies:** 14\
**Last updated:** [December 8, 2021, 9:50pm UTC](https://discourse.processing.org/t/connecting-cells/33835 "2021-12-08T21:50:47Z")

</div>

\*deleted post (it was a terrible code…)

---

## [Why doesn't FOR-EACH give every output a different VALUE from ARRAY?](https://discourse.processing.org/t/why-doesnt-for-each-give-every-output-a-different-value-from-array/33987)

<div class="topic-metadata">

**Author:** [@badbatman](https://discourse.processing.org/u/badbatman)\
**Replies:** 2\
**Last updated:** [December 8, 2021, 8:17pm UTC](https://discourse.processing.org/t/why-doesnt-for-each-give-every-output-a-different-value-from-array/33987 "2021-12-08T20:17:08Z")

</div>

I made an array that I output in a loop. But every item I assign the array it keep giving the same value while I’ve put 4 values into the array. I’ve tried everything but it keeps giving the same value (330). I have also…

---

## [Alternatives for OpenCV at recognizing facial parts? (eyes, nose, mouth)](https://discourse.processing.org/t/alternatives-for-opencv-at-recognizing-facial-parts-eyes-nose-mouth/34003)

<div class="topic-metadata">

**Author:** [@badbatman](https://discourse.processing.org/u/badbatman)\
**Replies:** 0\
**Last updated:** [December 8, 2021, 1:46pm UTC](https://discourse.processing.org/t/alternatives-for-opencv-at-recognizing-facial-parts-eyes-nose-mouth/34003 "2021-12-08T13:46:25Z")

</div>

After using OpenCv for a while I figured out it does recognize the face very well but not the eyes, nose and mouth. When applying this the detection isn’t stable enough and will create rectangles everywhere. Especially w…

---

## [How do I recognize faces and only output that from camera capture?](https://discourse.processing.org/t/how-do-i-recognize-faces-and-only-output-that-from-camera-capture/33964)

<div class="topic-metadata">

**Author:** [@badbatman](https://discourse.processing.org/u/badbatman)\
**Replies:** 2\
**Last updated:** [December 8, 2021, 1:08pm UTC](https://discourse.processing.org/t/how-do-i-recognize-faces-and-only-output-that-from-camera-capture/33964 "2021-12-08T13:08:08Z")

</div>

I would like to only output faces and not anything else from a camera capture. So basicly a zoom in on the face only. Does anyone know how to do it or where I should start? Thank you.

---

## [Can somebody help me, please (background color)](https://discourse.processing.org/t/can-somebody-help-me-please-background-color/33996)

<div class="topic-metadata">

**Author:** [@Toxodera](https://discourse.processing.org/u/Toxodera)\
**Replies:** 2\
**Last updated:** [December 8, 2021, 12:15pm UTC](https://discourse.processing.org/t/can-somebody-help-me-please-background-color/33996 "2021-12-08T12:15:19Z")

</div>

Hello, I’m new to processing and I need help with my code. How can I switch my background to another colour when I click something on my mouse? And How can I code the sun to move? void setup() { size(800,600); backg…

---

## [Where can I find XMLpro library/How to read XML data with Processing?](https://discourse.processing.org/t/where-can-i-find-xmlpro-library-how-to-read-xml-data-with-processing/33985)

<div class="topic-metadata">

**Author:** [@sebastian](https://discourse.processing.org/u/sebastian)\
**Replies:** 1\
**Last updated:** [December 8, 2021, 11:44am UTC](https://discourse.processing.org/t/where-can-i-find-xmlpro-library-how-to-read-xml-data-with-processing/33985 "2021-12-08T11:44:14Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I’’m following this course on LinkedIn and in chapter 10.4 the topic is: Processing: Interactive Data Visualization. I can not find the proXML d…

---

## [How do I calculate the cube root?](https://discourse.processing.org/t/how-do-i-calculate-the-cube-root/33988)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 14\
**Last updated:** [December 8, 2021, 11:05am UTC](https://discourse.processing.org/t/how-do-i-calculate-the-cube-root/33988 "2021-12-08T11:05:42Z")

</div>

I am trying to find all numbers with an integer cube root, but it hasn’t worked because appareantly cbrt() isn’t a processing supported function. how do I do this? this is my code: int x= 1; if(cbrt(x)==int(cbrt(x)){ …

---

## [\[p5.js\] When a button is pressed, I want to close the menu bar. Help](https://discourse.processing.org/t/p5-js-when-a-button-is-pressed-i-want-to-close-the-menu-bar-help/33986)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 5\
**Last updated:** [December 8, 2021, 1:22am UTC](https://discourse.processing.org/t/p5-js-when-a-button-is-pressed-i-want-to-close-the-menu-bar-help/33986 "2021-12-08T01:22:26Z")

</div>

js file function setup() { } function draw() { } html file \<html\> \<head\> \<meta charset="utf-8"\> \<meta name="viewport" content="width=device-width, initial-scale=1.0"\> \<link rel="stylesheet" href="style…

---

## [Old processing zombie game by Kevan Davis. Can you help me get it working?](https://discourse.processing.org/t/old-processing-zombie-game-by-kevan-davis-can-you-help-me-get-it-working/7178)

<div class="topic-metadata">

**Author:** [@aaronszcz](https://discourse.processing.org/u/aaronszcz)\
**Replies:** 19\
**Last updated:** [December 7, 2021, 10:31pm UTC](https://discourse.processing.org/t/old-processing-zombie-game-by-kevan-davis-can-you-help-me-get-it-working/7178 "2021-12-07T22:31:17Z")

</div>

Hello Forum, One day I remembered an old zombie game I played I high school computer class. I found the source code for it. Turns out it was written for Processing 1.0. Ive coded with java and python before, but not in…

---

## [If statement with color not working](https://discourse.processing.org/t/if-statement-with-color-not-working/33904)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 8\
**Last updated:** [December 7, 2021, 9:00pm UTC](https://discourse.processing.org/t/if-statement-with-color-not-working/33904 "2021-12-07T21:00:44Z")

</div>

why is clicks not getting higher whe I click on the cookie? var clicks = 0; let cookie; function setup() { createCanvas(windowWidth, windowHeight); background(100); cookie = color(132, 86, 60, 255); } function dra…

---

## [Connecting a line that passes though 2 points](https://discourse.processing.org/t/connecting-a-line-that-passes-though-2-points/33856)

<div class="topic-metadata">

**Author:** [@chaotic.rabbit](https://discourse.processing.org/u/chaotic.rabbit)\
**Replies:** 11\
**Last updated:** [December 7, 2021, 9:01am UTC](https://discourse.processing.org/t/connecting-a-line-that-passes-though-2-points/33856 "2021-12-07T09:01:41Z")

</div>

Hi I found this code posted on here and it worked for me to draw a line that passes from 2 points that I wanted. However I want the line to start and stop at certain points not continue all the way to the top and bottom.…

---

## [Counting clicks on images](https://discourse.processing.org/t/counting-clicks-on-images/33972)

<div class="topic-metadata">

**Author:** [@tlinston](https://discourse.processing.org/u/tlinston)\
**Replies:** 1\
**Last updated:** [December 7, 2021, 4:21am UTC](https://discourse.processing.org/t/counting-clicks-on-images/33972 "2021-12-07T04:21:08Z")

</div>

I’m making a game where there needs to be a counter for every time I click on a certain image. I’ve loaded in the image and set up the counter but I’m not sure how to go about putting details in the void mouseClicked ar…

---

## [How to divide a image/video into multiple pieces?](https://discourse.processing.org/t/how-to-divide-a-image-video-into-multiple-pieces/33965)

<div class="topic-metadata">

**Author:** [@badbatman](https://discourse.processing.org/u/badbatman)\
**Replies:** 1\
**Last updated:** [December 6, 2021, 7:54pm UTC](https://discourse.processing.org/t/how-to-divide-a-image-video-into-multiple-pieces/33965 "2021-12-06T19:54:06Z")

</div>

How can I break a image of video into multiple pieces? I want to do this with camera capture in the end. Any advice is welcome. Thank you. So something like this:

---

## [Coding Help-Collision](https://discourse.processing.org/t/coding-help-collision/33969)

<div class="topic-metadata">

**Author:** [@Mr.B](https://discourse.processing.org/u/Mr.B)\
**Replies:** 0\
**Last updated:** [December 6, 2021, 6:19pm UTC](https://discourse.processing.org/t/coding-help-collision/33969 "2021-12-06T18:19:26Z")

</div>

(p5.js Web Editor) How can I fix lines 44-46 to have a “better” collision between the projectile and the alien?

---

## [Running code on exit](https://discourse.processing.org/t/running-code-on-exit/33961)

<div class="topic-metadata">

**Author:** [@Cereal](https://discourse.processing.org/u/Cereal)\
**Replies:** 0\
**Last updated:** [December 6, 2021, 12:59pm UTC](https://discourse.processing.org/t/running-code-on-exit/33961 "2021-12-06T12:59:58Z")

</div>

Just wanted to verify this is a safe way of running code when the program exits: function setup() {} function draw() {} function dispose() { super.dispose() // Anything else I want cleaned up } Didn’t see any offi…

---

## [Choose random multiple entries from a StringList](https://discourse.processing.org/t/choose-random-multiple-entries-from-a-stringlist/33958)

<div class="topic-metadata">

**Author:** [@melo](https://discourse.processing.org/u/melo)\
**Replies:** 0\
**Last updated:** [December 6, 2021, 12:44pm UTC](https://discourse.processing.org/t/choose-random-multiple-entries-from-a-stringlist/33958 "2021-12-06T12:44:05Z")

</div>

Hello, Yesterday I was trying to pick three random entries from a StringList when you pressed a button. Ideally, the entry shouldn’t be repeated. I decided to shuffle() it once at the beggining, with three int which wou…

---

## [Different frameCount in the same code](https://discourse.processing.org/t/different-framecount-in-the-same-code/33937)

<div class="topic-metadata">

**Author:** [@Cosmin](https://discourse.processing.org/u/Cosmin)\
**Replies:** 2\
**Last updated:** [December 6, 2021, 4:03am UTC](https://discourse.processing.org/t/different-framecount-in-the-same-code/33937 "2021-12-06T04:03:30Z")

</div>

Hello, guys! I’m Cosmin and is a pleasure to be here. I have a question: it’s possible to have different frameCounts in the same definition? More exactly, I have two videos with different value of this function. In the f…

---

## [How to upload a mp4 file in p5 and then set it as background](https://discourse.processing.org/t/how-to-upload-a-mp4-file-in-p5-and-then-set-it-as-background/33949)

<div class="topic-metadata">

**Author:** [@anjali](https://discourse.processing.org/u/anjali)\
**Replies:** 0\
**Last updated:** [December 6, 2021, 2:04am UTC](https://discourse.processing.org/t/how-to-upload-a-mp4-file-in-p5-and-then-set-it-as-background/33949 "2021-12-06T02:04:33Z")

</div>

how to upload a mp4 file in p5 and then set it as background

---

## [Startup code runs more than once](https://discourse.processing.org/t/startup-code-runs-more-than-once/33922)

<div class="topic-metadata">

**Author:** [@hacketet](https://discourse.processing.org/u/hacketet)\
**Replies:** 4\
**Last updated:** [December 5, 2021, 9:41pm UTC](https://discourse.processing.org/t/startup-code-runs-more-than-once/33922 "2021-12-05T21:41:54Z")

</div>

I am developing a control system with numerouos buttons displayed on the monitor. Everything is working fine, however, I discovered that the startup code runs whenever I trigger a control. There is an empty draw sub - …

---

## [loadImage only if file exist](https://discourse.processing.org/t/loadimage-only-if-file-exist/33929)

<div class="topic-metadata">

**Author:** [@rizn](https://discourse.processing.org/u/rizn)\
**Replies:** 5\
**Last updated:** [December 5, 2021, 7:34pm UTC](https://discourse.processing.org/t/loadimage-only-if-file-exist/33929 "2021-12-05T19:34:57Z")

</div>

hi. i use loadImage() for a sketch, to read a lot of images from web and export it to pdf. its working fine. Is there a way to ask, if the image-file exist before using loadImage()? In my case, if some files dont exi…

---

## [How to make a photorealistic render in Processing?](https://discourse.processing.org/t/how-to-make-a-photorealistic-render-in-processing/33931)

<div class="topic-metadata">

**Author:** [@Nik](https://discourse.processing.org/u/Nik)\
**Replies:** 3\
**Last updated:** [December 5, 2021, 6:00pm UTC](https://discourse.processing.org/t/how-to-make-a-photorealistic-render-in-processing/33931 "2021-12-05T18:00:47Z")

</div>

Hello! How can i create a photorealistic 3D render in processing (as in the attached picture)?

---

## [Calculate maximum length of a vector](https://discourse.processing.org/t/calculate-maximum-length-of-a-vector/33818)

<div class="topic-metadata">

**Author:** [@travis.stdenis](https://discourse.processing.org/u/travis.stdenis)\
**Replies:** 11\
**Last updated:** [December 5, 2021, 3:29pm UTC](https://discourse.processing.org/t/calculate-maximum-length-of-a-vector/33818 "2021-12-05T15:29:08Z")

</div>

I’m trying to achieve the following calculation but i really don’t know what functions and equations to use in this situation. As you can see in the diagram, I have vector A and vector B and I know angle K and angle …

---

## [Trying to make a shape grow on its own](https://discourse.processing.org/t/trying-to-make-a-shape-grow-on-its-own/33939)

<div class="topic-metadata">

**Author:** [@Callum](https://discourse.processing.org/u/Callum)\
**Replies:** 2\
**Last updated:** [December 5, 2021, 3:08pm UTC](https://discourse.processing.org/t/trying-to-make-a-shape-grow-on-its-own/33939 "2021-12-05T15:08:52Z")

</div>

Hi, I’m very very new to Processing (just learned loops earlier today) and am trying to figure something out. I’m trying to make it so that when you click the screen, a circle of random size and colour shows up, and then…

---

## [Memory optimization and resizing](https://discourse.processing.org/t/memory-optimization-and-resizing/33878)

<div class="topic-metadata">

**Author:** [@F1yin](https://discourse.processing.org/u/F1yin)\
**Replies:** 3\
**Last updated:** [December 5, 2021, 2:06pm UTC](https://discourse.processing.org/t/memory-optimization-and-resizing/33878 "2021-12-05T14:06:08Z")

</div>

Hi everyone! I’m extremely new to processing and coding as a whole, and so I have many questions. But one, in particular, I haven’t been able to find on google. I am creating a GUI dashboard that will eventually interfa…

---

## [I can not receive messages TCP using netP5. for android](https://discourse.processing.org/t/i-can-not-receive-messages-tcp-using-netp5-for-android/33944)

<div class="topic-metadata">

**Author:** [@Signal](https://discourse.processing.org/u/Signal)\
**Replies:** 0\
**Last updated:** [December 5, 2021, 1:30pm UTC](https://discourse.processing.org/t/i-can-not-receive-messages-tcp-using-netp5-for-android/33944 "2021-12-05T13:30:04Z")

</div>

I am using import netP5. \*; for a TCPclient. TcpClient myClient; NetListener nl1 = new NetListener() { public void netEvent(NetMessage m) { println("netEvent (tcpc) : "+ new String( m.getData() ) ); } public void …

---

## [Help in Rotate Image in JAVA2D](https://discourse.processing.org/t/help-in-rotate-image-in-java2d/33852)

<div class="topic-metadata">

**Author:** [@avong](https://discourse.processing.org/u/avong)\
**Replies:** 4\
**Last updated:** [December 4, 2021, 11:05pm UTC](https://discourse.processing.org/t/help-in-rotate-image-in-java2d/33852 "2021-12-04T23:05:48Z")

</div>

please format code with \</\> button \* homework policy \* asking questions \<!- I have issues rotating image. I need help please. I wish to implement Flow Rate Meter. See the attached code. I have seen examples, but mo…

---

## [Find space in string](https://discourse.processing.org/t/find-space-in-string/33760)

<div class="topic-metadata">

**Author:** [@yalaniv](https://discourse.processing.org/u/yalaniv)\
**Replies:** 5\
**Last updated:** [December 4, 2021, 10:57pm UTC](https://discourse.processing.org/t/find-space-in-string/33760 "2021-12-04T22:57:08Z")

</div>

I have a sentece as a string, and I want to print in on the screen, each word in different line, but when I try to comapre if the current char is space, I get this error: cannot convert from char to String, regarding …

[Previous page](https://discourse.processing.org/latest.md?page=170)

[Next page](https://discourse.processing.org/latest.md?page=172)
