# Processing

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

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

**Page:** 235

---

## [G4P GUI Builder 4.4 Tool](https://discourse.processing.org/t/g4p-gui-builder-4-4-tool/18008)

<div class="topic-metadata">

**Author:** [@Theo68](https://discourse.processing.org/u/Theo68)\
**Replies:** 4\
**Last updated:** [February 22, 2020, 6:01pm UTC](https://discourse.processing.org/t/g4p-gui-builder-4-4-tool/18008 "2020-02-22T18:01:04Z")

</div>

I’ve placed some Labels. One of them enables me to set the option as BOLT or ITALIC. In the rest no.

---

## [Saving/Storing a multidimensional array](https://discourse.processing.org/t/saving-storing-a-multidimensional-array/16391)

<div class="topic-metadata">

**Author:** [@Baz](https://discourse.processing.org/u/Baz)\
**Replies:** 4\
**Last updated:** [December 18, 2019, 12:31am UTC](https://discourse.processing.org/t/saving-storing-a-multidimensional-array/16391 "2019-12-18T00:31:54Z")

</div>

For a project of mine I want to create a function that can save a 3d double or a 2d double array such as I can recover what was inside if I restart the program. I think you can do that in JSON, but I never used it, and I…

---

## [Points on a line](https://discourse.processing.org/t/points-on-a-line/17977)

<div class="topic-metadata">

**Author:** [@richardh](https://discourse.processing.org/u/richardh)\
**Replies:** 3\
**Last updated:** [February 22, 2020, 3:44pm UTC](https://discourse.processing.org/t/points-on-a-line/17977 "2020-02-22T15:44:03Z")

</div>

I was looking for help with the following problem; draw a line between two points, along that line place points on it at various % (i.e. place a point every 15% of the line length). place text next to each point with t…

---

## [How to increment a variable on a timer?](https://discourse.processing.org/t/how-to-increment-a-variable-on-a-timer/17984)

<div class="topic-metadata">

**Author:** [@abc](https://discourse.processing.org/u/abc)\
**Replies:** 1\
**Last updated:** [February 21, 2020, 8:50pm UTC](https://discourse.processing.org/t/how-to-increment-a-variable-on-a-timer/17984 "2020-02-21T20:50:01Z")

</div>

My goal was to make the background color change every 4 seconds, yet I can’t seem to figure out what I should use to allow my variable to continuously increase, right now the color stays the same. what do I need to add …

---

## [How should I modify this for loop to satisfy a condition?](https://discourse.processing.org/t/how-should-i-modify-this-for-loop-to-satisfy-a-condition/17994)

<div class="topic-metadata">

**Author:** [@anon94203042](https://discourse.processing.org/u/anon94203042)\
**Replies:** 1\
**Last updated:** [February 22, 2020, 3:57am UTC](https://discourse.processing.org/t/how-should-i-modify-this-for-loop-to-satisfy-a-condition/17994 "2020-02-22T03:57:36Z")

</div>

So let’s say that we have a for loop: SIZE = 3; // can be changed later on for (int a = 250; a \< SIZE; a += 100) What number should I add/multiply to SIZE so that the loop only runs 3 times? And I can’t set SIZE to a …

---

## [How to loop through objects?](https://discourse.processing.org/t/how-to-loop-through-objects/17990)

<div class="topic-metadata">

**Author:** [@anon94203042](https://discourse.processing.org/u/anon94203042)\
**Replies:** 5\
**Last updated:** [February 22, 2020, 2:50am UTC](https://discourse.processing.org/t/how-to-loop-through-objects/17990 "2020-02-22T02:50:21Z")

</div>

Let’s say that we have a simple class in use here: boolean wheatClicked = false; boolean carrotClicked = false; boolean potatoClicked = false; class Crop { int quantity; Crop(int cropQuantity) { quantity …

---

## [How can get the body outline contour through the Kinect?](https://discourse.processing.org/t/how-can-get-the-body-outline-contour-through-the-kinect/10384)

<div class="topic-metadata">

**Author:** [@jiangjun](https://discourse.processing.org/u/jiangjun)\
**Replies:** 7\
**Last updated:** [February 22, 2020, 2:13am UTC](https://discourse.processing.org/t/how-can-get-the-body-outline-contour-through-the-kinect/10384 "2020-02-22T02:13:14Z")

</div>

// code goes here import gab.opencv.\*; import KinectPV2.KJoint; import KinectPV2.\*; KinectPV2 kinect; OpenCV opencv; void setup() { //size(512, 424, P3D); fullScreen(); opencv=new OpenCV(this,1920,1080); // W…

---

## [Where is \`processing-java\` looking for libraries?](https://discourse.processing.org/t/where-is-processing-java-looking-for-libraries/17989)

<div class="topic-metadata">

**Author:** [@tophee](https://discourse.processing.org/u/tophee)\
**Replies:** 0\
**Last updated:** [February 21, 2020, 11:06pm UTC](https://discourse.processing.org/t/where-is-processing-java-looking-for-libraries/17989 "2020-02-21T23:06:16Z")

</div>

When I’m running processing on a headless server as described at https://github.com/processing/processing/wiki/Running-without-a-Display, where does it expect the libraries to be? I’m running xvfb-run /opt/processing-3.…

---

## [How to make spikes](https://discourse.processing.org/t/how-to-make-spikes/17935)

<div class="topic-metadata">

**Author:** [@DMTR](https://discourse.processing.org/u/DMTR)\
**Replies:** 31\
**Last updated:** [February 21, 2020, 2:41pm UTC](https://discourse.processing.org/t/how-to-make-spikes/17935 "2020-02-21T14:41:25Z")

</div>

Hey, i am new user in processing and java. Im creating my first game, and i need help of making randomly spawning objects that kills you if you hit it. I want those objects spawn to right and going to left (player is i…

---

## [How to reference an object in another function to its class?](https://discourse.processing.org/t/how-to-reference-an-object-in-another-function-to-its-class/17964)

<div class="topic-metadata">

**Author:** [@anon94203042](https://discourse.processing.org/u/anon94203042)\
**Replies:** 3\
**Last updated:** [February 21, 2020, 1:32pm UTC](https://discourse.processing.org/t/how-to-reference-an-object-in-another-function-to-its-class/17964 "2020-02-21T13:32:51Z")

</div>

Let’s say that we have a class and a function (sorry for the peudo-code): class Person { int age; } Person squid; void IncreaseAge(Human object) { } How would I make it so that I could do something like this: v…

---

## [Help to improve sketch framerate, especially LiquidFun/PixelFlow components](https://discourse.processing.org/t/help-to-improve-sketch-framerate-especially-liquidfun-pixelflow-components/17682)

<div class="topic-metadata">

**Author:** [@julianpb.c1](https://discourse.processing.org/u/julianpb.c1)\
**Replies:** 3\
**Last updated:** [February 21, 2020, 12:23am UTC](https://discourse.processing.org/t/help-to-improve-sketch-framerate-especially-liquidfun-pixelflow-components/17682 "2020-02-21T00:23:11Z")

</div>

I’m creating a display for a research study that will run on a MS Surface tablet that has an Intel i5-4300U and embedded graphics. When I run my current sketch on the tablet, I max out around 12fps, CPU runs around 20%, …

---

## [Kinect interacting with LED's (processing & Arduino)](https://discourse.processing.org/t/kinect-interacting-with-leds-processing-arduino/10799)

<div class="topic-metadata">

**Author:** [@juriaan](https://discourse.processing.org/u/juriaan)\
**Replies:** 2\
**Last updated:** [February 20, 2020, 10:09pm UTC](https://discourse.processing.org/t/kinect-interacting-with-leds-processing-arduino/10799 "2020-02-20T22:09:27Z")

</div>

0 I use a neopixel 6x6 led matrix (ws2812) + Arduino Uno I wrote a small code that uses Kinect to track movement in processing. It displays everything between the depth of 300 & 500 in pixels. I want this to be displa…

---

## [Reversing Random Distribution](https://discourse.processing.org/t/reversing-random-distribution/17427)

<div class="topic-metadata">

**Author:** [@PhilRandom](https://discourse.processing.org/u/PhilRandom)\
**Replies:** 2\
**Last updated:** [February 20, 2020, 7:20pm UTC](https://discourse.processing.org/t/reversing-random-distribution/17427 "2020-02-20T19:20:04Z")

</div>

Hello Fellow Coders, Phil Again, It seems that I have run into another coding predicament…oops. I have successfully coded a random distribution descending code that changes color when reaching the bottom of the canvas…

---

## [Lat long to screen coordinates from database](https://discourse.processing.org/t/lat-long-to-screen-coordinates-from-database/17434)

<div class="topic-metadata">

**Author:** [@katniss0809](https://discourse.processing.org/u/katniss0809)\
**Replies:** 1\
**Last updated:** [February 20, 2020, 6:56pm UTC](https://discourse.processing.org/t/lat-long-to-screen-coordinates-from-database/17434 "2020-02-20T18:56:41Z")

</div>

I have a set of coordinates (more than 100 points) from a JDBC connection and I want to display them on Processing canvas. However, the coordinates are in latitude and longitude, e.g (42.3541, -72.1675), how can I transf…

---

## [Shape (two parameters)](https://discourse.processing.org/t/shape-two-parameters/17465)

<div class="topic-metadata">

**Author:** [@paulstgeorge](https://discourse.processing.org/u/paulstgeorge)\
**Replies:** 1\
**Last updated:** [February 19, 2020, 4:51am UTC](https://discourse.processing.org/t/shape-two-parameters/17465 "2020-02-19T04:51:50Z")

</div>

I am trying to understand shape() and its two parameters. In this simple example below I have used createShape() to make two spheres. Spheres, in my world, are three-dimensional. All is fine until I get to position the s…

---

## ["If doc == null" not is correct](https://discourse.processing.org/t/if-doc-null-not-is-correct/17941)

<div class="topic-metadata">

**Author:** [@NoName](https://discourse.processing.org/u/NoName)\
**Replies:** 9\
**Last updated:** [February 20, 2020, 2:07pm UTC](https://discourse.processing.org/t/if-doc-null-not-is-correct/17941 "2020-02-20T14:07:53Z")

</div>

Guys, I tried to solve this problem myself, but I couldn’t. I have the docMain \[0\] line, which I take from the file on the phone, but even if it is null (checked), then the if check considers it not null anyway . how …

---

## [The count of files in the sketch folder?](https://discourse.processing.org/t/the-count-of-files-in-the-sketch-folder/17931)

<div class="topic-metadata">

**Author:** [@iamjustcurious](https://discourse.processing.org/u/iamjustcurious)\
**Replies:** 4\
**Last updated:** [February 20, 2020, 9:30am UTC](https://discourse.processing.org/t/the-count-of-files-in-the-sketch-folder/17931 "2020-02-20T09:30:58Z")

</div>

How can I get the number of files in the sketch folder? Second Question Is it possible to get the number of files in the desktop? Thanks.

---

## [Why can't use mouseX in pixels processing](https://discourse.processing.org/t/why-cant-use-mousex-in-pixels-processing/17926)

<div class="topic-metadata">

**Author:** [@fang1](https://discourse.processing.org/u/fang1)\
**Replies:** 2\
**Last updated:** [February 20, 2020, 2:39am UTC](https://discourse.processing.org/t/why-cant-use-mousex-in-pixels-processing/17926 "2020-02-20T02:39:07Z")

</div>

hello,guys! I’m sorry to borther you a little time about the problem I meeting in using mouseX,mouseY in loops of pixels location array.I find a code linkin this situation can run,but it doesn’t work on my processing sof…

---

## [Uber KML Icosahedron](https://discourse.processing.org/t/uber-kml-icosahedron/17601)

<div class="topic-metadata">

**Author:** [@HackinHarry](https://discourse.processing.org/u/HackinHarry)\
**Replies:** 2\
**Last updated:** [February 20, 2020, 1:02am UTC](https://discourse.processing.org/t/uber-kml-icosahedron/17601 "2020-02-20T01:02:05Z")

</div>

Somehow I ended up reading Uber’s articles on H3, a library they wrote to divide up their markets into hexagons. They have a github page : \[https://github.com/uber/h3/blob/master/KML/icosa.kml#L204\] that uses kml to d…

---

## [What are the advantages of using predefined functions over keywords?](https://discourse.processing.org/t/what-are-the-advantages-of-using-predefined-functions-over-keywords/17897)

<div class="topic-metadata">

**Author:** [@anon94203042](https://discourse.processing.org/u/anon94203042)\
**Replies:** 6\
**Last updated:** [February 19, 2020, 10:56pm UTC](https://discourse.processing.org/t/what-are-the-advantages-of-using-predefined-functions-over-keywords/17897 "2020-02-19T22:56:46Z")

</div>

Are there any benefits to using void keyPressed() {} instead of if (keyPressed)? Or void mousePressed() {} instead of if (mousePressed). Or something like that. And in which situations would you use one over the other?

---

## [Web loadStrings](https://discourse.processing.org/t/web-loadstrings/17923)

<div class="topic-metadata">

**Author:** [@juanjoc](https://discourse.processing.org/u/juanjoc)\
**Replies:** 2\
**Last updated:** [February 19, 2020, 11:59am UTC](https://discourse.processing.org/t/web-loadstrings/17923 "2020-02-19T11:59:46Z")

</div>

Hi guys Im working with data extraction of the web. I tried to use examples like the following String\[\] rawhtml; String \[\] shows; String html; int j = 0; void setup(){ rawhtml = loadStrings("\<a href="http://www.boc…

---

## [Time synched animation](https://discourse.processing.org/t/time-synched-animation/17685)

<div class="topic-metadata">

**Author:** [@BrokenCode](https://discourse.processing.org/u/BrokenCode)\
**Replies:** 15\
**Last updated:** [February 19, 2020, 6:45pm UTC](https://discourse.processing.org/t/time-synched-animation/17685 "2020-02-19T18:45:53Z")

</div>

Hello everyone, here I’m trying to divide the screen with a grid, then fill each tile in a pre-determined amount of time: (this is the most simplified - even silly - example) float timeToConsume = 7, timeToCancelBin; in…

---

## [Processing project started in CMD - error handling](https://discourse.processing.org/t/processing-project-started-in-cmd-error-handling/17930)

<div class="topic-metadata">

**Author:** [@GeorgeJava](https://discourse.processing.org/u/GeorgeJava)\
**Replies:** 6\
**Last updated:** [February 19, 2020, 2:55pm UTC](https://discourse.processing.org/t/processing-project-started-in-cmd-error-handling/17930 "2020-02-19T14:55:09Z")

</div>

I just start bat file, and want to open some my .pde project, and run it… It works, but… When i have some syntax error in the code, it will only close cmd… I want to get the error, where is it ? What is it ? What is …

---

## [Creating a structure of linked tetrahedra](https://discourse.processing.org/t/creating-a-structure-of-linked-tetrahedra/16955)

<div class="topic-metadata">

**Author:** [@dauwpunt](https://discourse.processing.org/u/dauwpunt)\
**Replies:** 13\
**Last updated:** [February 19, 2020, 1:41pm UTC](https://discourse.processing.org/t/creating-a-structure-of-linked-tetrahedra/16955 "2020-02-19T13:41:12Z")

</div>

Hi there. I am trying to generate a 3D landscape of tetrahedra, so to say, and I’m having some trouble with the mathematics and coding of it. I’m also still quite new to Processing! If I am not being clear enough about s…

---

## [The slider of cp5 library is not responsive](https://discourse.processing.org/t/the-slider-of-cp5-library-is-not-responsive/17856)

<div class="topic-metadata">

**Author:** [@Kamel](https://discourse.processing.org/u/Kamel)\
**Replies:** 3\
**Last updated:** [February 19, 2020, 6:53am UTC](https://discourse.processing.org/t/the-slider-of-cp5-library-is-not-responsive/17856 "2020-02-19T06:53:06Z")

</div>

hello everyone i am using cp5 library to get and represent json data “sensors values” from arduino and from the processing program i want to send to parameters to arduino “percentage and frequency”, i am using two slide…

---

## [Utilisation manette en processing](https://discourse.processing.org/t/utilisation-manette-en-processing/17481)

<div class="topic-metadata">

**Author:** [@theclimbhacker](https://discourse.processing.org/u/theclimbhacker)\
**Replies:** 4\
**Last updated:** [February 19, 2020, 6:06am UTC](https://discourse.processing.org/t/utilisation-manette-en-processing/17481 "2020-02-19T06:06:30Z")

</div>

Bonjour, Je cherche a utilisé une manette (Gamecube dans mon cas) pour faire bouger un personnage dans un jeu. J’ai essayé de détecter les boutons de la manette avec la sous fonction keyCode, pensant que les boutons ré…

---

## [SVG Export Error](https://discourse.processing.org/t/svg-export-error/17882)

<div class="topic-metadata">

**Author:** [@fmS3lect](https://discourse.processing.org/u/fmS3lect)\
**Replies:** 1\
**Last updated:** [February 19, 2020, 5:59am UTC](https://discourse.processing.org/t/svg-export-error/17882 "2020-02-19T05:59:00Z")

</div>

Hi all, i try to export an SVG but i get some kind of error, i have googled about this problem but did not found any solution… does someone know how it might work ? Much Thanks Sebastian import processing.video.\*; im…

---

## [Arduino + Processing Serial Port DATA TRANSFER](https://discourse.processing.org/t/arduino-processing-serial-port-data-transfer/16968)

<div class="topic-metadata">

**Author:** [@kristipham](https://discourse.processing.org/u/kristipham)\
**Replies:** 16\
**Last updated:** [February 19, 2020, 2:49am UTC](https://discourse.processing.org/t/arduino-processing-serial-port-data-transfer/16968 "2020-02-19T02:49:59Z")

</div>

This is my control center which displays the buttons for each room. I am wanting to turn on the lights in one room and have my light sensor transfer the data from Arduino’s serial port into Processing to display the read…

---

## [Problem making a wrap around loop with modulo](https://discourse.processing.org/t/problem-making-a-wrap-around-loop-with-modulo/17851)

<div class="topic-metadata">

**Author:** [@debxyz](https://discourse.processing.org/u/debxyz)\
**Replies:** 9\
**Last updated:** [February 19, 2020, 2:09am UTC](https://discourse.processing.org/t/problem-making-a-wrap-around-loop-with-modulo/17851 "2020-02-19T02:09:59Z")

</div>

I’m trying to make a wrap around loop with modulus. But it’s not working. Keep getting error “expecting {, found \[”. Showing function for loop appears in. If anyone can help, many thanks! color\[\]getThreeColorLerp() { …

---

## [Range of values for add method for Sound oscillators](https://discourse.processing.org/t/range-of-values-for-add-method-for-sound-oscillators/17813)

<div class="topic-metadata">

**Author:** [@paul-reiners](https://discourse.processing.org/u/paul-reiners)\
**Replies:** 2\
**Last updated:** [February 19, 2020, 12:58am UTC](https://discourse.processing.org/t/range-of-values-for-add-method-for-sound-oscillators/17813 "2020-02-19T00:58:58Z")

</div>

What is the range of values for the add method for Sound oscillators? The documentation says that the method “offset\[s\] the output of the oscillator by given value”. But what does this mean, exactly?

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

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