# Latest

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

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

**Page:** 245

---

## [Aiming marbles away from a central point](https://discourse.processing.org/t/aiming-marbles-away-from-a-central-point/28535)

<div class="topic-metadata">

**Author:** [@ottenm](https://discourse.processing.org/u/ottenm)\
**Replies:** 3\
**Last updated:** [March 15, 2021, 11:28am UTC](https://discourse.processing.org/t/aiming-marbles-away-from-a-central-point/28535 "2021-03-15T11:28:23Z")

</div>

I have a sketch that simulates marbles bumping into each other. Each marble has one PVector for ‘location’ and another one for ‘velocity’. location.add(velocity) moves the marble to it’s next location, slowly for small…

---

## [Help creating a Tool to autoformat the code inside the Processing IDE when in Python Mode](https://discourse.processing.org/t/help-creating-a-tool-to-autoformat-the-code-inside-the-processing-ide-when-in-python-mode/27990)

<div class="topic-metadata">

**Author:** [@villares](https://discourse.processing.org/u/villares)\
**Replies:** 2\
**Last updated:** [March 15, 2021, 8:07am UTC](https://discourse.processing.org/t/help-creating-a-tool-to-autoformat-the-code-inside-the-processing-ide-when-in-python-mode/27990 "2021-03-15T08:07:55Z")

</div>

Processing Python mode autoformat (Ctrl + T) has been broken for a long time, and it depends on a socket (?), a local network connection that can often break. I would like someone versed on Eclipse and Processing Tool m…

---

## [PVector orbitPosition](https://discourse.processing.org/t/pvector-orbitposition/28542)

<div class="topic-metadata">

**Author:** [@jafal](https://discourse.processing.org/u/jafal)\
**Replies:** 0\
**Last updated:** [March 15, 2021, 5:03am UTC](https://discourse.processing.org/t/pvector-orbitposition/28542 "2021-03-15T05:03:39Z")

</div>

PVector orbitPosition; void setup() { size(800, 800, P3D); smooth(8); } void draw() { background(0); ambientLight(128,128,128); directionalLight(128,128,128,1,1,0); orbitPosition = new PVector(1, -1, 1)…

---

## [Loop through serial ports](https://discourse.processing.org/t/loop-through-serial-ports/28442)

<div class="topic-metadata">

**Author:** [@Konstanitn](https://discourse.processing.org/u/Konstanitn)\
**Replies:** 4\
**Last updated:** [March 15, 2021, 2:23am UTC](https://discourse.processing.org/t/loop-through-serial-ports/28442 "2021-03-15T02:23:07Z")

</div>

Loop through serial ports Hello, I am trying to make a while loop for searching of the right serial port. I get the “RuntimeException: Error opening serial port COM4: Port busy” error probably because the port connecti…

---

## [Error writing to serial: port not opened after already reading from serial](https://discourse.processing.org/t/error-writing-to-serial-port-not-opened-after-already-reading-from-serial/28521)

<div class="topic-metadata">

**Author:** [@junorox](https://discourse.processing.org/u/junorox)\
**Replies:** 3\
**Last updated:** [March 15, 2021, 1:46am UTC](https://discourse.processing.org/t/error-writing-to-serial-port-not-opened-after-already-reading-from-serial/28521 "2021-03-15T01:46:11Z")

</div>

I’m trying to create a code that works with arduino by sending commands back and forth between the two. Processing is receiving commands from arduino easily enough but Processing is giving error “RuntimeException: Error …

---

## [My validation for my rogue-like dungeon generation has gone wrong?](https://discourse.processing.org/t/my-validation-for-my-rogue-like-dungeon-generation-has-gone-wrong/28505)

<div class="topic-metadata">

**Author:** [@ekay](https://discourse.processing.org/u/ekay)\
**Replies:** 2\
**Last updated:** [March 14, 2021, 10:31pm UTC](https://discourse.processing.org/t/my-validation-for-my-rogue-like-dungeon-generation-has-gone-wrong/28505 "2021-03-14T22:31:42Z")

</div>

Hi everyone! I am currently writing a piece of code which randomly generates a cluster of black squares on a grid of white squares, represented using a 2D array. Each number in my code corresponds to a different coloure…

---

## [Can someone Help me? (highscore)](https://discourse.processing.org/t/can-someone-help-me-highscore/28453)

<div class="topic-metadata">

**Author:** [@Rogo](https://discourse.processing.org/u/Rogo)\
**Replies:** 6\
**Last updated:** [March 14, 2021, 7:46pm UTC](https://discourse.processing.org/t/can-someone-help-me-highscore/28453 "2021-03-14T19:46:42Z")

</div>

I need Help with the Score / highscore… can someone Help me please? import android.content.SharedPreferences; import android.preference.PreferenceManager; import android.content.Context; import android.app.Activity; Act…

---

## [March 14 is Pi Day](https://discourse.processing.org/t/march-14-is-pi-day/28516)

<div class="topic-metadata">

**Author:** [@javagar](https://discourse.processing.org/u/javagar)\
**Replies:** 0\
**Last updated:** [March 14, 2021, 2:04am UTC](https://discourse.processing.org/t/march-14-is-pi-day/28516 "2021-03-14T02:04:42Z")

</div>

March 14 is Pi Day, so let’s use a Monte Carlo method to estimate π. See: Wikipedia: Pi Wikipedia: Pi Day One Monte Carlo method for computing π is to draw a circle inscribed in a square, and randomly place dots in …

---

## [Need help with slider](https://discourse.processing.org/t/need-help-with-slider/28512)

<div class="topic-metadata">

**Author:** [@Jemo](https://discourse.processing.org/u/Jemo)\
**Replies:** 2\
**Last updated:** [March 14, 2021, 6:25pm UTC](https://discourse.processing.org/t/need-help-with-slider/28512 "2021-03-14T18:25:29Z")

</div>

So I have a slider and it works and all but how do I get the output to be used as a variable? basically when I move the slider it supposed to change the angle of a force but its not working. thanks

---

## [How to show terrain and 3d grid](https://discourse.processing.org/t/how-to-show-terrain-and-3d-grid/28491)

<div class="topic-metadata">

**Author:** [@jafal](https://discourse.processing.org/u/jafal)\
**Replies:** 15\
**Last updated:** [March 14, 2021, 5:52pm UTC](https://discourse.processing.org/t/how-to-show-terrain-and-3d-grid/28491 "2021-03-14T17:52:32Z")

</div>

@Chrisir hi i need some help if you kind i want to add this 3d rects to this sketch int cols, rows; int scl = 26; int w = 2800; int h = 2600; boolean showImage = true; PImage img; void setup() { size(800, 8…

---

## [GSOC '21 - Introduction and Queries](https://discourse.processing.org/t/gsoc-21-introduction-and-queries/28533)

<div class="topic-metadata">

**Author:** [@akki](https://discourse.processing.org/u/akki)\
**Replies:** 1\
**Last updated:** [March 14, 2021, 3:31pm UTC](https://discourse.processing.org/t/gsoc-21-introduction-and-queries/28533 "2021-03-14T15:31:59Z")

</div>

Hey everyone! I am Akshita Singh, a 1st year Electronics and Communications undergraduate student from Amrita Vishwa Vidyapeetham, Amritapuri. I would like to work with the Processing Foundation for GSoC '21. How can I …

---

## [ArrayIndexOutOfBoundsException: 1024](https://discourse.processing.org/t/arrayindexoutofboundsexception-1024/28522)

<div class="topic-metadata">

**Author:** [@babatnvn](https://discourse.processing.org/u/babatnvn)\
**Replies:** 7\
**Last updated:** [March 14, 2021, 3:24pm UTC](https://discourse.processing.org/t/arrayindexoutofboundsexception-1024/28522 "2021-03-14T15:24:28Z")

</div>

Dear everyone; when I compile a code in the processing. it has an error like this picture. Please how to fix it. Many thanks.!

---

## [Please help me with move my ellipse](https://discourse.processing.org/t/please-help-me-with-move-my-ellipse/28526)

<div class="topic-metadata">

**Author:** [@olia](https://discourse.processing.org/u/olia)\
**Replies:** 6\
**Last updated:** [March 14, 2021, 1:37pm UTC](https://discourse.processing.org/t/please-help-me-with-move-my-ellipse/28526 "2021-03-14T13:37:28Z")

</div>

im not that good in english, sorry. so i have ellipse that moves from the center to the edges. I need it to move back to the center when I click the mouse int rad = 40; // Width of the shape float xpos, ypos; …

---

## [How to draw a curveVertex with color gradient?](https://discourse.processing.org/t/how-to-draw-a-curvevertex-with-color-gradient/28513)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 3\
**Last updated:** [March 14, 2021, 11:25am UTC](https://discourse.processing.org/t/how-to-draw-a-curvevertex-with-color-gradient/28513 "2021-03-14T11:25:40Z")

</div>

Drawing a color gradient with a line, even in 3D, is pretty straight-forward: import peasy.\*; PeasyCam cam; void setup() { size(1300, 1300, P3D); cam = new PeasyCam(this, 200); } void draw() { background(255); …

---

## [Troubleshooting global null pointer exception](https://discourse.processing.org/t/troubleshooting-global-null-pointer-exception/28437)

<div class="topic-metadata">

**Author:** [@toby](https://discourse.processing.org/u/toby)\
**Replies:** 4\
**Last updated:** [March 14, 2021, 10:54am UTC](https://discourse.processing.org/t/troubleshooting-global-null-pointer-exception/28437 "2021-03-14T10:54:35Z")

</div>

Hello Processing chums! I have a quite large multi-tab Processing program which is suddenly and unexpectedly failing to startup (I suspect because of a trivial one-character editing accident or something, but due to a d…

---

## [Splitting the String into multiple Arrays and Converting it to an int](https://discourse.processing.org/t/splitting-the-string-into-multiple-arrays-and-converting-it-to-an-int/28502)

<div class="topic-metadata">

**Author:** [@Nick2](https://discourse.processing.org/u/Nick2)\
**Replies:** 3\
**Last updated:** [March 14, 2021, 6:07am UTC](https://discourse.processing.org/t/splitting-the-string-into-multiple-arrays-and-converting-it-to-an-int/28502 "2021-03-14T06:07:39Z")

</div>

Hi I am a bit new to processing and do not really know that much. I managed to display some serial data, but what I really need is a GUI to show the temperature from multiple ds18b20 sensors. but I need some help with Sp…

---

## [Augmented Reality | Help!](https://discourse.processing.org/t/augmented-reality-help/28301)

<div class="topic-metadata">

**Author:** [@brittneyjuliet](https://discourse.processing.org/u/brittneyjuliet)\
**Replies:** 1\
**Last updated:** [March 14, 2021, 2:15am UTC](https://discourse.processing.org/t/augmented-reality-help/28301 "2021-03-14T02:15:42Z")

</div>

Hi All, I’m working with ar within Processing for Android’s framework and I seem to have gotten stuck. I’ve utilized Andres Colubri’s \[fantastic\] tutorials at android.processing.org as well as the included ar tutorials …

---

## [Displaying a p5.Table in an HTML table outside the canvas](https://discourse.processing.org/t/displaying-a-p5-table-in-an-html-table-outside-the-canvas/28514)

<div class="topic-metadata">

**Author:** [@charcoaler](https://discourse.processing.org/u/charcoaler)\
**Replies:** 0\
**Last updated:** [March 14, 2021, 12:05am UTC](https://discourse.processing.org/t/displaying-a-p5-table-in-an-html-table-outside-the-canvas/28514 "2021-03-14T00:05:38Z")

</div>

Hi, I wrote this function to display an p5.Table as HTML table outside the canvas for my project and I thought it might be useful to others. It might take me a while to figure out how to use git to contribute to the tabl…

---

## [How to calculate good-looking bezier control points in 3D?](https://discourse.processing.org/t/how-to-calculate-good-looking-bezier-control-points-in-3d/28504)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 6\
**Last updated:** [March 13, 2021, 10:33pm UTC](https://discourse.processing.org/t/how-to-calculate-good-looking-bezier-control-points-in-3d/28504 "2021-03-13T22:33:24Z")

</div>

I’d like to draw Bezier curves algorithmically, i.e. I’d like the control points to be functions of two data points. Assuming the following Bezier curve: I imagine P0, P1, and P2 form an obtuse triangle where the angl…

---

## [How to zoom into an image (but at a certain point) with scale](https://discourse.processing.org/t/how-to-zoom-into-an-image-but-at-a-certain-point-with-scale/28510)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 2\
**Last updated:** [March 13, 2021, 9:29pm UTC](https://discourse.processing.org/t/how-to-zoom-into-an-image-but-at-a-certain-point-with-scale/28510 "2021-03-13T21:29:10Z")

</div>

Hello all, I have a question: I want to animate the zoom into an image, but not into its center, but into a certain area of the image (e.g. a dog or cat (or where I click the mouse) on a much bigger image). I use scal…

---

## [Export application with Video (webcam access) not working](https://discourse.processing.org/t/export-application-with-video-webcam-access-not-working/25494)

<div class="topic-metadata">

**Author:** [@romano](https://discourse.processing.org/u/romano)\
**Replies:** 3\
**Last updated:** [March 13, 2021, 9:03pm UTC](https://discourse.processing.org/t/export-application-with-video-webcam-access-not-working/25494 "2021-03-13T21:03:03Z")

</div>

I made a small tool in Processing 3.5.4 that I would like to export as a standalone application on Windows 10 Home (v. 1909). If I leave out the webcam functionality, the app runs just fine, but as soon as I try to acce…

---

## [How to clone Object without modifying original?](https://discourse.processing.org/t/how-to-clone-object-without-modifying-original/28496)

<div class="topic-metadata">

**Author:** [@EinsMalteHH](https://discourse.processing.org/u/EinsMalteHH)\
**Replies:** 3\
**Last updated:** [March 13, 2021, 8:41pm UTC](https://discourse.processing.org/t/how-to-clone-object-without-modifying-original/28496 "2021-03-13T20:41:16Z")

</div>

I have an array of a class, that I want to clone. But if I modify the clone, the original gets modified to. Now is the question, how can i clone an array of classes without it modifying the original?

---

## [Find the number of elements in a single row](https://discourse.processing.org/t/find-the-number-of-elements-in-a-single-row/28487)

<div class="topic-metadata">

**Author:** [@Criste44](https://discourse.processing.org/u/Criste44)\
**Replies:** 7\
**Last updated:** [March 13, 2021, 4:50pm UTC](https://discourse.processing.org/t/find-the-number-of-elements-in-a-single-row/28487 "2021-03-13T16:50:38Z")

</div>

hello … \[8, 8\] I have a two dimensional array, while the game is going on I want to find out how many objects are in a single line … not the whole array, just one line, example \[i, 7\] …

---

## [How to add values to array based on condition? (read two files)](https://discourse.processing.org/t/how-to-add-values-to-array-based-on-condition-read-two-files/28340)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 12\
**Last updated:** [March 13, 2021, 4:35pm UTC](https://discourse.processing.org/t/how-to-add-values-to-array-based-on-condition-read-two-files/28340 "2021-03-13T16:35:41Z")

</div>

I have data from two csv files that I import as Tables. The first file contains country names and their population. The second file contains migration flows between countries over 4 time periods. The files would look lik…

---

## [Are the project ideas up to date?](https://discourse.processing.org/t/are-the-project-ideas-up-to-date/28490)

<div class="topic-metadata">

**Author:** [@Swapnil](https://discourse.processing.org/u/Swapnil)\
**Replies:** 2\
**Last updated:** [March 13, 2021, 3:22pm UTC](https://discourse.processing.org/t/are-the-project-ideas-up-to-date/28490 "2021-03-13T15:22:38Z")

</div>

Hi, it’s been a while since GSOC organizations were announced but the project list provided by the Processing Foundation looks very similar to last year’s. Just wanted to clarify whether we should wait for some more time…

---

## [Handling color in eclipse with processing](https://discourse.processing.org/t/handling-color-in-eclipse-with-processing/28497)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 2\
**Last updated:** [March 13, 2021, 3:20pm UTC](https://discourse.processing.org/t/handling-color-in-eclipse-with-processing/28497 "2021-03-13T15:20:22Z")

</div>

Hi guys I’m hoping you can help please I’m a bit stuck. When trying to convert my code to a library I ran into the following problem, color is not recognised as a data type. I have found the following posts online aski…

---

## [How to erase an object inside of an array?](https://discourse.processing.org/t/how-to-erase-an-object-inside-of-an-array/28499)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 1\
**Last updated:** [March 13, 2021, 2:46pm UTC](https://discourse.processing.org/t/how-to-erase-an-object-inside-of-an-array/28499 "2021-03-13T14:46:47Z")

</div>

Lets say I have an ArrayList of a class of objects. How would I be able to do erase it from within the class. Something like ArrayList\<newClass\> newClassList = new ArrayList\<newClass\>(); newClassList.add(newClass()); cl…

---

## [Connect and Disconnect events not working on webSocketSever](https://discourse.processing.org/t/connect-and-disconnect-events-not-working-on-websocketsever/28252)

<div class="topic-metadata">

**Author:** [@yeppii](https://discourse.processing.org/u/yeppii)\
**Replies:** 19\
**Last updated:** [March 13, 2021, 2:22pm UTC](https://discourse.processing.org/t/connect-and-disconnect-events-not-working-on-websocketsever/28252 "2021-03-13T14:22:13Z")

</div>

These two functions are not getting called by WebSocketServer. What to do to solve it? (I am using this library → https://github.com/alexandrainst/processing\_websockets) public void webSocketConnectEvent(String uid,…

---

## [Loading multiple models with a for loop?](https://discourse.processing.org/t/loading-multiple-models-with-a-for-loop/28395)

<div class="topic-metadata">

**Author:** [@lucienfradet](https://discourse.processing.org/u/lucienfradet)\
**Replies:** 2\
**Last updated:** [March 13, 2021, 2:20pm UTC](https://discourse.processing.org/t/loading-multiple-models-with-a-for-loop/28395 "2021-03-13T14:20:03Z")

</div>

Hello! I’m trying to load 15 different 3D models in P5 and make them appear at specific time. Is there a way to load models with a “for loop” and place the models in an array? I’m a complete beginner :confused: Here’s…

---

## [Unable to load processing.core.ThinkDifferent methods](https://discourse.processing.org/t/unable-to-load-processing-core-thinkdifferent-methods/28481)

<div class="topic-metadata">

**Author:** [@MauiMana](https://discourse.processing.org/u/MauiMana)\
**Replies:** 1\
**Last updated:** [March 13, 2021, 8:35am UTC](https://discourse.processing.org/t/unable-to-load-processing-core-thinkdifferent-methods/28481 "2021-03-13T08:35:02Z")

</div>

EDIT - it was the java version (15 vs 1.8). I was aware of Processing’s java version restrictions (1.8 but w/o lambdas, etc.) but didn’t think it would affect being able to inspect the ThinkDifferent class. In any case, …

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

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