# Processing

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

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

**Page:** 151

---

## [How can i show only a certain number of members of an Array?](https://discourse.processing.org/t/how-can-i-show-only-a-certain-number-of-members-of-an-array/27727)

<div class="topic-metadata">

**Author:** [@nicnut](https://discourse.processing.org/u/nicnut)\
**Replies:** 7\
**Last updated:** [February 13, 2021, 2:01am UTC](https://discourse.processing.org/t/how-can-i-show-only-a-certain-number-of-members-of-an-array/27727 "2021-02-13T02:01:04Z")

</div>

Hi, I have always been bad with Arrays, maybe someone can help me out. I am trying to create an interactive Processing sketch, where I send OSC messages into Processing, which I have worked out. I took one of the exam…

---

## [Finding problem with A\* algorithm](https://discourse.processing.org/t/finding-problem-with-a-algorithm/27773)

<div class="topic-metadata">

**Author:** [@jensemand](https://discourse.processing.org/u/jensemand)\
**Replies:** 0\
**Last updated:** [February 12, 2021, 8:50pm UTC](https://discourse.processing.org/t/finding-problem-with-a-algorithm/27773 "2021-02-12T20:50:19Z")

</div>

Hi I am trying to to make a pathfinding system with the A\* algorithm and I have tried to make my own but that didn’t seem to work so I tried to make the one from the coding challenge by The coding train. I am close to ma…

---

## [What java libaries are default in processing?](https://discourse.processing.org/t/what-java-libaries-are-default-in-processing/27737)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 3\
**Last updated:** [February 12, 2021, 7:13pm UTC](https://discourse.processing.org/t/what-java-libaries-are-default-in-processing/27737 "2021-02-12T19:13:14Z")

</div>

Hi! I recently started looking into java libraries. I tried a few libraries and saw that the java.event.KeyListener looks and works exactly like void keyPressed() keyReleased() keyTyped() Which other libraries are in …

---

## [Scalable chart graphics](https://discourse.processing.org/t/scalable-chart-graphics/27763)

<div class="topic-metadata">

**Author:** [@xbix](https://discourse.processing.org/u/xbix)\
**Replies:** 4\
**Last updated:** [February 12, 2021, 5:21pm UTC](https://discourse.processing.org/t/scalable-chart-graphics/27763 "2021-02-12T17:21:35Z")

</div>

I want to create good scalable chart graphics, are there any good tutorials about this topic? Or maybe someone would like to share his ideas about this topic? Thanks a lot!

---

## [How do I calculate the width of a string in pixels?](https://discourse.processing.org/t/how-do-i-calculate-the-width-of-a-string-in-pixels/27762)

<div class="topic-metadata">

**Author:** [@xbix](https://discourse.processing.org/u/xbix)\
**Replies:** 1\
**Last updated:** [February 12, 2021, 4:14pm UTC](https://discourse.processing.org/t/how-do-i-calculate-the-width-of-a-string-in-pixels/27762 "2021-02-12T16:14:44Z")

</div>

How to calculate the width of a String in pixels in Processing? For e.g., I have a string that says “Processing”. What is its length in pixels, also considering its font family and size? Thanks in advance!

---

## [G4P - Click on panel disables button](https://discourse.processing.org/t/g4p-click-on-panel-disables-button/27730)

<div class="topic-metadata">

**Author:** [@blerk](https://discourse.processing.org/u/blerk)\
**Replies:** 5\
**Last updated:** [February 12, 2021, 12:12pm UTC](https://discourse.processing.org/t/g4p-click-on-panel-disables-button/27730 "2021-02-12T12:12:30Z")

</div>

Hello! I found that if i click on a not collapsible panel (without dragging) it disables buttons. Is that expected behaviour? If yes, can I change it? Here is some code to exemplify what i mean: main import g4p\_contr…

---

## [Chladni patterns & interference patterns code understanding](https://discourse.processing.org/t/chladni-patterns-interference-patterns-code-understanding/17766)

<div class="topic-metadata">

**Author:** [@Ruchi](https://discourse.processing.org/u/Ruchi)\
**Replies:** 3\
**Last updated:** [February 11, 2021, 4:35am UTC](https://discourse.processing.org/t/chladni-patterns-interference-patterns-code-understanding/17766 "2021-02-11T04:35:42Z")

</div>

Chladni Pattern Interference Pattern I am referring to these patterns code by carlos ponce in open processing. I can’t seem to understand a bit of what is actually causing pattern. Dissecting it bit by bit but intuiti…

---

## [Examples of 3D Alluvial Plots?](https://discourse.processing.org/t/examples-of-3d-alluvial-plots/27739)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 3\
**Last updated:** [February 11, 2021, 11:02pm UTC](https://discourse.processing.org/t/examples-of-3d-alluvial-plots/27739 "2021-02-11T23:02:36Z")

</div>

Do you know of any libraries or projects that use some sort of 3-D alluvial plot to plot data with processing (obviously)?

---

## [Algorithms for penrose tiling patterns](https://discourse.processing.org/t/algorithms-for-penrose-tiling-patterns/27741)

<div class="topic-metadata">

**Author:** [@daniel.tran](https://discourse.processing.org/u/daniel.tran)\
**Replies:** 3\
**Last updated:** [February 11, 2021, 9:48pm UTC](https://discourse.processing.org/t/algorithms-for-penrose-tiling-patterns/27741 "2021-02-11T21:48:08Z")

</div>

Hello, I was hoping to restart this thread from the user spinvector: I want to ask if anyone has any experience in this. They appear to be quite tricky to generate, as they don’t have translation symmetries. So I don’…

---

## [Short 5 second .PNG animation](https://discourse.processing.org/t/short-5-second-png-animation/27664)

<div class="topic-metadata">

**Author:** [@Huber542](https://discourse.processing.org/u/Huber542)\
**Replies:** 9\
**Last updated:** [February 11, 2021, 7:42pm UTC](https://discourse.processing.org/t/short-5-second-png-animation/27664 "2021-02-11T19:42:41Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hey everyone! I’m VERY new, I’ve been assigned a small task of creating a moving animation. So what I decided I’d do is create some frames in p…

---

## [Simulate Mouse click and Key (Robot class)](https://discourse.processing.org/t/simulate-mouse-click-and-key-robot-class/27709)

<div class="topic-metadata">

**Author:** [@amarlo](https://discourse.processing.org/u/amarlo)\
**Replies:** 5\
**Last updated:** [February 11, 2021, 3:55pm UTC](https://discourse.processing.org/t/simulate-mouse-click-and-key-robot-class/27709 "2021-02-11T15:55:24Z")

</div>

Hello, I have found some information about simulate click mouse and simulate a keypressed using Robot library. I am using Processing 3 and I dont find this library. Please, can you tell me where to download and informat…

---

## [How can I make multiple objects of the same class to execute the same method at the same time?](https://discourse.processing.org/t/how-can-i-make-multiple-objects-of-the-same-class-to-execute-the-same-method-at-the-same-time/26654)

<div class="topic-metadata">

**Author:** [@SailorToei](https://discourse.processing.org/u/SailorToei)\
**Replies:** 12\
**Last updated:** [February 11, 2021, 12:22pm UTC](https://discourse.processing.org/t/how-can-i-make-multiple-objects-of-the-same-class-to-execute-the-same-method-at-the-same-time/26654 "2021-02-11T12:22:20Z")

</div>

Hello, I am working on a 3D game and in the world of the game are trees. The character class has a method, where its xPos, yPos and zPos are made equal with the variables ax, by and cz, which count for the whole program.…

---

## [2d array expand()](https://discourse.processing.org/t/2d-array-expand/27732)

<div class="topic-metadata">

**Author:** [@HeyHo](https://discourse.processing.org/u/HeyHo)\
**Replies:** 1\
**Last updated:** [February 11, 2021, 11:20am UTC](https://discourse.processing.org/t/2d-array-expand/27732 "2021-02-11T11:20:39Z")

</div>

Hey! I just coded this little program: int path \[\]\[\] = new int\[1\]\[4\]; //path = {{0,0,0,0}} path \[0\]\[0\] = -1; //path = {{-1,0,0,0}} path = (int\[\]\[\])expand(path, path.length + 1); //path = {{-1,0,0,0}, //…

---

## [JSON Objects Attribute sequence issue](https://discourse.processing.org/t/json-objects-attribute-sequence-issue/27700)

<div class="topic-metadata">

**Author:** [@Ruchi](https://discourse.processing.org/u/Ruchi)\
**Replies:** 5\
**Last updated:** [February 11, 2021, 10:41am UTC](https://discourse.processing.org/t/json-objects-attribute-sequence-issue/27700 "2021-02-11T10:41:23Z")

</div>

JSONObject json; JSONArray array; JSONObject loc; void setup() { size(800, 800); array = new JSONArray(); json = new JSONObject(); } void draw() { } void keyPressed() { if (key =='s') { for (int i=0; i\<…

---

## [How to connect points with curveVertices?](https://discourse.processing.org/t/how-to-connect-points-with-curvevertices/27719)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 4\
**Last updated:** [February 11, 2021, 6:52am UTC](https://discourse.processing.org/t/how-to-connect-points-with-curvevertices/27719 "2021-02-11T06:52:15Z")

</div>

I’m working on a project where I’m trying to connect points with curveVertex. I’m struggling to do that because I don’t know how to tell processing how to group values. I’m using the following raw data item class dat…

---

## [Missing semicolon](https://discourse.processing.org/t/missing-semicolon/27721)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 3\
**Last updated:** [February 11, 2021, 5:08am UTC](https://discourse.processing.org/t/missing-semicolon/27721 "2021-02-11T05:08:18Z")

</div>

My code throws an error (“missing ;”) and I don’t know why… int i =0; while (i \< books.size()){ for(i\<books.size(); i++){ } }

---

## [G4P - Remember Option Selected in New Window](https://discourse.processing.org/t/g4p-remember-option-selected-in-new-window/27697)

<div class="topic-metadata">

**Author:** [@alenmartel](https://discourse.processing.org/u/alenmartel)\
**Replies:** 3\
**Last updated:** [February 10, 2021, 9:55pm UTC](https://discourse.processing.org/t/g4p-remember-option-selected-in-new-window/27697 "2021-02-10T21:55:55Z")

</div>

Good afternoon all; I’m making a little app and have only gotten as far as setting up the GUI using G4P. I’ve set it up so that there is a floating panel with buttons that open up more windows that let you select certai…

---

## [(NOOB) How to keep a shape on screen after I release the mouse click?](https://discourse.processing.org/t/noob-how-to-keep-a-shape-on-screen-after-i-release-the-mouse-click/27712)

<div class="topic-metadata">

**Author:** [@abo\_shack](https://discourse.processing.org/u/abo_shack)\
**Replies:** 3\
**Last updated:** [February 10, 2021, 8:06pm UTC](https://discourse.processing.org/t/noob-how-to-keep-a-shape-on-screen-after-i-release-the-mouse-click/27712 "2021-02-10T20:06:25Z")

</div>

Hey guys, super noob here. I have a simple code where when I left click it produces a red dot, and when I right click it produces a blue dot. When I release my click the dot disappears. How do I get the dot to stay on th…

---

## [Colormap an rgb or grayscale image to spectral - effect like thermal image](https://discourse.processing.org/t/colormap-an-rgb-or-grayscale-image-to-spectral-effect-like-thermal-image/27703)

<div class="topic-metadata">

**Author:** [@dimpapadop](https://discourse.processing.org/u/dimpapadop)\
**Replies:** 4\
**Last updated:** [February 10, 2021, 4:38pm UTC](https://discourse.processing.org/t/colormap-an-rgb-or-grayscale-image-to-spectral-effect-like-thermal-image/27703 "2021-02-10T16:38:31Z")

</div>

How can i achieve a colormapping effect from a pimage rgb (or even i could first convert to grayscale) to a range near the spectral like below? - based on brightness on grayscale. or based on blue and red brightness on r…

---

## [Problems with Arrays](https://discourse.processing.org/t/problems-with-arrays/26933)

<div class="topic-metadata">

**Author:** [@SailorToei](https://discourse.processing.org/u/SailorToei)\
**Replies:** 3\
**Last updated:** [February 10, 2021, 11:19am UTC](https://discourse.processing.org/t/problems-with-arrays/26933 "2021-02-10T11:19:30Z")

</div>

Hello there, I previously asked how I can make objects of the same class to execute the same function at the same time. I think the solution to this problem is an array. Unfortuneately it does not work as intended. When…

---

## [Looking for example BELL code using Wellen library](https://discourse.processing.org/t/looking-for-example-bell-code-using-wellen-library/27635)

<div class="topic-metadata">

**Author:** [@PurpleSquircle](https://discourse.processing.org/u/PurpleSquircle)\
**Replies:** 3\
**Last updated:** [February 9, 2021, 9:27pm UTC](https://discourse.processing.org/t/looking-for-example-bell-code-using-wellen-library/27635 "2021-02-09T21:27:28Z")

</div>

I’m using the Wellen audio library to create sounds for my second ever Processing project, so apologies if this is an easy question - I’m still a novice programmer. The library was updated in January to include a small b…

---

## [Playing around with fluid simulation](https://discourse.processing.org/t/playing-around-with-fluid-simulation/27670)

<div class="topic-metadata">

**Author:** [@pelinkiliboz](https://discourse.processing.org/u/pelinkiliboz)\
**Replies:** 3\
**Last updated:** [February 9, 2021, 12:27pm UTC](https://discourse.processing.org/t/playing-around-with-fluid-simulation/27670 "2021-02-09T12:27:45Z")

</div>

Hello, I’ve been playing around with Daniel Shiffman’s fluid simulation tutorial and trying to find a way to add a different color every time the mouse is pressed (or when the color is chosen, is where I’m trying to get)…

---

## [How to check whether value is in range](https://discourse.processing.org/t/how-to-check-whether-value-is-in-range/27680)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 2\
**Last updated:** [February 9, 2021, 3:42am UTC](https://discourse.processing.org/t/how-to-check-whether-value-is-in-range/27680 "2021-02-09T03:42:56Z")

</div>

I’d like to check whether a value is in a range and then return a color accordingly. This is the first of many if statements: if(range.between(0,100).contains(value)){ c = #1a1334; } else if(Range.between(101,200).co…

---

## [Individually targeting shapes?](https://discourse.processing.org/t/individually-targeting-shapes/27678)

<div class="topic-metadata">

**Author:** [@wgm1](https://discourse.processing.org/u/wgm1)\
**Replies:** 1\
**Last updated:** [February 9, 2021, 12:48am UTC](https://discourse.processing.org/t/individually-targeting-shapes/27678 "2021-02-09T00:48:50Z")

</div>

link to view: https://unruly-wooden-hippopotamus.glitch.me I’m trying to individually target each ellipse and change their speeds after they hit the halfway point so they all reach the end at the same time. Right now I…

---

## [Ray Tracing In Processing is Possible!](https://discourse.processing.org/t/ray-tracing-in-processing-is-possible/27483)

<div class="topic-metadata">

**Author:** [@humayung](https://discourse.processing.org/u/humayung)\
**Replies:** 4\
**Last updated:** [February 8, 2021, 7:34pm UTC](https://discourse.processing.org/t/ray-tracing-in-processing-is-possible/27483 "2021-02-08T19:34:54Z")

</div>

I amazed of someone’s work: Ray Tracing In Console You can check his/her work on youtube The code is made in C++ so i try to port it into under processing environment and made some modifications. Nb: Dont ask me how i…

---

## [Unexpected behavior of char\[\] in print / println](https://discourse.processing.org/t/unexpected-behavior-of-char-in-print-println/27609)

<div class="topic-metadata">

**Author:** [@Thur](https://discourse.processing.org/u/Thur)\
**Replies:** 12\
**Last updated:** [February 8, 2021, 3:27pm UTC](https://discourse.processing.org/t/unexpected-behavior-of-char-in-print-println/27609 "2021-02-08T15:27:52Z")

</div>

Hey. While working with an array of characters I checked the value of the array members by using the print / println function. The code boils down to : void setup() { char\[\] ch = new char\[2\]; ch\[0\] = ‘0’; ch\[1\] = ‘0’; …

---

## [Problem sending byte array to Arduino over serial](https://discourse.processing.org/t/problem-sending-byte-array-to-arduino-over-serial/27628)

<div class="topic-metadata">

**Author:** [@gonadgranny](https://discourse.processing.org/u/gonadgranny)\
**Replies:** 2\
**Last updated:** [February 8, 2021, 11:15am UTC](https://discourse.processing.org/t/problem-sending-byte-array-to-arduino-over-serial/27628 "2021-02-08T11:15:00Z")

</div>

Hi there. I am trying to send a byte array to an arduino via serial. the array represents a jpeg image.i generated it by converting the image to hex values separated by commas.I chose this because this is what the arduin…

---

## [Simulate tree shadow?](https://discourse.processing.org/t/simulate-tree-shadow/27476)

<div class="topic-metadata">

**Author:** [@greeneman42](https://discourse.processing.org/u/greeneman42)\
**Replies:** 5\
**Last updated:** [February 8, 2021, 10:51am UTC](https://discourse.processing.org/t/simulate-tree-shadow/27476 "2021-02-08T10:51:33Z")

</div>

Hi, I’ve been using p5js and processing for a while now and have some experience making animations/art using sine waves, noise, etc. but I’m currently wondering how to re-create some art that I’ve found and have been a b…

---

## [Using opencv.detect() and using the face position to replace mouse position in an existing sketch](https://discourse.processing.org/t/using-opencv-detect-and-using-the-face-position-to-replace-mouse-position-in-an-existing-sketch/27651)

<div class="topic-metadata">

**Author:** [@eelhum](https://discourse.processing.org/u/eelhum)\
**Replies:** 3\
**Last updated:** [February 8, 2021, 5:44am UTC](https://discourse.processing.org/t/using-opencv-detect-and-using-the-face-position-to-replace-mouse-position-in-an-existing-sketch/27651 "2021-02-08T05:44:21Z")

</div>

Here's the code i currently have, for some reason i keep getting back ArrayIndexOutOfBoundsException = 0; when in theory i thought replacing the faces\[i\].x in place of mouseX and faces\[i\].y in place of mouseY would make …

---

## [How to run program for x seconds, pause for x seconds?](https://discourse.processing.org/t/how-to-run-program-for-x-seconds-pause-for-x-seconds/27661)

<div class="topic-metadata">

**Author:** [@lauren](https://discourse.processing.org/u/lauren)\
**Replies:** 1\
**Last updated:** [February 8, 2021, 12:53am UTC](https://discourse.processing.org/t/how-to-run-program-for-x-seconds-pause-for-x-seconds/27661 "2021-02-08T00:53:07Z")

</div>

Hi, I’m new to processing and I’m trying to figure out a way to run a function, pause for a certain amount of time, then continue running the program. So something like this -run function 1 for 0.1 seconds -pause for 0…

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

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