# Latest

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

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

**Page:** 234

---

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

---

## [Is it possible to erase part of an object and let the background show through?](https://discourse.processing.org/t/is-it-possible-to-erase-part-of-an-object-and-let-the-background-show-through/29331)

<div class="topic-metadata">

**Author:** [@cottonchipper](https://discourse.processing.org/u/cottonchipper)\
**Replies:** 2\
**Last updated:** [April 13, 2021, 4:51pm UTC](https://discourse.processing.org/t/is-it-possible-to-erase-part-of-an-object-and-let-the-background-show-through/29331 "2021-04-13T16:51:37Z")

</div>

Is it possible to erase part of an object such as a rectangle or ellipse and allow the background color to show through? In the example I’ve got the background set to a gradient and am attempting to erase two rectangles …

---

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

---

## [HTML, P5, and Material Design](https://discourse.processing.org/t/html-p5-and-material-design/29308)

<div class="topic-metadata">

**Author:** [@karenmsn](https://discourse.processing.org/u/karenmsn)\
**Replies:** 2\
**Last updated:** [April 13, 2021, 1:04pm UTC](https://discourse.processing.org/t/html-p5-and-material-design/29308 "2021-04-13T13:04:45Z")

</div>

I’m trying to follow this code https://codepen.io/katehummer/pen/jOyGzJp to create a carousel of instructions for the virtual installation I’m creating, but when I tried adding a new card to the list, it inserted it unde…

---

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

---

## [GSoC'21 Second Proposal - High priority improvements and providing missing unit test coverage to the ‘processing-android’](https://discourse.processing.org/t/gsoc21-second-proposal-high-priority-improvements-and-providing-missing-unit-test-coverage-to-the-processing-android/29312)

<div class="topic-metadata">

**Author:** [@Rupesh\_Kumar](https://discourse.processing.org/u/Rupesh_Kumar)\
**Replies:** 0\
**Last updated:** [April 12, 2021, 11:21pm UTC](https://discourse.processing.org/t/gsoc21-second-proposal-high-priority-improvements-and-providing-missing-unit-test-coverage-to-the-processing-android/29312 "2021-04-12T23:21:44Z")

</div>

I have submitted my second draft proposal on the GSoC website - High priority improvements and providing missing unit test coverage to the ‘processing-android’ @kfrajer @sarahlensing @Andres @AdityaRana and all the poss…

---

## [API POST error - not sure what's causing it](https://discourse.processing.org/t/api-post-error-not-sure-whats-causing-it/29311)

<div class="topic-metadata">

**Author:** [@psemme](https://discourse.processing.org/u/psemme)\
**Replies:** 2\
**Last updated:** [April 12, 2021, 10:45pm UTC](https://discourse.processing.org/t/api-post-error-not-sure-whats-causing-it/29311 "2021-04-12T22:45:52Z")

</div>

I’m trying to pull in RGB palette info from this cool color API - Colormind API - extracting colors from photos and video. I have it working in other API tools but when I place the code in P5 I get this error: Uncaugh…

---

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

---

## [Timer in Python mode](https://discourse.processing.org/t/timer-in-python-mode/29286)

<div class="topic-metadata">

**Author:** [@nktlst](https://discourse.processing.org/u/nktlst)\
**Replies:** 3\
**Last updated:** [April 12, 2021, 8:59pm UTC](https://discourse.processing.org/t/timer-in-python-mode/29286 "2021-04-12T20:59:07Z")

</div>

I need timer, which resets when I press keyboard key (for example). I did basic timer, but it not resets, I understand why but I can’t figure it out how to make my class resets on key board hit. For example I need “stop”…

---

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

---

## [Displaying an image pixel by pixel](https://discourse.processing.org/t/displaying-an-image-pixel-by-pixel/28839)

<div class="topic-metadata">

**Author:** [@ilalande](https://discourse.processing.org/u/ilalande)\
**Replies:** 3\
**Last updated:** [March 26, 2021, 1:52pm UTC](https://discourse.processing.org/t/displaying-an-image-pixel-by-pixel/28839 "2021-03-26T13:52:01Z")

</div>

Hi, I’m new to processing and working with Daniel Shiffman’s book. I’d like to display an image pixel by pixel, from top left to bottom right. I tried this code but it does what I ask : it draws a diagonal line (I can …

---

## ['Exploding' or 'dissolving' an ellipse?](https://discourse.processing.org/t/exploding-or-dissolving-an-ellipse/29205)

<div class="topic-metadata">

**Author:** [@gctwnl](https://discourse.processing.org/u/gctwnl)\
**Replies:** 5\
**Last updated:** [April 12, 2021, 12:06pm UTC](https://discourse.processing.org/t/exploding-or-dissolving-an-ellipse/29205 "2021-04-12T12:06:35Z")

</div>

I am new to p5.js (and to Javascript to be honest) and I was wondering if I can (with the help of other libraries if need be) have an ellipse object either explode, go up in smoke, implode, or visually disappear-in-place…

---

## [Masks not working on animated gifs?](https://discourse.processing.org/t/masks-not-working-on-animated-gifs/29243)

<div class="topic-metadata">

**Author:** [@sandersturing](https://discourse.processing.org/u/sandersturing)\
**Replies:** 6\
**Last updated:** [April 12, 2021, 10:37am UTC](https://discourse.processing.org/t/masks-not-working-on-animated-gifs/29243 "2021-04-12T10:37:09Z")

</div>

I’m trying to display animated gifs using planetSurface\[0\] = loadImage('assets/planets/tp.gif'); This works, but I would like to mask them out (using a simple image with a black circle): planetSurface\[this.i\].mask(pla…

---

## [Measuring Reaction Time When A Box Changes Color](https://discourse.processing.org/t/measuring-reaction-time-when-a-box-changes-color/29298)

<div class="topic-metadata">

**Author:** [@lestacos](https://discourse.processing.org/u/lestacos)\
**Replies:** 0\
**Last updated:** [April 12, 2021, 9:51am UTC](https://discourse.processing.org/t/measuring-reaction-time-when-a-box-changes-color/29298 "2021-04-12T09:51:52Z")

</div>

We are tasked with creating a Processing program which measures reaction time of a person. The program should be able to: The user can start the experiment by pressing the SPACE key. At a random time (between 2 and 6 …

---

## [Improve Test Coverage in p5.Sound library - request for review](https://discourse.processing.org/t/improve-test-coverage-in-p5-sound-library-request-for-review/29288)

<div class="topic-metadata">

**Author:** [@bhushan](https://discourse.processing.org/u/bhushan)\
**Replies:** 2\
**Last updated:** [April 12, 2021, 9:33am UTC](https://discourse.processing.org/t/improve-test-coverage-in-p5-sound-library-request-for-review/29288 "2021-04-12T09:33:29Z")

</div>

hey all, I know that the deadline is right around the corner. But I’ve finished the proposal and any review is appreciated.

---

## [P5 instance mode syntax question (createInput() constantly gets error'd not defined)](https://discourse.processing.org/t/p5-instance-mode-syntax-question-createinput-constantly-gets-errord-not-defined/29206)

<div class="topic-metadata">

**Author:** [@NayrbEroom](https://discourse.processing.org/u/NayrbEroom)\
**Replies:** 3\
**Last updated:** [April 12, 2021, 7:34am UTC](https://discourse.processing.org/t/p5-instance-mode-syntax-question-createinput-constantly-gets-errord-not-defined/29206 "2021-04-12T07:34:48Z")

</div>

Hello I have an instanced version of p5.js on my site. I am trying to get a canvas with a createInput method to accept some input from user. This is how it’s defined var sketch3 = function( controller ) { controlle…

---

## [Virtual Keypad Made and Read in the same sketch](https://discourse.processing.org/t/virtual-keypad-made-and-read-in-the-same-sketch/29290)

<div class="topic-metadata">

**Author:** [@edgee](https://discourse.processing.org/u/edgee)\
**Replies:** 1\
**Last updated:** [April 12, 2021, 1:03am UTC](https://discourse.processing.org/t/virtual-keypad-made-and-read-in-the-same-sketch/29290 "2021-04-12T01:03:44Z")

</div>

Hi, I have a project that will have processing program running on an SBC with a touch panel. on one of the GUI screens, values need to be entered in a field. I created a numpad on the screen using ControlP5. for the la…

---

## [Basic Java global variable question](https://discourse.processing.org/t/basic-java-global-variable-question/29230)

<div class="topic-metadata">

**Author:** [@zggong](https://discourse.processing.org/u/zggong)\
**Replies:** 7\
**Last updated:** [April 11, 2021, 8:31pm UTC](https://discourse.processing.org/t/basic-java-global-variable-question/29230 "2021-04-11T20:31:34Z")

</div>

I’m very new to object oriented programming in general, and I have a question about how to instance/work with global variables which might be caused by a lack of understanding of Java/OOP in general rather than being spe…

---

## [Printing console output](https://discourse.processing.org/t/printing-console-output/29279)

<div class="topic-metadata">

**Author:** [@Th3cG](https://discourse.processing.org/u/Th3cG)\
**Replies:** 5\
**Last updated:** [April 11, 2021, 5:42pm UTC](https://discourse.processing.org/t/printing-console-output/29279 "2021-04-11T17:42:40Z")

</div>

Hello, I’m trying to build a small sketch asking a website some weather data. Unfortunately, the site I’m asking data to throws back a 403 error and Processing seems not able to work. So I tried in this way, editing som…

---

## [Create jar file from sketch in java](https://discourse.processing.org/t/create-jar-file-from-sketch-in-java/29267)

<div class="topic-metadata">

**Author:** [@cocconat](https://discourse.processing.org/u/cocconat)\
**Replies:** 3\
**Last updated:** [April 11, 2021, 3:51pm UTC](https://discourse.processing.org/t/create-jar-file-from-sketch-in-java/29267 "2021-04-11T15:51:30Z")

</div>

Hi, I am trying to pack this into a JAR file with IntelliJ IDEA (I can also change IDE if needed, but I d rather stick to this). The project runs in the IDE if I run the file. Honestly, I don’t really know which is the…

---

## [Improving WebGL Functionality: Requesting for review and further suggestion](https://discourse.processing.org/t/improving-webgl-functionality-requesting-for-review-and-further-suggestion/29114)

<div class="topic-metadata">

**Author:** [@Shubham](https://discourse.processing.org/u/Shubham)\
**Replies:** 6\
**Last updated:** [April 11, 2021, 1:18pm UTC](https://discourse.processing.org/t/improving-webgl-functionality-requesting-for-review-and-further-suggestion/29114 "2021-04-11T13:18:55Z")

</div>

Hi there, I’m Shubham Kumar, a current undergrad at IIT Dhanbad. As the title suggests, I’m interested in further improving p5’s WebGL mode. Here’s a draft of my proposal. I would be very grateful for any thoughts on w…

---

## [P5.js serial port and Microbit connection](https://discourse.processing.org/t/p5-js-serial-port-and-microbit-connection/6986)

<div class="topic-metadata">

**Author:** [@loretod](https://discourse.processing.org/u/loretod)\
**Replies:** 10\
**Last updated:** [April 11, 2021, 9:17am UTC](https://discourse.processing.org/t/p5-js-serial-port-and-microbit-connection/6986 "2021-04-11T09:17:05Z")

</div>

I am working on getting the serial communication to work between a Microbit and p5.js. I’m pretty sure the Microbit side of the project is working since I am able to see the serial write in my terminal. On the p5.js sid…

---

## [Help understanding Instance mode vs "normal mode"](https://discourse.processing.org/t/help-understanding-instance-mode-vs-normal-mode/29262)

<div class="topic-metadata">

**Author:** [@edufissure](https://discourse.processing.org/u/edufissure)\
**Replies:** 3\
**Last updated:** [April 11, 2021, 9:05am UTC](https://discourse.processing.org/t/help-understanding-instance-mode-vs-normal-mode/29262 "2021-04-11T09:05:03Z")

</div>

please format code with \</\> button \* homework policy \* asking questions So i dont understand why to use instance mode. First i thought that putting “myContainer” i could add class and css position and integrate in a …

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

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