# Latest

**URL:** https://discourse.processing.org/latest.md?no_subcategories=false&page=232

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

**Page:** 233

---

## [Problem with for loops](https://discourse.processing.org/t/problem-with-for-loops/29425)

<div class="topic-metadata">

**Author:** [@kairama15](https://discourse.processing.org/u/kairama15)\
**Replies:** 1\
**Last updated:** [April 16, 2021, 8:22pm UTC](https://discourse.processing.org/t/problem-with-for-loops/29425 "2021-04-16T20:22:34Z")

</div>

When I run the following code, when I try to println the variable a in the FOR loop, it doesn’t show up on the window. I would expect the loop to be entered and iterated because m\[0\] is greater than 0, and so is m\[1\], m…

---

## [Make use of camera in pc and live stream](https://discourse.processing.org/t/make-use-of-camera-in-pc-and-live-stream/29413)

<div class="topic-metadata">

**Author:** [@shaun26](https://discourse.processing.org/u/shaun26)\
**Replies:** 1\
**Last updated:** [April 16, 2021, 6:25pm UTC](https://discourse.processing.org/t/make-use-of-camera-in-pc-and-live-stream/29413 "2021-04-16T18:25:03Z")

</div>

I want to live stream a video captured from camera using p5.js. I’m using this camera: AR0234CS, Full HD, 120FPS, USB3 Global Shutter Camera This is possible? any ideas how to implement?

---

## [Music is not stopping](https://discourse.processing.org/t/music-is-not-stopping/29415)

<div class="topic-metadata">

**Author:** [@Mert](https://discourse.processing.org/u/Mert)\
**Replies:** 1\
**Last updated:** [April 16, 2021, 6:18pm UTC](https://discourse.processing.org/t/music-is-not-stopping/29415 "2021-04-16T18:18:38Z")

</div>

Hello everyone I added to music on my code but even if I stop playing music continue to play just wtf how can I solve that problem here is my alllllll code: int rad = 200; // Boyut float xpos, ypos; // Başlay…

---

## [Maybe one bug in the p5](https://discourse.processing.org/t/maybe-one-bug-in-the-p5/29400)

<div class="topic-metadata">

**Author:** [@turtle](https://discourse.processing.org/u/turtle)\
**Replies:** 8\
**Last updated:** [April 16, 2021, 12:15pm UTC](https://discourse.processing.org/t/maybe-one-bug-in-the-p5/29400 "2021-04-16T12:15:40Z")

</div>

the code as following let x = 50; let y = 50; let diameter = 100; let bgColor = 200; function setup() { createCanvas(400, 400); background(bgColor); noStroke(); } function touchMoved() { print(x-diameter/2, x+…

---

## [How to replace Shape with an image ? PShape to PImage](https://discourse.processing.org/t/how-to-replace-shape-with-an-image-pshape-to-pimage/29386)

<div class="topic-metadata">

**Author:** [@carolina\_moreira](https://discourse.processing.org/u/carolina_moreira)\
**Replies:** 4\
**Last updated:** [April 16, 2021, 12:08pm UTC](https://discourse.processing.org/t/how-to-replace-shape-with-an-image-pshape-to-pimage/29386 "2021-04-16T12:08:12Z")

</div>

I am trying to exchange all forms for images What is the correct way to do it? The game opens and no error appears The image just does not appear when I press the Y key hope someone can help me thank you in advance …

---

## [Errors in SpaceShip Game](https://discourse.processing.org/t/errors-in-spaceship-game/29389)

<div class="topic-metadata">

**Author:** [@spamelim](https://discourse.processing.org/u/spamelim)\
**Replies:** 3\
**Last updated:** [April 16, 2021, 11:50am UTC](https://discourse.processing.org/t/errors-in-spaceship-game/29389 "2021-04-16T11:50:12Z")

</div>

I’ve been programming a 3D game where a ship avoids spikes on a terrain of triangle sectors. I’ve been having two major problems with the game so far. 1) the triangle sector terrain seems to be moving slowly downwards an…

---

## [White background white text when ellipse moves to text. Text not appear](https://discourse.processing.org/t/white-background-white-text-when-ellipse-moves-to-text-text-not-appear/29398)

<div class="topic-metadata">

**Author:** [@Mert](https://discourse.processing.org/u/Mert)\
**Replies:** 3\
**Last updated:** [April 16, 2021, 9:49am UTC](https://discourse.processing.org/t/white-background-white-text-when-ellipse-moves-to-text-text-not-appear/29398 "2021-04-16T09:49:19Z")

</div>

https://www.behance.net/gallery/75113211/Interactive-Posters?tracking\_source=search\_projects\_recommended|Processing%20Poster%20Design Guys if u check this project there is video check the 1.42. Guys, in the video there…

---

## [How to manipulate one shape or other p5 objects in another place](https://discourse.processing.org/t/how-to-manipulate-one-shape-or-other-p5-objects-in-another-place/29396)

<div class="topic-metadata">

**Author:** [@turtle](https://discourse.processing.org/u/turtle)\
**Replies:** 2\
**Last updated:** [April 16, 2021, 2:10am UTC](https://discourse.processing.org/t/how-to-manipulate-one-shape-or-other-p5-objects-in-another-place/29396 "2021-04-16T02:10:23Z")

</div>

I have checked out the Reference and Examples roundly, now I find that it is difficult to manipulate p5 objects in another place(only can manipulate them in where they are be defined). For example: function draw() { …

---

## [p5↺Replay - share and replay p5.js code \<3](https://discourse.processing.org/t/p5-replay-share-and-replay-p5-js-code-3/29391)

<div class="topic-metadata">

**Author:** [@micuat](https://discourse.processing.org/u/micuat)\
**Replies:** 1\
**Last updated:** [April 15, 2021, 9:46pm UTC](https://discourse.processing.org/t/p5-replay-share-and-replay-p5-js-code-3/29391 "2021-04-15T21:46:51Z")

</div>

https://p5-replay.glitch.me/ I made a little platform where you can code p5.js and share, and others can replay the “making” and take over the sketch if they want. Currently only supports draw loop (other functions too,…

---

## [Is there any way to call my library's keyEvent () method before the sketch's keyPressed () method?](https://discourse.processing.org/t/is-there-any-way-to-call-my-librarys-keyevent-method-before-the-sketchs-keypressed-method/29381)

<div class="topic-metadata">

**Author:** [@Ov3rM1nD](https://discourse.processing.org/u/Ov3rM1nD)\
**Replies:** 1\
**Last updated:** [April 15, 2021, 7:22pm UTC](https://discourse.processing.org/t/is-there-any-way-to-call-my-librarys-keyevent-method-before-the-sketchs-keypressed-method/29381 "2021-04-15T19:22:20Z")

</div>

As it says in the title, I would like to know if there is any way to be able to capture imputs made on the keyboard and process logic before Processing invokes the keyPressed() method, on the end user’s side. I am buildi…

---

## [Want to convert string to int](https://discourse.processing.org/t/want-to-convert-string-to-int/29387)

<div class="topic-metadata">

**Author:** [@spamelim](https://discourse.processing.org/u/spamelim)\
**Replies:** 1\
**Last updated:** [April 15, 2021, 4:19pm UTC](https://discourse.processing.org/t/want-to-convert-string-to-int/29387 "2021-04-15T16:19:58Z")

</div>

Hello, I’m trying to make a program to basically calculate COVID risk off the user’s age. Right now, I coded for the user to be able to type their age, but I want the string they type to be converted to an int when they …

---

## [How to replace a Shape with an image ? PShape to PImage](https://discourse.processing.org/t/how-to-replace-a-shape-with-an-image-pshape-to-pimage/29385)

<div class="topic-metadata">

**Author:** [@carolina\_moreira](https://discourse.processing.org/u/carolina_moreira)\
**Replies:** 1\
**Last updated:** [April 15, 2021, 3:56pm UTC](https://discourse.processing.org/t/how-to-replace-a-shape-with-an-image-pshape-to-pimage/29385 "2021-04-15T15:56:26Z")

</div>

I am trying to exchange all forms for images What is the correct way to do it? The game opens and no error appears The image just does not appear when I press the Y key hope someone can help me thank you in advance …

---

## [Can I set a program as a background on my mac?](https://discourse.processing.org/t/can-i-set-a-program-as-a-background-on-my-mac/29380)

<div class="topic-metadata">

**Author:** [@Aoyanco](https://discourse.processing.org/u/Aoyanco)\
**Replies:** 1\
**Last updated:** [April 15, 2021, 3:05pm UTC](https://discourse.processing.org/t/can-i-set-a-program-as-a-background-on-my-mac/29380 "2021-04-15T15:05:12Z")

</div>

I recently coded a boids program, and thought it would be cool to have them flying around as my background (Or maybe even screensaver!) Is this possible?

---

## [Display population data from a CSV file onto a map](https://discourse.processing.org/t/display-population-data-from-a-csv-file-onto-a-map/29365)

<div class="topic-metadata">

**Author:** [@ynnad792](https://discourse.processing.org/u/ynnad792)\
**Replies:** 5\
**Last updated:** [April 15, 2021, 2:48pm UTC](https://discourse.processing.org/t/display-population-data-from-a-csv-file-onto-a-map/29365 "2021-04-15T14:48:19Z")

</div>

Hi, I am trying to plot population data (from three years) from a CSV file onto a map of the UK but am not sure how to do this. I have gathered the X and Y coordinates (and they correspond correctly to the map) of each …

---

## [Projecting a circle](https://discourse.processing.org/t/projecting-a-circle/29379)

<div class="topic-metadata">

**Author:** [@rosaria](https://discourse.processing.org/u/rosaria)\
**Replies:** 1\
**Last updated:** [April 15, 2021, 2:02pm UTC](https://discourse.processing.org/t/projecting-a-circle/29379 "2021-04-15T14:02:53Z")

</div>

Hello, i’m trying to create code for when mouse is clicked, a ball is projected (upwards), but as it moves it gradually slows down. So far all i’ve manage to figure out is make it move up and down. I’m a complete beginne…

---

## [How can I get the coordinate of one shape](https://discourse.processing.org/t/how-can-i-get-the-coordinate-of-one-shape/29376)

<div class="topic-metadata">

**Author:** [@turtle](https://discourse.processing.org/u/turtle)\
**Replies:** 6\
**Last updated:** [April 15, 2021, 2:00pm UTC](https://discourse.processing.org/t/how-can-i-get-the-coordinate-of-one-shape/29376 "2021-04-15T14:00:00Z")

</div>

my code as following: let elli = ellipse(100,100,100,100); so next how can I get the coordinate of the ellipse?

---

## [Object changing colour over time](https://discourse.processing.org/t/object-changing-colour-over-time/29377)

<div class="topic-metadata">

**Author:** [@hwahwa](https://discourse.processing.org/u/hwahwa)\
**Replies:** 1\
**Last updated:** [April 15, 2021, 1:56pm UTC](https://discourse.processing.org/t/object-changing-colour-over-time/29377 "2021-04-15T13:56:57Z")

</div>

Hello, I’ve created some code that moves a grey arrow from left to right. What i want to do is that when the mouse is pressed, the arrow stops and the colour of the arrow increased from a green to yellow to red colour. W…

---

## [Basic interactive sketches don't run smoothly](https://discourse.processing.org/t/basic-interactive-sketches-dont-run-smoothly/28751)

<div class="topic-metadata">

**Author:** [@cern](https://discourse.processing.org/u/cern)\
**Replies:** 9\
**Last updated:** [April 15, 2021, 7:51am UTC](https://discourse.processing.org/t/basic-interactive-sketches-dont-run-smoothly/28751 "2021-04-15T07:51:51Z")

</div>

Hi all, I’m having the weirdest issue here. I’ve switched to p5js and its been almost a year that I didn’t use Processing on my Macbook (13-inch 2017, running macOS 10.13.6). Now I’m running the Hello World of interacti…

---

## [Random Shape generator](https://discourse.processing.org/t/random-shape-generator/28843)

<div class="topic-metadata">

**Author:** [@Flolo](https://discourse.processing.org/u/Flolo)\
**Replies:** 12\
**Last updated:** [April 14, 2021, 9:13pm UTC](https://discourse.processing.org/t/random-shape-generator/28843 "2021-04-14T21:13:26Z")

</div>

Hey, I want to write a program that randomly draws dots on the window and then connects them. The special thing about it is: the lines are not allowed to cross each other. What the result should look like: What the …

---

## [Implement the noise function (with midpoint displacement) to create noisy circle](https://discourse.processing.org/t/implement-the-noise-function-with-midpoint-displacement-to-create-noisy-circle/29320)

<div class="topic-metadata">

**Author:** [@Lolita](https://discourse.processing.org/u/Lolita)\
**Replies:** 6\
**Last updated:** [April 14, 2021, 6:27pm UTC](https://discourse.processing.org/t/implement-the-noise-function-with-midpoint-displacement-to-create-noisy-circle/29320 "2021-04-14T18:27:55Z")

</div>

Hi, here is code to create noise circle using begin and end shape function, if you could help to resolve this question and implement the noise function (with midpoint displacement) to create this circle, and we should no…

---

## [Two amplitude objects listening to two separate loaded sounds](https://discourse.processing.org/t/two-amplitude-objects-listening-to-two-separate-loaded-sounds/29361)

<div class="topic-metadata">

**Author:** [@fbrie002](https://discourse.processing.org/u/fbrie002)\
**Replies:** 3\
**Last updated:** [April 14, 2021, 5:03pm UTC](https://discourse.processing.org/t/two-amplitude-objects-listening-to-two-separate-loaded-sounds/29361 "2021-04-14T17:03:27Z")

</div>

Hi! I’m trying to figure out a way to have two separate sound files loaded and playing at the same time connect to two separate amplitude objects. At the moment all the sounds just go straight to the first amplitude obj…

---

## [How to fix the code belowed in order to delete the leftmost ellipse when keyPressed](https://discourse.processing.org/t/how-to-fix-the-code-belowed-in-order-to-delete-the-leftmost-ellipse-when-keypressed/29353)

<div class="topic-metadata">

**Author:** [@batmm](https://discourse.processing.org/u/batmm)\
**Replies:** 6\
**Last updated:** [April 14, 2021, 4:44pm UTC](https://discourse.processing.org/t/how-to-fix-the-code-belowed-in-order-to-delete-the-leftmost-ellipse-when-keypressed/29353 "2021-04-14T16:44:52Z")

</div>

please format code with \</\> button \* homework policy \* asking questions \<final int SIZE = 20; int x;//x-coordinates int y;//y-coordinates int mousePos;//keep track void setup() { size(500, 500); x = new int\[1000…

---

## [P5.js camera movement control with keys, how to assign limits to it?](https://discourse.processing.org/t/p5-js-camera-movement-control-with-keys-how-to-assign-limits-to-it/29342)

<div class="topic-metadata">

**Author:** [@camila](https://discourse.processing.org/u/camila)\
**Replies:** 7\
**Last updated:** [April 14, 2021, 2:28pm UTC](https://discourse.processing.org/t/p5-js-camera-movement-control-with-keys-how-to-assign-limits-to-it/29342 "2021-04-14T14:28:31Z")

</div>

Hello people, I’m trying to set up a fully functional camera in my code that responds to movements assigned by the computer keys, that I’ve accomplished. Now I’m trying to assign a limit to those movements, for example:…

---

## [Can't open .bat file!](https://discourse.processing.org/t/cant-open-bat-file/29299)

<div class="topic-metadata">

**Author:** [@AbleYudada](https://discourse.processing.org/u/AbleYudada)\
**Replies:** 5\
**Last updated:** [April 14, 2021, 2:45am UTC](https://discourse.processing.org/t/cant-open-bat-file/29299 "2021-04-14T02:45:51Z")

</div>

Hi guys, I’m here again. This time the question confuses me. I want to use processing to open the bat file to open Google Chrome, and use launch(sketchPath("")+“data/9.bat”); to solve it. The problem is, but when I chang…

---

## [Unable to generate proper float value in Processing](https://discourse.processing.org/t/unable-to-generate-proper-float-value-in-processing/29352)

<div class="topic-metadata">

**Author:** [@estevancarlos](https://discourse.processing.org/u/estevancarlos)\
**Replies:** 2\
**Last updated:** [April 14, 2021, 12:14am UTC](https://discourse.processing.org/t/unable-to-generate-proper-float-value-in-processing/29352 "2021-04-14T00:14:18Z")

</div>

I am converting p5js to Processing. I’ve actually used Processing for years but I specialize in Javascript. I am surprised at this issue because I’ve never noticed before. Not sure how I overlooked it. When calculating …

---

## [Processing PDE requires administrator permissions to run on Windows 10](https://discourse.processing.org/t/processing-pde-requires-administrator-permissions-to-run-on-windows-10/29346)

<div class="topic-metadata">

**Author:** [@aviperl](https://discourse.processing.org/u/aviperl)\
**Replies:** 2\
**Last updated:** [April 13, 2021, 10:48pm UTC](https://discourse.processing.org/t/processing-pde-requires-administrator-permissions-to-run-on-windows-10/29346 "2021-04-13T22:48:23Z")

</div>

I have just downloaded processing onto my Windows computer. I am using Windows 10, version 2004, os build 19041.867. If I attempt to run the Processing Development Environment executable, the splash screen will open, bu…

---

## [Udp, hypermedia.net probleme to send some byte](https://discourse.processing.org/t/udp-hypermedia-net-probleme-to-send-some-byte/29344)

<div class="topic-metadata">

**Author:** [@LOUIS1](https://discourse.processing.org/u/LOUIS1)\
**Replies:** 1\
**Last updated:** [April 13, 2021, 6:14pm UTC](https://discourse.processing.org/t/udp-hypermedia-net-probleme-to-send-some-byte/29344 "2021-04-13T18:14:53Z")

</div>

Hello, i have a problem using the hypermedia.net library, i can’t send bytes, when i try i get error message: “The function” send () "expects parameters like: “send (String, String, int)” ". While normally it is possibl…

---

## [I want stop the sounds from playing when the webpage is hidden](https://discourse.processing.org/t/i-want-stop-the-sounds-from-playing-when-the-webpage-is-hidden/29340)

<div class="topic-metadata">

**Author:** [@LaserDenis](https://discourse.processing.org/u/LaserDenis)\
**Replies:** 7\
**Last updated:** [April 13, 2021, 8:56pm UTC](https://discourse.processing.org/t/i-want-stop-the-sounds-from-playing-when-the-webpage-is-hidden/29340 "2021-04-13T20:56:34Z")

</div>

I tried to use document.hidden but I doesn’t seem to work .

---

## [Gradient does not work](https://discourse.processing.org/t/gradient-does-not-work/29347)

<div class="topic-metadata">

**Author:** [@jaspervb](https://discourse.processing.org/u/jaspervb)\
**Replies:** 2\
**Last updated:** [April 13, 2021, 7:40pm UTC](https://discourse.processing.org/t/gradient-does-not-work/29347 "2021-04-13T19:40:43Z")

</div>

Hi There, I want to make a gradient in processing with a for loop. I can not figure out how i can solve this. void setup() { color from = color(255, 165, 32); color to = color(72, 61, 139); int steps = 100; in…

---

## [Local to global positions](https://discourse.processing.org/t/local-to-global-positions/29333)

<div class="topic-metadata">

**Author:** [@saul](https://discourse.processing.org/u/saul)\
**Replies:** 6\
**Last updated:** [April 13, 2021, 7:09pm UTC](https://discourse.processing.org/t/local-to-global-positions/29333 "2021-04-13T19:09:20Z")

</div>

Hi there; Been dipping my toe in a little p5 and ran into what might be a common problem with what I hope is a common answer (although I couldn’t find one) I have a sketch that creates a secondary canvas and centers it…

[Previous page](https://discourse.processing.org/latest.md?no_subcategories=false&page=231)

[Next page](https://discourse.processing.org/latest.md?no_subcategories=false&page=233)
