# Processing

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

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

**Page:** 270

---

## [How to figure out which object is closest to a moving origin point](https://discourse.processing.org/t/how-to-figure-out-which-object-is-closest-to-a-moving-origin-point/14298)

<div class="topic-metadata">

**Author:** [@cryptacritic](https://discourse.processing.org/u/cryptacritic)\
**Replies:** 2\
**Last updated:** [October 3, 2019, 6:43am UTC](https://discourse.processing.org/t/how-to-figure-out-which-object-is-closest-to-a-moving-origin-point/14298 "2019-10-03T06:43:29Z")

</div>

Let’s say I’m building a project. Just picture Galaga in your head. The ship you play as shoots missiles. What I’m trying to do here is to program the missiles to fly toward the nearest enemy ship along the x axis (y axi…

---

## [Analogue Clock Second hand Sweep not Tick](https://discourse.processing.org/t/analogue-clock-second-hand-sweep-not-tick/2331)

<div class="topic-metadata">

**Author:** [@yorkie](https://discourse.processing.org/u/yorkie)\
**Replies:** 18\
**Last updated:** [October 3, 2019, 2:36am UTC](https://discourse.processing.org/t/analogue-clock-second-hand-sweep-not-tick/2331 "2019-10-03T02:36:01Z")

</div>

Hi All, I’m busting my brains with this one. I’ve taken the very simple clock sketch from the examples, but instead of drawing the lines I’m using images of clock hands. I currently have my clock working perfectly, ho…

---

## [Simultaneous (nested) AniSequences](https://discourse.processing.org/t/simultaneous-nested-anisequences/14380)

<div class="topic-metadata">

**Author:** [@leo.nerd](https://discourse.processing.org/u/leo.nerd)\
**Replies:** 1\
**Last updated:** [October 3, 2019, 1:51am UTC](https://discourse.processing.org/t/simultaneous-nested-anisequences/14380 "2019-10-03T01:51:54Z")

</div>

Hello. I’m trying to use the Ani library to orchestrate a sketch that contains several “sub-modes” that have their own timelines and display methods. Essentially, I would like the master sketch to run a sequence similar …

---

## [Making a loop infinite](https://discourse.processing.org/t/making-a-loop-infinite/14373)

<div class="topic-metadata">

**Author:** [@Adrian1998](https://discourse.processing.org/u/Adrian1998)\
**Replies:** 1\
**Last updated:** [October 2, 2019, 5:10pm UTC](https://discourse.processing.org/t/making-a-loop-infinite/14373 "2019-10-02T17:10:17Z")

</div>

Hello, so I need help with finding a way to make the black striped lines infinte, currently it starts at -100, but the lines stops printing after a little. Also im having trouble with the yellow solid line, currently the…

---

## [Network library Netstation](https://discourse.processing.org/t/network-library-netstation/14365)

<div class="topic-metadata">

**Author:** [@kb12592](https://discourse.processing.org/u/kb12592)\
**Replies:** 4\
**Last updated:** [October 2, 2019, 2:54pm UTC](https://discourse.processing.org/t/network-library-netstation/14365 "2019-10-02T14:54:08Z")

</div>

I want to be able to send time-stamps from Processing PDE to an EEG acquisition software called NetStation using the network library. NetStation has plug-ins and scripts available for Matlab, E-prime and Python, to send …

---

## [Using millis() to count](https://discourse.processing.org/t/using-millis-to-count/3093)

<div class="topic-metadata">

**Author:** [@ddownn](https://discourse.processing.org/u/ddownn)\
**Replies:** 16\
**Last updated:** [October 2, 2019, 12:51pm UTC](https://discourse.processing.org/t/using-millis-to-count/3093 "2019-10-02T12:51:15Z")

</div>

I’ve been trying to find a way to solve this problem for a while. I remember seeing a solution somewhere on the internet a while back but I can’t find it now. I was hoping to be able to use a modulo condition to check f…

---

## [Height / width for a beginner](https://discourse.processing.org/t/height-width-for-a-beginner/14364)

<div class="topic-metadata">

**Author:** [@harsande](https://discourse.processing.org/u/harsande)\
**Replies:** 3\
**Last updated:** [October 2, 2019, 10:47am UTC](https://discourse.processing.org/t/height-width-for-a-beginner/14364 "2019-10-02T10:47:35Z")

</div>

Hi, I’m all new to Processing, trying to learn the basics. Right now I’m trying to make a square expand for the center of a window. This works fine except for the first time running the loop. I am defining corner x and …

---

## [Can a function like this load images?](https://discourse.processing.org/t/can-a-function-like-this-load-images/14354)

<div class="topic-metadata">

**Author:** [@ImDaGr3en](https://discourse.processing.org/u/ImDaGr3en)\
**Replies:** 2\
**Last updated:** [October 2, 2019, 10:05am UTC](https://discourse.processing.org/t/can-a-function-like-this-load-images/14354 "2019-10-02T10:05:52Z")

</div>

I wrote a function assuming that I could pass to an array of images, an array of strings and the length of the two of them and it would have loaded the images, stored into the strings, in the elements of the images array…

---

## [Java reflect Field get class variables](https://discourse.processing.org/t/java-reflect-field-get-class-variables/14357)

<div class="topic-metadata">

**Author:** [@GeorgeJava](https://discourse.processing.org/u/GeorgeJava)\
**Replies:** 3\
**Last updated:** [October 2, 2019, 7:56am UTC](https://discourse.processing.org/t/java-reflect-field-get-class-variables/14357 "2019-10-02T07:56:38Z")

</div>

Hello, i want to load all variables from sketch and want to check some variables in the specific class and do some changes, how i can get class from Field ? :neutral\_face::thinking: import java.lang.reflect.Field; test…

---

## [Using camera() and displaying pin up things](https://discourse.processing.org/t/using-camera-and-displaying-pin-up-things/14350)

<div class="topic-metadata">

**Author:** [@Waboqueox](https://discourse.processing.org/u/Waboqueox)\
**Replies:** 2\
**Last updated:** [October 2, 2019, 7:23am UTC](https://discourse.processing.org/t/using-camera-and-displaying-pin-up-things/14350 "2019-10-02T07:23:03Z")

</div>

Hi people; I’m starting using camera(…) and don’t understand well looking the reference or other topics :dizzy\_face: I want to change the camera but let some buttons/text in the front lane without moving (to be able to …

---

## [Random Circles in circles](https://discourse.processing.org/t/random-circles-in-circles/14360)

<div class="topic-metadata">

**Author:** [@Epic\_ModZz](https://discourse.processing.org/u/Epic_ModZz)\
**Replies:** 9\
**Last updated:** [October 2, 2019, 2:17am UTC](https://discourse.processing.org/t/random-circles-in-circles/14360 "2019-10-02T02:17:17Z")

</div>

I would like to generate circles at a random place in a circle, I do not know how to do this without having the circles generated by the generator overlap the edges of the starting circle please send code

---

## [Toxiclibs particles and springs](https://discourse.processing.org/t/toxiclibs-particles-and-springs/14182)

<div class="topic-metadata">

**Author:** [@orbicularis](https://discourse.processing.org/u/orbicularis)\
**Replies:** 5\
**Last updated:** [October 2, 2019, 12:15am UTC](https://discourse.processing.org/t/toxiclibs-particles-and-springs/14182 "2019-10-02T00:15:43Z")

</div>

Hi, I wrote that with the help of a toxiclibs tutorial. I want all the particles moving upwards to make cylindrical mesh. But in my sketch, particles moves horizontally. What should I change to move particles and spring…

---

## [IR cameras for outdoor installations using processing](https://discourse.processing.org/t/ir-cameras-for-outdoor-installations-using-processing/14345)

<div class="topic-metadata">

**Author:** [@rojele](https://discourse.processing.org/u/rojele)\
**Replies:** 0\
**Last updated:** [October 1, 2019, 12:12pm UTC](https://discourse.processing.org/t/ir-cameras-for-outdoor-installations-using-processing/14345 "2019-10-01T12:12:29Z")

</div>

Hi! I’m searching for any advice on IR cams (or hackable webcam) that could allow me to track people in a distance of about 20 meters. The most of the hackable webcams I know turns out to have this problem with long dis…

---

## [Detecting object collision](https://discourse.processing.org/t/detecting-object-collision/14336)

<div class="topic-metadata">

**Author:** [@quoi](https://discourse.processing.org/u/quoi)\
**Replies:** 1\
**Last updated:** [October 1, 2019, 11:58am UTC](https://discourse.processing.org/t/detecting-object-collision/14336 "2019-10-01T11:58:27Z")

</div>

Hello! I’m new to processing, and i’m wondering how can i compare two variables from different classes with each other. Can someone please guide me in the right direction… if you are wondering here is my code: float an…

---

## [I don't understand why this doesn't work](https://discourse.processing.org/t/i-dont-understand-why-this-doesnt-work/14327)

<div class="topic-metadata">

**Author:** [@ImDaGr3en](https://discourse.processing.org/u/ImDaGr3en)\
**Replies:** 3\
**Last updated:** [September 30, 2019, 10:00pm UTC](https://discourse.processing.org/t/i-dont-understand-why-this-doesnt-work/14327 "2019-09-30T22:00:09Z")

</div>

I’m trying to make some functions that allow me to show some images in the window, so I made a class in which I put the PImage variables and a function that allows me to load the images, but it doesn’t actually work. (An…

---

## [indexOf with nested ArrayList](https://discourse.processing.org/t/indexof-with-nested-arraylist/14272)

<div class="topic-metadata">

**Author:** [@companje](https://discourse.processing.org/u/companje)\
**Replies:** 4\
**Last updated:** [September 30, 2019, 8:22pm UTC](https://discourse.processing.org/t/indexof-with-nested-arraylist/14272 "2019-09-30T20:22:21Z")

</div>

Hi there, I’ve got some menu structure where I’m nesting ArrayLists like this class Menu extends ArrayList\<Menu\>. It gives me some really interesting results when I’m using indexOf. Somehow it looks like it’s doing a re…

---

## [Trouble with bouncing ball](https://discourse.processing.org/t/trouble-with-bouncing-ball/14312)

<div class="topic-metadata">

**Author:** [@abigail](https://discourse.processing.org/u/abigail)\
**Replies:** 6\
**Last updated:** [September 30, 2019, 2:08pm UTC](https://discourse.processing.org/t/trouble-with-bouncing-ball/14312 "2019-09-30T14:08:17Z")

</div>

Hi, so far I just have a ball bouncing on the screen, but the sketch stops working when I add the number 125 into the - if (y \<= 125), part of my code, although it works when I have 100 instead of 125. Can anyone explai…

---

## [3D view in processing](https://discourse.processing.org/t/3d-view-in-processing/14292)

<div class="topic-metadata">

**Author:** [@alice](https://discourse.processing.org/u/alice)\
**Replies:** 3\
**Last updated:** [September 30, 2019, 12:06pm UTC](https://discourse.processing.org/t/3d-view-in-processing/14292 "2019-09-30T12:06:18Z")

</div>

Hello, I have a question regarding the 3D view in processing : I’m trying to have a 3D view of the following code but looks like doesn’t work … I’m trying to have that black background as in the image Cell\[\]\[\] grid;…

---

## [Fill with points with noise stroke without killing FPS](https://discourse.processing.org/t/fill-with-points-with-noise-stroke-without-killing-fps/14286)

<div class="topic-metadata">

**Author:** [@ddownn](https://discourse.processing.org/u/ddownn)\
**Replies:** 4\
**Last updated:** [September 30, 2019, 10:59am UTC](https://discourse.processing.org/t/fill-with-points-with-noise-stroke-without-killing-fps/14286 "2019-09-30T10:59:39Z")

</div>

Is there a way to do this without having the frame rate go down to about 8fps? Use noise to set the stroke color of a dot between 0-255, uniformly fill an area with dots. Like TV snow. float noiseScale = 0.02; float r;…

---

## [Only using line commands](https://discourse.processing.org/t/only-using-line-commands/14294)

<div class="topic-metadata">

**Author:** [@elcougario](https://discourse.processing.org/u/elcougario)\
**Replies:** 1\
**Last updated:** [September 30, 2019, 3:51am UTC](https://discourse.processing.org/t/only-using-line-commands/14294 "2019-09-30T03:51:54Z")

</div>

Hey guys! I’m new to this whole processing thing. I have a project for a class and we can only use the line command. I’m trying to duplicate what i’ve done on the left side of my window to the right to make it look kin…

---

## [Small help with a small draw](https://discourse.processing.org/t/small-help-with-a-small-draw/14300)

<div class="topic-metadata">

**Author:** [@pokedav](https://discourse.processing.org/u/pokedav)\
**Replies:** 1\
**Last updated:** [September 30, 2019, 3:41am UTC](https://discourse.processing.org/t/small-help-with-a-small-draw/14300 "2019-09-30T03:41:10Z")

</div>

Hi guys, I just want to draw somethin, clear the screen and draw another thing, and put that in a loop, here´s the code: void setup() { fullScreen(); frameRate(1); background(190); } void draw() { int j=0; f…

---

## [Accurate event Timer?](https://discourse.processing.org/t/accurate-event-timer/14260)

<div class="topic-metadata">

**Author:** [@edward](https://discourse.processing.org/u/edward)\
**Replies:** 3\
**Last updated:** [September 30, 2019, 2:01am UTC](https://discourse.processing.org/t/accurate-event-timer/14260 "2019-09-30T02:01:26Z")

</div>

Hi guys, I’d be grateful for your guidance. I would like to have a Timer that triggers an event every 20ms. with good accuracy. Every 20ms it will read a value from an arrayList and it will send it through Serial. I hav…

---

## [Conflicting libraries (YOLO comp vision)](https://discourse.processing.org/t/conflicting-libraries-yolo-comp-vision/6812)

<div class="topic-metadata">

**Author:** [@TTG](https://discourse.processing.org/u/TTG)\
**Replies:** 7\
**Last updated:** [September 30, 2019, 1:24am UTC](https://discourse.processing.org/t/conflicting-libraries-yolo-comp-vision/6812 "2019-09-30T01:24:48Z")

</div>

Hi team, i seem not to be able to get YOLO working despite some step by step guidance stated on: from mr MagicandLove. I removed libraries and replaced them to try get the error removed. Is there a tip that can s…

---

## [Help in Slit-Scan](https://discourse.processing.org/t/help-in-slit-scan/14195)

<div class="topic-metadata">

**Author:** [@royal96](https://discourse.processing.org/u/royal96)\
**Replies:** 2\
**Last updated:** [September 29, 2019, 11:58pm UTC](https://discourse.processing.org/t/help-in-slit-scan/14195 "2019-09-29T23:58:04Z")

</div>

hello :slight\_smile: i have written this code for Slit-Scan, import processing.video.\*; Capture video; int x = 0; void setup() { size(2000, 720); frameRate(120); video = new Capture(this, 1280, 720); // Start c…

---

## [Sound Recognition](https://discourse.processing.org/t/sound-recognition/14291)

<div class="topic-metadata">

**Author:** [@Arjuna](https://discourse.processing.org/u/Arjuna)\
**Replies:** 0\
**Last updated:** [September 29, 2019, 9:09pm UTC](https://discourse.processing.org/t/sound-recognition/14291 "2019-09-29T21:09:14Z")

</div>

Hello! I want to know if there is some library to recognize specific sounds. That is, some parts of the code will be triggered only when a certain sound is recognized. So far I tried to isolate only low sounds from voic…

---

## [How to build processing with sources?](https://discourse.processing.org/t/how-to-build-processing-with-sources/14285)

<div class="topic-metadata">

**Author:** [@clankill3r](https://discourse.processing.org/u/clankill3r)\
**Replies:** 2\
**Last updated:** [September 29, 2019, 5:50pm UTC](https://discourse.processing.org/t/how-to-build-processing-with-sources/14285 "2019-09-29T17:50:21Z")

</div>

I really like having a jar with the sources so I can jump to the code. However, I can’t just get it done, and the last one on maven that has sources is really outdated. Here more about it: someone please help.

---

## [Linear array of values to grid](https://discourse.processing.org/t/linear-array-of-values-to-grid/14206)

<div class="topic-metadata">

**Author:** [@tombass](https://discourse.processing.org/u/tombass)\
**Replies:** 4\
**Last updated:** [September 29, 2019, 4:05pm UTC](https://discourse.processing.org/t/linear-array-of-values-to-grid/14206 "2019-09-29T16:05:28Z")

</div>

Say i have an array of 16 values eg {10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25} but i want to display them in a 4 x 4 grid. What is the easiest way to get them into a 2d array that looks like this? { {10,11,12,1…

---

## [Could not run the sketch.( Target VM failed to initialize)](https://discourse.processing.org/t/could-not-run-the-sketch-target-vm-failed-to-initialize/14280)

<div class="topic-metadata">

**Author:** [@yangms3302](https://discourse.processing.org/u/yangms3302)\
**Replies:** 1\
**Last updated:** [September 29, 2019, 2:30pm UTC](https://discourse.processing.org/t/could-not-run-the-sketch-target-vm-failed-to-initialize/14280 "2019-09-29T14:30:13Z")

</div>

Hi. I am getting this error message every time I run a code. I put jpg file in the sketch file folder in ‘data’ folder, and already tried several times. Here is a code: PImage img; void setup() { size(640, 360); fram…

---

## [Minim and assign character](https://discourse.processing.org/t/minim-and-assign-character/14274)

<div class="topic-metadata">

**Author:** [@nishafatin96](https://discourse.processing.org/u/nishafatin96)\
**Replies:** 1\
**Last updated:** [September 29, 2019, 2:16pm UTC](https://discourse.processing.org/t/minim-and-assign-character/14274 "2019-09-29T14:16:24Z")

</div>

hi there, do help me, first of all, I have problem to add more than 1 sound and make sound that I add detect the beat of it. my sound is in different file because I want to do wearable electronic using fingers and assig…

---

## [Referencing a class using a string stored in another class?](https://discourse.processing.org/t/referencing-a-class-using-a-string-stored-in-another-class/14268)

<div class="topic-metadata">

**Author:** [@Inertia\_Squared](https://discourse.processing.org/u/Inertia_Squared)\
**Replies:** 1\
**Last updated:** [September 29, 2019, 11:02am UTC](https://discourse.processing.org/t/referencing-a-class-using-a-string-stored-in-another-class/14268 "2019-09-29T11:02:49Z")

</div>

I’m having trouble getting a class to reference a variable from another class using a string, it gives me the error ‘that the global variable “variableName” does not exist.’ How could I get this to work? For an example …

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

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