# Processing

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

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

**Page:** 141

---

## [Physics (Gravity)](https://discourse.processing.org/t/physics-gravity/29047)

<div class="topic-metadata">

**Author:** [@paulstgeorge](https://discourse.processing.org/u/paulstgeorge)\
**Replies:** 5\
**Last updated:** [April 2, 2021, 6:28am UTC](https://discourse.processing.org/t/physics-gravity/29047 "2021-04-02T06:28:23Z")

</div>

I am trying to simulate an object falling according to gravity. I have most of the simulation working, using Box2D, Bullet, etc. My problem is I want to incorporate all relevant laws of physics and there’s one I cannot f…

---

## [How to incorporate exponential curve with a specified limit?](https://discourse.processing.org/t/how-to-incorporate-exponential-curve-with-a-specified-limit/28995)

<div class="topic-metadata">

**Author:** [@leatherbird](https://discourse.processing.org/u/leatherbird)\
**Replies:** 5\
**Last updated:** [April 2, 2021, 3:39am UTC](https://discourse.processing.org/t/how-to-incorporate-exponential-curve-with-a-specified-limit/28995 "2021-04-02T03:39:09Z")

</div>

Hello! I’m playing with randomGaussians, and gradual transitions, trying to understand the concept, and I’ve hit a bit of a snag. I’m hoping someone can help with the math involved. I’m drawing simple squares in a gri…

---

## [Processing in Kotlin with static main function error](https://discourse.processing.org/t/processing-in-kotlin-with-static-main-function-error/29039)

<div class="topic-metadata">

**Author:** [@sharpeye](https://discourse.processing.org/u/sharpeye)\
**Replies:** 1\
**Last updated:** [April 1, 2021, 7:21am UTC](https://discourse.processing.org/t/processing-in-kotlin-with-static-main-function-error/29039 "2021-04-01T07:21:20Z")

</div>

Hi ,I’m a Processing learners from China，and I am experimenting with writing prcoessing cod in Kotlin environment。But some problems that are pressing on me，like this one :crazy\_face: I want to code the pde Imitate the s…

---

## [Using Processing via remote desktop for touring music act](https://discourse.processing.org/t/using-processing-via-remote-desktop-for-touring-music-act/10962)

<div class="topic-metadata">

**Author:** [@zumdar](https://discourse.processing.org/u/zumdar)\
**Replies:** 7\
**Last updated:** [April 1, 2021, 2:16am UTC](https://discourse.processing.org/t/using-processing-via-remote-desktop-for-touring-music-act/10962 "2021-04-01T02:16:03Z")

</div>

hiya! I am currently using processing to run a lighting design for a touring band. the computer onstage using an audio interface to take in audio signals from the band. processing analyze that audio and we create visuali…

---

## [Smart-ish bouncing ball](https://discourse.processing.org/t/smart-ish-bouncing-ball/28927)

<div class="topic-metadata">

**Author:** [@scolty2021](https://discourse.processing.org/u/scolty2021)\
**Replies:** 6\
**Last updated:** [March 31, 2021, 9:13pm UTC](https://discourse.processing.org/t/smart-ish-bouncing-ball/28927 "2021-03-31T21:13:36Z")

</div>

Hello, Thanks for taking the time to click on this query. I’m currently learning how to bounce balls around the window, and wondered whether it is possible to make the ball see the trail it leaves behind it and interac…

---

## [Need Help Implementing a Billboard Effect for a Circle](https://discourse.processing.org/t/need-help-implementing-a-billboard-effect-for-a-circle/28989)

<div class="topic-metadata">

**Author:** [@topologen](https://discourse.processing.org/u/topologen)\
**Replies:** 7\
**Last updated:** [March 31, 2021, 2:28pm UTC](https://discourse.processing.org/t/need-help-implementing-a-billboard-effect-for-a-circle/28989 "2021-03-31T14:28:00Z")

</div>

Hey guys! This is my first post here so let me know if I need to change anything. I’ve almost finished a project and I’ve hit a pretty big hurdle (for me anyway haha). I wanted to write some code that will outline a sph…

---

## [Speed in which Brightness changes defined by mouseX](https://discourse.processing.org/t/speed-in-which-brightness-changes-defined-by-mousex/29007)

<div class="topic-metadata">

**Author:** [@p\_a](https://discourse.processing.org/u/p_a)\
**Replies:** 2\
**Last updated:** [March 31, 2021, 10:59am UTC](https://discourse.processing.org/t/speed-in-which-brightness-changes-defined-by-mousex/29007 "2021-03-31T10:59:34Z")

</div>

Hi, I made the brightness (HSB Mode) of an ellipse change up and down between 0 and 100 BUT I want to change the speed in which the brightness changes defined by mouseX. Here is my code so far, I just don’t know how t…

---

## [NullPointerException when work with Leap Motion and Arduino](https://discourse.processing.org/t/nullpointerexception-when-work-with-leap-motion-and-arduino/28984)

<div class="topic-metadata">

**Author:** [@Negos](https://discourse.processing.org/u/Negos)\
**Replies:** 3\
**Last updated:** [March 31, 2021, 7:18am UTC](https://discourse.processing.org/t/nullpointerexception-when-work-with-leap-motion-and-arduino/28984 "2021-03-31T07:18:11Z")

</div>

I write the code to collect the data of Leap Motion, but show me a NullPointerException (at line 27). I’m just a beginner in Processing, What can I do to solve this problem? Please help me. This is coding: import proc…

---

## [Could this made with processing](https://discourse.processing.org/t/could-this-made-with-processing/29001)

<div class="topic-metadata">

**Author:** [@jafal](https://discourse.processing.org/u/jafal)\
**Replies:** 2\
**Last updated:** [March 31, 2021, 5:02am UTC](https://discourse.processing.org/t/could-this-made-with-processing/29001 "2021-03-31T05:02:36Z")

</div>

hi i wonder if this could achieve with processing Bx\[x\_, z\_, R\_\] = If\[Abs\[x/R\] \< 10^-5, 0, z/(2 Pi x) (\\\[Beta\] = (x + R)^2 + z^2; m = 4 x\*R/\\\[Beta\]; 1/Sqrt\[\\\[Beta\]\] ((R^2 + x^2 + z^2)/((R - x)^2 + z^2) El…

---

## [Function to extract colors from coolors.co](https://discourse.processing.org/t/function-to-extract-colors-from-coolors-co/28986)

<div class="topic-metadata">

**Author:** [@thesandrobrito](https://discourse.processing.org/u/thesandrobrito)\
**Replies:** 3\
**Last updated:** [March 31, 2021, 1:41am UTC](https://discourse.processing.org/t/function-to-extract-colors-from-coolors-co/28986 "2021-03-31T01:41:18Z")

</div>

Hi everyone. I was trying to come up with a function to extract colours from the URL from coolors.com to easily change colour pallets. This is an idea I’ve seen done for P5 projects, but I’d like it for Processing. For…

---

## [Terrain Generation](https://discourse.processing.org/t/terrain-generation/28740)

<div class="topic-metadata">

**Author:** [@jafal](https://discourse.processing.org/u/jafal)\
**Replies:** 14\
**Last updated:** [March 30, 2021, 8:03pm UTC](https://discourse.processing.org/t/terrain-generation/28740 "2021-03-30T20:03:02Z")

</div>

hi all how to make this shape if any one can help i found this equation : centerpoint (x1, y1) and a radius r, the height of the hill at the point (x2, y2) is equivalent to: how to use it to form this terrain ca…

---

## [Set the robot to follow the mouse cursor](https://discourse.processing.org/t/set-the-robot-to-follow-the-mouse-cursor/28979)

<div class="topic-metadata">

**Author:** [@sasa](https://discourse.processing.org/u/sasa)\
**Replies:** 1\
**Last updated:** [March 30, 2021, 6:18pm UTC](https://discourse.processing.org/t/set-the-robot-to-follow-the-mouse-cursor/28979 "2021-03-30T18:18:22Z")

</div>

I’m coding the robot to follow the cursor. But there was a problem with the robot’s limbs, head, and torso being separated. Like the picture I posted, the robot should follow the cursor. Code int x = 0; int y = 0; …

---

## [Can't print IntList outside setup function](https://discourse.processing.org/t/cant-print-intlist-outside-setup-function/28965)

<div class="topic-metadata">

**Author:** [@potter3366](https://discourse.processing.org/u/potter3366)\
**Replies:** 4\
**Last updated:** [March 30, 2021, 11:03am UTC](https://discourse.processing.org/t/cant-print-intlist-outside-setup-function/28965 "2021-03-30T11:03:56Z")

</div>

I can print listaA within setup function but not when I press a “w” key. Why? IntList Ptop; final int ROWS = 8; final IntList\[\] listaA = new IntList\[ROWS\]; int value; int index; void setup() { size(520, 220); Ptop…

---

## [How to create a buttons](https://discourse.processing.org/t/how-to-create-a-buttons/28952)

<div class="topic-metadata">

**Author:** [@Pokeyace](https://discourse.processing.org/u/Pokeyace)\
**Replies:** 10\
**Last updated:** [March 30, 2021, 5:55am UTC](https://discourse.processing.org/t/how-to-create-a-buttons/28952 "2021-03-30T05:55:29Z")

</div>

— create a program that will display four radio buttons, each represented by a circle and accompanying text. — when the user clicks on a circle, it is shown as being filled in. If another circle was previously filled in…

---

## [Rotate all Ipoints (iGeo library)](https://discourse.processing.org/t/rotate-all-ipoints-igeo-library/28950)

<div class="topic-metadata">

**Author:** [@AmbervanDinther](https://discourse.processing.org/u/AmbervanDinther)\
**Replies:** 2\
**Last updated:** [March 29, 2021, 10:50pm UTC](https://discourse.processing.org/t/rotate-all-ipoints-igeo-library/28950 "2021-03-29T22:50:55Z")

</div>

Hi everyone! I can’t seem to figure out how I can rotate my cube made out of iPoints. I guess I have to rotate each point around a pivitpoint which i place in the middle of all the iPoints. Can anyone give me a tip or h…

---

## [Help on running "P3D"](https://discourse.processing.org/t/help-on-running-p3d/28874)

<div class="topic-metadata">

**Author:** [@Freddy](https://discourse.processing.org/u/Freddy)\
**Replies:** 11\
**Last updated:** [March 29, 2021, 9:13pm UTC](https://discourse.processing.org/t/help-on-running-p3d/28874 "2021-03-29T21:13:46Z")

</div>

Hello, i’m in a school in France like teacher of “Stem”. \< I can’t run every “exemple” use P3D.\> In 2D all is gone. I’don’t understand why it doesn’t work. I work with “windows 7” on pedagogic reseau, I’am not adminis…

---

## [Achieving a noodle shape](https://discourse.processing.org/t/achieving-a-noodle-shape/28922)

<div class="topic-metadata">

**Author:** [@thesandrobrito](https://discourse.processing.org/u/thesandrobrito)\
**Replies:** 6\
**Last updated:** [March 29, 2021, 10:23am UTC](https://discourse.processing.org/t/achieving-a-noodle-shape/28922 "2021-03-29T10:23:13Z")

</div>

I’d like to achieve shapes like this, to simulate flowing “noodles” and I’d like to be able to control fill and stroke, so I’d assume it needs to be a shape, but I have no idea how to do it. My initial thinking was to j…

---

## [Constrain one end of sine wave](https://discourse.processing.org/t/constrain-one-end-of-sine-wave/28914)

<div class="topic-metadata">

**Author:** [@brewthom](https://discourse.processing.org/u/brewthom)\
**Replies:** 3\
**Last updated:** [March 28, 2021, 11:33pm UTC](https://discourse.processing.org/t/constrain-one-end-of-sine-wave/28914 "2021-03-28T23:33:58Z")

</div>

I’m trying to figure out how to constrain one end of a sine wave so that the left end of the wave animation is “tied” to the mouse x and mouse y. I’m thinking i need PVectors, but not sure how to implement that. I’ve wor…

---

## [Audio in problem with Mac OS Catalina](https://discourse.processing.org/t/audio-in-problem-with-mac-os-catalina/28897)

<div class="topic-metadata">

**Author:** [@yannisky](https://discourse.processing.org/u/yannisky)\
**Replies:** 6\
**Last updated:** [March 28, 2021, 7:47pm UTC](https://discourse.processing.org/t/audio-in-problem-with-mac-os-catalina/28897 "2021-03-28T19:47:37Z")

</div>

Has anybody else encountered problems with getting the built-in mic to work with Processing with a new OS update? Same patches were working fine until I upgraded to Catalina. Somehow Processing can’t access the microphon…

---

## [Removing objects once out of the canvas](https://discourse.processing.org/t/removing-objects-once-out-of-the-canvas/28884)

<div class="topic-metadata">

**Author:** [@yannisky](https://discourse.processing.org/u/yannisky)\
**Replies:** 8\
**Last updated:** [March 28, 2021, 5:41pm UTC](https://discourse.processing.org/t/removing-objects-once-out-of-the-canvas/28884 "2021-03-28T17:41:45Z")

</div>

Hello Forum! I made an object and class sketch to randomly generate curved vertex object in P3D. This is eventually goes over a movie. it works fine BUT after about a hundred or so times it gets called up (with the spa…

---

## [Issues with removing an object](https://discourse.processing.org/t/issues-with-removing-an-object/28920)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 4\
**Last updated:** [March 28, 2021, 3:14pm UTC](https://discourse.processing.org/t/issues-with-removing-an-object/28920 "2021-03-28T15:14:13Z")

</div>

Hi! I tried making a program, which makes use of the simplified for loop structure (for(p obj : pro){}) Inside of it, I made a condition stating that if the object obj is outside the screen or has age higher than maxAge…

---

## [Need help to send video with oscP5](https://discourse.processing.org/t/need-help-to-send-video-with-oscp5/28864)

<div class="topic-metadata">

**Author:** [@green](https://discourse.processing.org/u/green)\
**Replies:** 10\
**Last updated:** [March 28, 2021, 2:56pm UTC](https://discourse.processing.org/t/need-help-to-send-video-with-oscp5/28864 "2021-03-28T14:56:49Z")

</div>

Hello guys, I need some help with a couple of sketches where I’m using the oscP5 and the video libraries. In the first sketch I capture the video from my camera and then I extrapolate the RGB float variables and send the…

---

## [About Processing automatically converting double literals to floats](https://discourse.processing.org/t/about-processing-automatically-converting-double-literals-to-floats/28886)

<div class="topic-metadata">

**Author:** [@josephh](https://discourse.processing.org/u/josephh)\
**Replies:** 7\
**Last updated:** [March 28, 2021, 1:34pm UTC](https://discourse.processing.org/t/about-processing-automatically-converting-double-literals-to-floats/28886 "2021-03-28T13:34:46Z")

</div>

Hi everyone, In regular Java and other programming languages, this is well known that you can write : System.out.println(0.1 + 0.2 == 0.3); which gives false!! This is due to floating point precision and how computer…

---

## [Confuse about what beginCamera() and endCamera() does](https://discourse.processing.org/t/confuse-about-what-begincamera-and-endcamera-does/28798)

<div class="topic-metadata">

**Author:** [@Shubham](https://discourse.processing.org/u/Shubham)\
**Replies:** 5\
**Last updated:** [March 28, 2021, 8:59am UTC](https://discourse.processing.org/t/confuse-about-what-begincamera-and-endcamera-does/28798 "2021-03-28T08:59:55Z")

</div>

Beginner in processing and want to use camera function but unable to understand the use of beginCamera() and endCamera(). Can anybody give more information as the reference is also quite unclear?

---

## [Flocking as in NatureOfCode](https://discourse.processing.org/t/flocking-as-in-natureofcode/28912)

<div class="topic-metadata">

**Author:** [@manno](https://discourse.processing.org/u/manno)\
**Replies:** 5\
**Last updated:** [March 27, 2021, 11:37pm UTC](https://discourse.processing.org/t/flocking-as-in-natureofcode/28912 "2021-03-27T23:37:40Z")

</div>

Question on flocking. In many examples (and also on The Nature of Code) there’s something like: if (count \> 0) { sum.div(count); sum.normalize(); sum.mult(maxspeed); PVector steer = PVector.sub(…

---

## [Timer problem with the value](https://discourse.processing.org/t/timer-problem-with-the-value/28858)

<div class="topic-metadata">

**Author:** [@david27266361313](https://discourse.processing.org/u/david27266361313)\
**Replies:** 5\
**Last updated:** [March 27, 2021, 10:21pm UTC](https://discourse.processing.org/t/timer-problem-with-the-value/28858 "2021-03-27T22:21:23Z")

</div>

I have problem with my timer ,this homework is connect with arduino. My problem is when val==4,the value of sec won’t go properly, it just decrease maybe ten or more at a time,and I want it to decrease one second at a ti…

---

## [Displaying image on mouse click](https://discourse.processing.org/t/displaying-image-on-mouse-click/28906)

<div class="topic-metadata">

**Author:** [@Daphn](https://discourse.processing.org/u/Daphn)\
**Replies:** 1\
**Last updated:** [March 27, 2021, 7:42pm UTC](https://discourse.processing.org/t/displaying-image-on-mouse-click/28906 "2021-03-27T19:42:03Z")

</div>

Hello! This is my first time using processing and I can’t work my problem out. Hopefully someone can help! I am trying to display an image that follows the cursor of the mouse, and when the mouse is clicked I want a fl…

---

## [Why is this ui function crashing my sketch when i build](https://discourse.processing.org/t/why-is-this-ui-function-crashing-my-sketch-when-i-build/28871)

<div class="topic-metadata">

**Author:** [@canslp](https://discourse.processing.org/u/canslp)\
**Replies:** 13\
**Last updated:** [March 27, 2021, 2:30pm UTC](https://discourse.processing.org/t/why-is-this-ui-function-crashing-my-sketch-when-i-build/28871 "2021-03-27T14:30:25Z")

</div>

i have a function called uiUpdate that runs fine in the preview but freezes the app when i build it. i know this function is responsible, but i don’t know why. here is the entire ui class, i have to comment out every uiU…

---

## [Tower Hanoi (recursive) in Processing](https://discourse.processing.org/t/tower-hanoi-recursive-in-processing/28902)

<div class="topic-metadata">

**Author:** [@dyehuda](https://discourse.processing.org/u/dyehuda)\
**Replies:** 1\
**Last updated:** [March 27, 2021, 2:23pm UTC](https://discourse.processing.org/t/tower-hanoi-recursive-in-processing/28902 "2021-03-27T14:23:19Z")

</div>

I wrote this recursive code for Hanoi tower, but it just draw the first and last position. I don’t understand why I cannot see each step please format code with \</\> button \* homework policy \* asking questions

---

## [Quad\_Strip: Okay, but how to do a line break in a bigger grid with Quad\_Strip?](https://discourse.processing.org/t/quad-strip-okay-but-how-to-do-a-line-break-in-a-bigger-grid-with-quad-strip/28623)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 4\
**Last updated:** [March 27, 2021, 10:26am UTC](https://discourse.processing.org/t/quad-strip-okay-but-how-to-do-a-line-break-in-a-bigger-grid-with-quad-strip/28623 "2021-03-27T10:26:36Z")

</div>

Hello all, the reference has Quad\_Strip, but only for one line of quads. How can I make a bigger grid of QUAD\_STRIP? Actually, the main problem is the line break at the end of one line in the grid. I don’t want the ri…

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

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