# Processing

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

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

**Page:** 155

---

## [Scrolling Graph Serial](https://discourse.processing.org/t/scrolling-graph-serial/27169)

<div class="topic-metadata">

**Author:** [@saaqib.m](https://discourse.processing.org/u/saaqib.m)\
**Replies:** 3\
**Last updated:** [January 21, 2021, 8:10am UTC](https://discourse.processing.org/t/scrolling-graph-serial/27169 "2021-01-21T08:10:44Z")

</div>

I am trying to plot the values coming in from the serial port into a scrolling graph. Right now it it displaying some value but not what I want. It should plot every time ReadStringUntill gets to a new line etc. Any idea…

---

## [Error: NullPointerException](https://discourse.processing.org/t/error-nullpointerexception/27251)

<div class="topic-metadata">

**Author:** [@christiank79](https://discourse.processing.org/u/christiank79)\
**Replies:** 1\
**Last updated:** [January 20, 2021, 9:36pm UTC](https://discourse.processing.org/t/error-nullpointerexception/27251 "2021-01-20T21:36:44Z")

</div>

Hello, I have a problem to solve this coding in Java in 16th line, show me an error: NullPointerException. What can I do? Below is the code: import processing.svg.\*; PImage img; float theta= 31; float k = 11; float r =…

---

## [Player Health & Collision not working properly together](https://discourse.processing.org/t/player-health-collision-not-working-properly-together/27244)

<div class="topic-metadata">

**Author:** [@vvitch](https://discourse.processing.org/u/vvitch)\
**Replies:** 3\
**Last updated:** [January 20, 2021, 9:25pm UTC](https://discourse.processing.org/t/player-health-collision-not-working-properly-together/27244 "2021-01-20T21:25:41Z")

</div>

For some reason, in the game that I am attempting to make for a class project whenever the player hits an asteroid at speed, the playerHealth variable goes down by multiple numbers instead of by one. The below are functi…

---

## [Help needed please in code](https://discourse.processing.org/t/help-needed-please-in-code/27241)

<div class="topic-metadata">

**Author:** [@IRIGIMA](https://discourse.processing.org/u/IRIGIMA)\
**Replies:** 6\
**Last updated:** [January 20, 2021, 5:54pm UTC](https://discourse.processing.org/t/help-needed-please-in-code/27241 "2021-01-20T17:54:56Z")

</div>

Within setup and main. I am creating a pg graphics at x,y resolution, placing a value in centre. Then randomly choosing a point. If the point = centre then x,y found. Wth am I doing wrong?? PGraphics pg; float col=10; …

---

## [Can anyone help me with collision for player (Platformer)](https://discourse.processing.org/t/can-anyone-help-me-with-collision-for-player-platformer/27164)

<div class="topic-metadata">

**Author:** [@deiwy](https://discourse.processing.org/u/deiwy)\
**Replies:** 2\
**Last updated:** [January 20, 2021, 5:34pm UTC](https://discourse.processing.org/t/can-anyone-help-me-with-collision-for-player-platformer/27164 "2021-01-20T17:34:58Z")

</div>

player p; ArrayList\<Platform\> platforms = new ArrayList(); boolean\[\] keys = new boolean\[2\]; int\[\]\[\] map = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {1, 1, 1, 0, 0, 1, 0, 0, 0…

---

## [Geomerative: intersection not accurate](https://discourse.processing.org/t/geomerative-intersection-not-accurate/27210)

<div class="topic-metadata">

**Author:** [@robottini](https://discourse.processing.org/u/robottini)\
**Replies:** 1\
**Last updated:** [January 20, 2021, 10:40am UTC](https://discourse.processing.org/t/geomerative-intersection-not-accurate/27210 "2021-01-20T10:40:54Z")

</div>

I draw a simple intersection between two rectangles but the result is not accurate. The simple code is: import geomerative.\*; void setup() { size(600, 400); smooth(); background(255); noFill(); RG.init(thi…

---

## [Generative 3D Shapes](https://discourse.processing.org/t/generative-3d-shapes/27213)

<div class="topic-metadata">

**Author:** [@maneschka](https://discourse.processing.org/u/maneschka)\
**Replies:** 1\
**Last updated:** [January 20, 2021, 8:29am UTC](https://discourse.processing.org/t/generative-3d-shapes/27213 "2021-01-20T08:29:51Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hi! Does somebody have a cool tutorial for learning how to do 3D Generative Shapes? Thanks!

---

## [Timer after button pressed](https://discourse.processing.org/t/timer-after-button-pressed/27209)

<div class="topic-metadata">

**Author:** [@saaqib.m](https://discourse.processing.org/u/saaqib.m)\
**Replies:** 9\
**Last updated:** [January 19, 2021, 10:24pm UTC](https://discourse.processing.org/t/timer-after-button-pressed/27209 "2021-01-19T22:24:53Z")

</div>

please format code with \</\> button \* homework policy \* asking questions After I run a program, I want my timer to start. Currently I am using millis()/1000 just for the seconds but I want to make the timer so that it…

---

## [Simple Arduino Tutorial: How to make Canbus Communicate with DHT11](https://discourse.processing.org/t/simple-arduino-tutorial-how-to-make-canbus-communicate-with-dht11/27216)

<div class="topic-metadata">

**Author:** [@Makerhe](https://discourse.processing.org/u/Makerhe)\
**Replies:** 0\
**Last updated:** [January 20, 2021, 6:02am UTC](https://discourse.processing.org/t/simple-arduino-tutorial-how-to-make-canbus-communicate-with-dht11/27216 "2021-01-20T06:02:09Z")

</div>

In this project, we will learn how to use Arduino code to implement CANBUS communication with DHT11 sensor. I also used an OLED in this project, so we can display the temperature and humidity on it. Check details on this…

---

## [Replace words with different synonyms and print each combination in a text file](https://discourse.processing.org/t/replace-words-with-different-synonyms-and-print-each-combination-in-a-text-file/27110)

<div class="topic-metadata">

**Author:** [@Sophie](https://discourse.processing.org/u/Sophie)\
**Replies:** 17\
**Last updated:** [January 18, 2021, 9:23am UTC](https://discourse.processing.org/t/replace-words-with-different-synonyms-and-print-each-combination-in-a-text-file/27110 "2021-01-18T09:23:58Z")

</div>

Hello, My goal is to replace words from a String with synonyms. Right now the code can replace one word with another one and write the sentence in my text file. But I would like to have different opportunities to replac…

---

## [Replace first character of string](https://discourse.processing.org/t/replace-first-character-of-string/27000)

<div class="topic-metadata">

**Author:** [@vestergaard12](https://discourse.processing.org/u/vestergaard12)\
**Replies:** 21\
**Last updated:** [January 19, 2021, 11:01am UTC](https://discourse.processing.org/t/replace-first-character-of-string/27000 "2021-01-19T11:01:27Z")

</div>

Hello Processing Foundation I have this coding question, which I really hope someone will help me to solve: This is my code so far: String\[\] words = {"hello", "how", "helicopter", "who", "which", "that", "okay"}; //ju…

---

## [Moved PImage from one side to the screen to another in loop](https://discourse.processing.org/t/moved-pimage-from-one-side-to-the-screen-to-another-in-loop/27194)

<div class="topic-metadata">

**Author:** [@mchangxe](https://discourse.processing.org/u/mchangxe)\
**Replies:** 4\
**Last updated:** [January 20, 2021, 2:52am UTC](https://discourse.processing.org/t/moved-pimage-from-one-side-to-the-screen-to-another-in-loop/27194 "2021-01-20T02:52:53Z")

</div>

Hi guys, i want to move an image across the screen from right to the left. However, one complication is that when part of the image moves beyond the left side of the screen, i want it to show up on the right side of the…

---

## [Update screen immediately](https://discourse.processing.org/t/update-screen-immediately/26856)

<div class="topic-metadata">

**Author:** [@edumanilha](https://discourse.processing.org/u/edumanilha)\
**Replies:** 9\
**Last updated:** [January 19, 2021, 11:45pm UTC](https://discourse.processing.org/t/update-screen-immediately/26856 "2021-01-19T23:45:07Z")

</div>

Hi everyone! How are you people doing? I need some help… I put a button on my script to change some values on screen, but I set framerate to update every second, so every time I click the value take some time to update…

---

## [Drawing order of Objects in an Arraylist](https://discourse.processing.org/t/drawing-order-of-objects-in-an-arraylist/27160)

<div class="topic-metadata">

**Author:** [@Gine6g](https://discourse.processing.org/u/Gine6g)\
**Replies:** 21\
**Last updated:** [January 19, 2021, 9:05pm UTC](https://discourse.processing.org/t/drawing-order-of-objects-in-an-arraylist/27160 "2021-01-19T21:05:41Z")

</div>

I didnt knew how to name this. But I got a class with multiple other classes that inherit from the main one. Now when I clicking I can add one of the Objects to the Sketch and all the Objects are held withing an Arrayli…

---

## [How to enter unlimited parameters info a function](https://discourse.processing.org/t/how-to-enter-unlimited-parameters-info-a-function/27207)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 2\
**Last updated:** [January 19, 2021, 9:27pm UTC](https://discourse.processing.org/t/how-to-enter-unlimited-parameters-info-a-function/27207 "2021-01-19T21:27:51Z")

</div>

Hi! I’d like to know if there is a way to insert unlimited number of parameters into a custom function. I want to replicate things like: println(i1,i2,i3,i4,i5,...); The way I do it right now is by doing: void aaa(…

---

## [How to pass parameters into a thread function](https://discourse.processing.org/t/how-to-pass-parameters-into-a-thread-function/27204)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 1\
**Last updated:** [January 19, 2021, 8:51pm UTC](https://discourse.processing.org/t/how-to-pass-parameters-into-a-thread-function/27204 "2021-01-19T20:51:16Z")

</div>

Hi! I recently came across the function thread. However when I tried to use the function void setup() {thread("timer");} void draw() {background(frameCount % 255);} void timer(int delay, int rep) { for(int i = 0; i \<…

---

## [Project guidance](https://discourse.processing.org/t/project-guidance/27115)

<div class="topic-metadata">

**Author:** [@yhlaskerimov](https://discourse.processing.org/u/yhlaskerimov)\
**Replies:** 20\
**Last updated:** [January 19, 2021, 1:16pm UTC](https://discourse.processing.org/t/project-guidance/27115 "2021-01-19T13:16:09Z")

</div>

Hi, everyone ! I need to achieve this effect. But I don’t know how to achieve it. Can anyone give me some tips how to do it ? Thank you ! I appreciate very help !

---

## [Screenshot with CTRL + S](https://discourse.processing.org/t/screenshot-with-ctrl-s/27203)

<div class="topic-metadata">

**Author:** [@Lukerfull](https://discourse.processing.org/u/Lukerfull)\
**Replies:** 4\
**Last updated:** [January 19, 2021, 6:36pm UTC](https://discourse.processing.org/t/screenshot-with-ctrl-s/27203 "2021-01-19T18:36:17Z")

</div>

Hi, I’ve been struggling with this for a long time today. I’m trying to make screenshots with ctrl and s but it doesn’t work. Can anyone help me? Thanks. This is what I tried: boolean ctrlPressed; void keyPressed() { …

---

## [Sketch GUI in different Operating Systems](https://discourse.processing.org/t/sketch-gui-in-different-operating-systems/27176)

<div class="topic-metadata">

**Author:** [@r.jaoui](https://discourse.processing.org/u/r.jaoui)\
**Replies:** 2\
**Last updated:** [January 19, 2021, 5:12pm UTC](https://discourse.processing.org/t/sketch-gui-in-different-operating-systems/27176 "2021-01-19T17:12:01Z")

</div>

Hello ! Alright so I’ve been trying to work with OpenGL recently, writing and executing shaders… But another issue that I’m facing is that having a resizable P2D sketch isn’t actually that simple, the resizing is very b…

---

## [How to get X, Y of the face with open cv?](https://discourse.processing.org/t/how-to-get-x-y-of-the-face-with-open-cv/27183)

<div class="topic-metadata">

**Author:** [@LoneFalconer](https://discourse.processing.org/u/LoneFalconer)\
**Replies:** 3\
**Last updated:** [January 19, 2021, 4:48pm UTC](https://discourse.processing.org/t/how-to-get-x-y-of-the-face-with-open-cv/27183 "2021-01-19T16:48:52Z")

</div>

Hello, I am pretty new to programming in java and am looking for a way to get the x and y chords of a face detected with OpenCV. I then want to use these chords in another function. Is there documentation on the OpenCV…

---

## [Highlighting tiles in range x](https://discourse.processing.org/t/highlighting-tiles-in-range-x/27193)

<div class="topic-metadata">

**Author:** [@lancelot](https://discourse.processing.org/u/lancelot)\
**Replies:** 4\
**Last updated:** [January 19, 2021, 4:15pm UTC](https://discourse.processing.org/t/highlighting-tiles-in-range-x/27193 "2021-01-19T16:15:45Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hello everybody, I’ve been working on this code a few days, and I’m out of ideas. My goal is to highlight tiles inside of the movement range. I…

---

## [Why is my Ico-Sphere not a Sphere](https://discourse.processing.org/t/why-is-my-ico-sphere-not-a-sphere/27190)

<div class="topic-metadata">

**Author:** [@JALAJ\_0106](https://discourse.processing.org/u/JALAJ_0106)\
**Replies:** 3\
**Last updated:** [January 19, 2021, 2:46pm UTC](https://discourse.processing.org/t/why-is-my-ico-sphere-not-a-sphere/27190 "2021-01-19T14:46:59Z")

</div>

please format code with \</\> button \* homework policy \* asking questions \<public class isoSphere { Icosehedron ico = new Icosehedron(); ArrayList vNew; ArrayList cul; ArrayList vecL = new ArrayList(); ArrayList d…

---

## [Write a string in multiple code lines](https://discourse.processing.org/t/write-a-string-in-multiple-code-lines/27196)

<div class="topic-metadata">

**Author:** [@JonasAvory1](https://discourse.processing.org/u/JonasAvory1)\
**Replies:** 5\
**Last updated:** [January 19, 2021, 1:15pm UTC](https://discourse.processing.org/t/write-a-string-in-multiple-code-lines/27196 "2021-01-19T13:15:48Z")

</div>

So, I’m trying to write a simple HTML server with processing (I know processing isn’t the best program to use, but I didn’t want to learn a new tool). The String my server’s supposed to send back is very long, so I want…

---

## [Problem with geomerative and list](https://discourse.processing.org/t/problem-with-geomerative-and-list/27199)

<div class="topic-metadata">

**Author:** [@robottini](https://discourse.processing.org/u/robottini)\
**Replies:** 4\
**Last updated:** [January 19, 2021, 1:04pm UTC](https://discourse.processing.org/t/problem-with-geomerative-and-list/27199 "2021-01-19T13:04:09Z")

</div>

I have a problem with geomerative and a list of shapes. I think it is trivial, but I don’t understand my error. If I use this sketch I don’t have any problem. import geomerative.\*; void setup() { size(800, 400); …

---

## [Displaying a single pixel on LED display showed two LEDs lit up](https://discourse.processing.org/t/displaying-a-single-pixel-on-led-display-showed-two-leds-lit-up/27009)

<div class="topic-metadata">

**Author:** [@mchangxe](https://discourse.processing.org/u/mchangxe)\
**Replies:** 2\
**Last updated:** [January 19, 2021, 9:38am UTC](https://discourse.processing.org/t/displaying-a-single-pixel-on-led-display-showed-two-leds-lit-up/27009 "2021-01-19T09:38:57Z")

</div>

In my processing program, I am setting just a single pixel to red, however on my LED screen, two LED lights lit up red, with one dimmer than the other. How can I make sure that only 1 LED light lights up? I have set the…

---

## [How can I load the video without affecting the overall process？](https://discourse.processing.org/t/how-can-i-load-the-video-without-affecting-the-overall-process/26964)

<div class="topic-metadata">

**Author:** [@AbleYudada](https://discourse.processing.org/u/AbleYudada)\
**Replies:** 7\
**Last updated:** [January 19, 2021, 7:14am UTC](https://discourse.processing.org/t/how-can-i-load-the-video-without-affecting-the-overall-process/26964 "2021-01-19T07:14:30Z")

</div>

Hi guys,！Recently when I used the particle system, I clicked to generate a video and the whole was stuck. After the video was loaded, the fps would be restored. Is there any good way to solve this problem？

---

## [Processing 4 macOS Video still not working?](https://discourse.processing.org/t/processing-4-macos-video-still-not-working/27187)

<div class="topic-metadata">

**Author:** [@shimulc](https://discourse.processing.org/u/shimulc)\
**Replies:** 0\
**Last updated:** [January 19, 2021, 5:19am UTC](https://discourse.processing.org/t/processing-4-macos-video-still-not-working/27187 "2021-01-19T05:19:11Z")

</div>

Apologies because I know it has not been long since 4.0 alpha 3 has been released but I have been trying to run the basic GettingStartedCapture example and still do not see the macOS security dialog to allow access to my…

---

## [Calling processing sketches within a processing sketch](https://discourse.processing.org/t/calling-processing-sketches-within-a-processing-sketch/27167)

<div class="topic-metadata">

**Author:** [@jackeddielove](https://discourse.processing.org/u/jackeddielove)\
**Replies:** 2\
**Last updated:** [January 18, 2021, 8:41pm UTC](https://discourse.processing.org/t/calling-processing-sketches-within-a-processing-sketch/27167 "2021-01-18T20:41:48Z")

</div>

My processing code is getting very long. I’m essentially building a slideshow. Is it possible to build each slide individually and then call each one in the main program? This is the kind of thing I did when writing my …

---

## [Record your programm?](https://discourse.processing.org/t/record-your-programm/27175)

<div class="topic-metadata">

**Author:** [@NumericPrime](https://discourse.processing.org/u/NumericPrime)\
**Replies:** 3\
**Last updated:** [January 18, 2021, 8:17pm UTC](https://discourse.processing.org/t/record-your-programm/27175 "2021-01-18T20:17:49Z")

</div>

I have written a programm, that paints images using epicycles and now I want to record it. However everything I managed to find was recording videos using a cam. Could you help me with this?

---

## [Scrolling Graph](https://discourse.processing.org/t/scrolling-graph/27168)

<div class="topic-metadata">

**Author:** [@saaqib.m](https://discourse.processing.org/u/saaqib.m)\
**Replies:** 1\
**Last updated:** [January 18, 2021, 6:50pm UTC](https://discourse.processing.org/t/scrolling-graph/27168 "2021-01-18T18:50:51Z")

</div>

Hi, I am trying to plot the values coming in from the serial port into a scrolling graph. Right now it it displaying some value but not what I want. It should plot every time ReadStringUntill gets to a new line etc. Any …

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

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