# Processing

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

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

**Page:** 138

---

## [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…

---

## [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…

---

## [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…

---

## [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…

---

## [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…

---

## [The Centipedes Game](https://discourse.processing.org/t/the-centipedes-game/29163)

<div class="topic-metadata">

**Author:** [@GijsfromAmsterdam](https://discourse.processing.org/u/GijsfromAmsterdam)\
**Replies:** 8\
**Last updated:** [April 13, 2021, 5:42pm UTC](https://discourse.processing.org/t/the-centipedes-game/29163 "2021-04-13T17:42:54Z")

</div>

Hello all, For school i have to make a kind of snake game. The game has the following rules: Rules of game: 1 player needs to make as many points before all particles of body dissapeared. game should be a field of 16…

---

## [Collision detection & collision response](https://discourse.processing.org/t/collision-detection-collision-response/29321)

<div class="topic-metadata">

**Author:** [@Lolita](https://discourse.processing.org/u/Lolita)\
**Replies:** 3\
**Last updated:** [April 13, 2021, 5:35pm UTC](https://discourse.processing.org/t/collision-detection-collision-response/29321 "2021-04-13T17:35:27Z")

</div>

I just created ball with line , and I want to make this ball hit this line with collision and response please any suggestion! float x = 150; float y = 100; float xSpeed = 9; float ySpeed = 7; void setup() { size(500, …

---

## [Displaying an image in a cascade of pixels](https://discourse.processing.org/t/displaying-an-image-in-a-cascade-of-pixels/29304)

<div class="topic-metadata">

**Author:** [@ilalande](https://discourse.processing.org/u/ilalande)\
**Replies:** 2\
**Last updated:** [April 13, 2021, 4:07pm UTC](https://discourse.processing.org/t/displaying-an-image-in-a-cascade-of-pixels/29304 "2021-04-13T16:07:51Z")

</div>

Hello, I’m new to processing and working with Daniel Shiffman’s book. I fisrt wanted to display an image pixel by pixel, from top left to bottom right.I think I succeded in what I wanted (making appear an image pixel b…

---

## [\[JAVA\] POST Is the code you are requesting correct?](https://discourse.processing.org/t/java-post-is-the-code-you-are-requesting-correct/29300)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 3\
**Last updated:** [April 13, 2021, 1:57pm UTC](https://discourse.processing.org/t/java-post-is-the-code-you-are-requesting-correct/29300 "2021-04-13T13:57:01Z")

</div>

import http.requests.\*; public void setup(){ PostRequest post = new PostRequest(“http://cloud.efento.io”); post.addHeader(“Content-Type”, “application/json”); post.addData(“charset”, “UTF-8”); post.addData(“X-Api-T…

---

## [Recursive tree painting problem](https://discourse.processing.org/t/recursive-tree-painting-problem/29303)

<div class="topic-metadata">

**Author:** [@xXvladosXx](https://discourse.processing.org/u/xXvladosXx)\
**Replies:** 8\
**Last updated:** [April 13, 2021, 1:27pm UTC](https://discourse.processing.org/t/recursive-tree-painting-problem/29303 "2021-04-13T13:27:56Z")

</div>

Hi guys, I have a problem with understanding how to work with Recursive Tree. I have to built something like a tree with green leaves (photo below), however I have only a default recursive tree. Task: Make a green like…

---

## [Apply wind force on this code](https://discourse.processing.org/t/apply-wind-force-on-this-code/29322)

<div class="topic-metadata">

**Author:** [@Lolita](https://discourse.processing.org/u/Lolita)\
**Replies:** 5\
**Last updated:** [April 13, 2021, 12:23pm UTC](https://discourse.processing.org/t/apply-wind-force-on-this-code/29322 "2021-04-13T12:23:19Z")

</div>

Here is the code and Id apply wind force instead of friction, int NrDisks = 120; float Gravity = 0.03; float Fri = -0.9; Disk\[\] disks = new Disk\[NrDisks\]; void setup() { size(700, 700); for (int i = 0; i \< …

---

## [Using reflection to determine color datatype versus int](https://discourse.processing.org/t/using-reflection-to-determine-color-datatype-versus-int/29283)

<div class="topic-metadata">

**Author:** [@Aleksi](https://discourse.processing.org/u/Aleksi)\
**Replies:** 8\
**Last updated:** [April 13, 2021, 7:51am UTC](https://discourse.processing.org/t/using-reflection-to-determine-color-datatype-versus-int/29283 "2021-04-13T07:51:13Z")

</div>

Hello again! Is there a way, using reflection, to determine if a given class field is declared as a color field as distinct from an int field? I figure there must be a way, but the following returns both fields as int: …

---

## [How to distinguish different continuous color blocks in an image](https://discourse.processing.org/t/how-to-distinguish-different-continuous-color-blocks-in-an-image/29315)

<div class="topic-metadata">

**Author:** [@elonw](https://discourse.processing.org/u/elonw)\
**Replies:** 1\
**Last updated:** [April 13, 2021, 7:05am UTC](https://discourse.processing.org/t/how-to-distinguish-different-continuous-color-blocks-in-an-image/29315 "2021-04-13T07:05:10Z")

</div>

I want to divide a figure into different continuous color blocks (containing repeated color areas), and calculate their average colors of these blocks in another corresponding rendering (real) image. And consequently …

---

## [Processing 3.5 and 4 (alpha) still can't find MacOS camera. Issue with the Video Library](https://discourse.processing.org/t/processing-3-5-and-4-alpha-still-cant-find-macos-camera-issue-with-the-video-library/28938)

<div class="topic-metadata">

**Author:** [@teemee](https://discourse.processing.org/u/teemee)\
**Replies:** 6\
**Last updated:** [April 13, 2021, 4:12am UTC](https://discourse.processing.org/t/processing-3-5-and-4-alpha-still-cant-find-macos-camera-issue-with-the-video-library/28938 "2021-04-13T04:12:31Z")

</div>

Hi everyone. I am having a problem with the video library the capture part, which keeps telling me the program can’t see any devices. I am aware of the issue with the video library, which mentioned here in the issue #13…

---

## [How to add objects to ArrayList one at a time at timed intervals](https://discourse.processing.org/t/how-to-add-objects-to-arraylist-one-at-a-time-at-timed-intervals/29305)

<div class="topic-metadata">

**Author:** [@spamelim](https://discourse.processing.org/u/spamelim)\
**Replies:** 4\
**Last updated:** [April 12, 2021, 10:05pm UTC](https://discourse.processing.org/t/how-to-add-objects-to-arraylist-one-at-a-time-at-timed-intervals/29305 "2021-04-12T22:05:20Z")

</div>

I’m trying to make a 3D space shooter-type game, where spikes come at the ship and must be avoided. I’m currently coding for adding spikes one at a time at different intervals in the user’s score using an ArrayList. My e…

---

## [Connecting two Kinects to one processing sketch](https://discourse.processing.org/t/connecting-two-kinects-to-one-processing-sketch/29307)

<div class="topic-metadata">

**Author:** [@l3ehfar](https://discourse.processing.org/u/l3ehfar)\
**Replies:** 1\
**Last updated:** [April 12, 2021, 5:45pm UTC](https://discourse.processing.org/t/connecting-two-kinects-to-one-processing-sketch/29307 "2021-04-12T17:45:28Z")

</div>

I would be grateful if someone helped me for connecting two Kinect V2 to one Processing sketch. I am using KinectPV2 library in windows 10.

---

## [How does P2D make lines look so smooth and how can this be replicated in the default renderer?](https://discourse.processing.org/t/how-does-p2d-make-lines-look-so-smooth-and-how-can-this-be-replicated-in-the-default-renderer/29287)

<div class="topic-metadata">

**Author:** [@shishironeal](https://discourse.processing.org/u/shishironeal)\
**Replies:** 4\
**Last updated:** [April 12, 2021, 4:00pm UTC](https://discourse.processing.org/t/how-does-p2d-make-lines-look-so-smooth-and-how-can-this-be-replicated-in-the-default-renderer/29287 "2021-04-12T16:00:18Z")

</div>

When I set the renderer to P2D, the lines seem to be a lot more smooth compared to the regular JAVA2D renderer. Is there a reason for this and can it be done with other renderers? Same code, but the quality for the P…

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

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