# Processing

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

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

**Page:** 190

---

## [Set uniform double in shader](https://discourse.processing.org/t/set-uniform-double-in-shader/23106)

<div class="topic-metadata">

**Author:** [@toby](https://discourse.processing.org/u/toby)\
**Replies:** 4\
**Last updated:** [August 8, 2020, 6:22pm UTC](https://discourse.processing.org/t/set-uniform-double-in-shader/23106 "2020-08-08T18:22:41Z")

</div>

Hello all I’m using a fragment shader to compute fractals, so I’d like to use doubles in the shader. However the PShader.set() method for setting shader uniforms only supports float. Can anyone suggest how I can set a d…

---

## [How can I make a color for the flower inside](https://discourse.processing.org/t/how-can-i-make-a-color-for-the-flower-inside/23127)

<div class="topic-metadata">

**Author:** [@Intissar](https://discourse.processing.org/u/Intissar)\
**Replies:** 2\
**Last updated:** [August 8, 2020, 8:33am UTC](https://discourse.processing.org/t/how-can-i-make-a-color-for-the-flower-inside/23127 "2020-08-08T08:33:42Z")

</div>

float xCenter = 600 /2; float yCenter = 600 /2; float scale = 200; float\[\] innerX; // store xPoints for the 6 points on the inner circle float\[\] innerY; // store yPoints for the 6 points on the inner circle float\[\] ou…

---

## [Trying to fill a shape with a pixel colour from a loaded image](https://discourse.processing.org/t/trying-to-fill-a-shape-with-a-pixel-colour-from-a-loaded-image/22996)

<div class="topic-metadata">

**Author:** [@jesspayne](https://discourse.processing.org/u/jesspayne)\
**Replies:** 7\
**Last updated:** [August 8, 2020, 4:53pm UTC](https://discourse.processing.org/t/trying-to-fill-a-shape-with-a-pixel-colour-from-a-loaded-image/22996 "2020-08-08T16:53:47Z")

</div>

Hi! Firstly please excuse my newbie question! Could anyone point me in the right direction please? I am trying to source a random pixel colour from a loaded image and load it in to a shape. I have spent a few hours look…

---

## [What to do when two libraries share the same ".jar" file?](https://discourse.processing.org/t/what-to-do-when-two-libraries-share-the-same-jar-file/23124)

<div class="topic-metadata">

**Author:** [@iannisxenokiss](https://discourse.processing.org/u/iannisxenokiss)\
**Replies:** 4\
**Last updated:** [August 8, 2020, 9:01am UTC](https://discourse.processing.org/t/what-to-do-when-two-libraries-share-the-same-jar-file/23124 "2020-08-08T09:01:13Z")

</div>

Hi gals and guys! I’m using a Leap Motion for a project and have two libraries using the same “LeapJava.jar” file, so whenever I try to run the sketch it throws: “Duplicate libraries found for com.leapmotion.leap” Is t…

---

## [Accessing PApplet methods in static](https://discourse.processing.org/t/accessing-papplet-methods-in-static/23112)

<div class="topic-metadata">

**Author:** [@SemAntys](https://discourse.processing.org/u/SemAntys)\
**Replies:** 2\
**Last updated:** [August 7, 2020, 8:24pm UTC](https://discourse.processing.org/t/accessing-papplet-methods-in-static/23112 "2020-08-07T20:24:22Z")

</div>

Hi, I’m trying to access PApplet methods in a static class, in this case the color() method. I’ve tried following this discussion, but I can’t make it work. I’ve written this: static class myclass { static int myc…

---

## [Running an External Program Within Processing + Overlay Images & Text](https://discourse.processing.org/t/running-an-external-program-within-processing-overlay-images-text/23118)

<div class="topic-metadata">

**Author:** [@YellowGTM](https://discourse.processing.org/u/YellowGTM)\
**Replies:** 5\
**Last updated:** [August 7, 2020, 7:56pm UTC](https://discourse.processing.org/t/running-an-external-program-within-processing-overlay-images-text/23118 "2020-08-07T19:56:13Z")

</div>

I’m reading and searching on JFrame, etc. Everyone seems to have a different application than what I’m searching. I’d like to run a 3rd party software within my Processing exe, and allow images and text to be placed o…

---

## [Launch() with additional Parameters](https://discourse.processing.org/t/launch-with-additional-parameters/23114)

<div class="topic-metadata">

**Author:** [@YellowGTM](https://discourse.processing.org/u/YellowGTM)\
**Replies:** 1\
**Last updated:** [August 7, 2020, 6:37pm UTC](https://discourse.processing.org/t/launch-with-additional-parameters/23114 "2020-08-07T18:37:41Z")

</div>

Is Processing able to handle Launch strings with added parameters such as the example below? This is a path copied from a program shortcut: “C:\\Program Files (x86)\\Navigator19\\PC\_Navigator\\PC\_Navigator.exe” --atlas=‘C:…

---

## [Random Number Generation without Repetition](https://discourse.processing.org/t/random-number-generation-without-repetition/4767)

<div class="topic-metadata">

**Author:** [@danielo](https://discourse.processing.org/u/danielo)\
**Replies:** 4\
**Last updated:** [August 7, 2020, 3:21pm UTC](https://discourse.processing.org/t/random-number-generation-without-repetition/4767 "2020-08-07T15:21:51Z")

</div>

I am trying to generate random numbers of a specified range (0-35, for example) without generating any number twice until all numbers have been generated once. Thank you for any guidance. Regards, Daniel

---

## [How to increase number?](https://discourse.processing.org/t/how-to-increase-number/23024)

<div class="topic-metadata">

**Author:** [@Rai](https://discourse.processing.org/u/Rai)\
**Replies:** 14\
**Last updated:** [August 7, 2020, 6:22am UTC](https://discourse.processing.org/t/how-to-increase-number/23024 "2020-08-07T06:22:42Z")

</div>

int i = 33; void setup() { } void draw() { for (char c = char(i); c \< i+58; c++) println( i + " : " + c); } how to increase number i to 34, 35, 36, etc thanks

---

## [How to use 'BeatDetect' correctly with Minim library?](https://discourse.processing.org/t/how-to-use-beatdetect-correctly-with-minim-library/23034)

<div class="topic-metadata">

**Author:** [@anon76195010](https://discourse.processing.org/u/anon76195010)\
**Replies:** 18\
**Last updated:** [August 7, 2020, 12:51am UTC](https://discourse.processing.org/t/how-to-use-beatdetect-correctly-with-minim-library/23034 "2020-08-07T00:51:46Z")

</div>

On this page http://code.compartmental.net/minim/beatdetect\_class\_beatdetect.html I am trying to figure out how to detect beats. There is some confusions that I have. void draw() { background(0); beat.detect(song.…

---

## [Network events synchronization problem](https://discourse.processing.org/t/network-events-synchronization-problem/22907)

<div class="topic-metadata">

**Author:** [@alexis.lacasse.1](https://discourse.processing.org/u/alexis.lacasse.1)\
**Replies:** 3\
**Last updated:** [August 6, 2020, 9:13pm UTC](https://discourse.processing.org/t/network-events-synchronization-problem/22907 "2020-08-06T21:13:19Z")

</div>

Hi, I’m using serverEvent, clientEvent and disconnectEvent events to make a basic HTTP server. There seems to be synchronization problems between each events. Here’s my code: import processing.net.\*; byte\[\]\[\] Files = …

---

## [String Array {}](https://discourse.processing.org/t/string-array/23082)

<div class="topic-metadata">

**Author:** [@NoName](https://discourse.processing.org/u/NoName)\
**Replies:** 9\
**Last updated:** [August 6, 2020, 3:13pm UTC](https://discourse.processing.org/t/string-array/23082 "2020-08-06T15:13:45Z")

</div>

can i re-declare the variables in curly braces after declaring the string array? / String \[\] test = new String \[500\]; void setup(){} void draw(){ test \[\] = {“shshsj”, “sjjsjsjs”, “2+288383”}; } \</ this does not w…

---

## [IndexOutOfBoundsException for Virtual Ecosystem](https://discourse.processing.org/t/indexoutofboundsexception-for-virtual-ecosystem/23081)

<div class="topic-metadata">

**Author:** [@LordCacops](https://discourse.processing.org/u/LordCacops)\
**Replies:** 3\
**Last updated:** [August 6, 2020, 3:02pm UTC](https://discourse.processing.org/t/indexoutofboundsexception-for-virtual-ecosystem/23081 "2020-08-06T15:02:29Z")

</div>

Hello. I am having trouble with a program, where there is a likelihood of it crashing due to an IndexOutOfBoundsException error from an arrayList. It is an ecosystem program that creates “animal objects” and adds them t…

---

## [\[ControlP5\] passing array to CallbackListener](https://discourse.processing.org/t/controlp5-passing-array-to-callbacklistener/23013)

<div class="topic-metadata">

**Author:** [@ForgottenCat](https://discourse.processing.org/u/ForgottenCat)\
**Replies:** 2\
**Last updated:** [August 6, 2020, 12:20pm UTC](https://discourse.processing.org/t/controlp5-passing-array-to-callbacklistener/23013 "2020-08-06T12:20:50Z")

</div>

Hi everybody, I am using Processing 3.5.4 and ControlP5 i was wondering if there is a way to pass any variables or in my case an array to a callback function. In detail: I want sort of a tab function but with vertical…

---

## [Low frameRate, my code gives 10 - 15 frames](https://discourse.processing.org/t/low-framerate-my-code-gives-10-15-frames/23053)

<div class="topic-metadata">

**Author:** [@yhlaskerimov](https://discourse.processing.org/u/yhlaskerimov)\
**Replies:** 10\
**Last updated:** [August 6, 2020, 6:42am UTC](https://discourse.processing.org/t/low-framerate-my-code-gives-10-15-frames/23053 "2020-08-06T06:42:23Z")

</div>

Hello everyone. My code doesnt give me 30 frameRate even i dont do much thing there ! Help me please, thanks. String s = "belli"; PFont font; int tileCount = 25; float tileWidth, tileHeight; void setup() { size(800,…

---

## [Having trouble with making the Snake game](https://discourse.processing.org/t/having-trouble-with-making-the-snake-game/23064)

<div class="topic-metadata">

**Author:** [@i\_dont](https://discourse.processing.org/u/i_dont)\
**Replies:** 2\
**Last updated:** [August 6, 2020, 12:52am UTC](https://discourse.processing.org/t/having-trouble-with-making-the-snake-game/23064 "2020-08-06T00:52:00Z")

</div>

Hey this is my first time posting anything here or asking for help but I’m kinda stumped. I coded the game “Snake” and despite being very basic as I’m a beginner, it turned out pretty alright. The only real problem I’m h…

---

## [Post Request transform to GET Method](https://discourse.processing.org/t/post-request-transform-to-get-method/22927)

<div class="topic-metadata">

**Author:** [@b005](https://discourse.processing.org/u/b005)\
**Replies:** 2\
**Last updated:** [August 6, 2020, 12:19am UTC](https://discourse.processing.org/t/post-request-transform-to-get-method/22927 "2020-08-06T00:19:55Z")

</div>

Hello, I purchased a board which has the code written in Processing, I want to use GET Method to upload data using URL to my server, but the board has only post request following code: Could you please help me to trans…

---

## [Sound examples are all noisy on Linux](https://discourse.processing.org/t/sound-examples-are-all-noisy-on-linux/4708)

<div class="topic-metadata">

**Author:** [@gratefulfrog](https://discourse.processing.org/u/gratefulfrog)\
**Replies:** 1\
**Last updated:** [August 5, 2020, 8:58pm UTC](https://discourse.processing.org/t/sound-examples-are-all-noisy-on-linux/4708 "2020-08-05T20:58:19Z")

</div>

Hi, I’m experimenting with the sound library and can’t get any examples to play cleanly. There is more or less constant grinding crackling chopping noise mixed with the sine waves that I try to make. This occurs with …

---

## [How can I make a new ball from colliding?](https://discourse.processing.org/t/how-can-i-make-a-new-ball-from-colliding/23055)

<div class="topic-metadata">

**Author:** [@terry0728](https://discourse.processing.org/u/terry0728)\
**Replies:** 5\
**Last updated:** [August 5, 2020, 1:44pm UTC](https://discourse.processing.org/t/how-can-i-make-a-new-ball-from-colliding/23055 "2020-08-05T13:44:41Z")

</div>

In the example of “bouncy bubbles” that collide with each other, I would like to program a new ball to be created at that point when two balls collide. What should I do? bouncing bubbles -\> https://processing.org/exampl…

---

## [How do I call fill() in a function?](https://discourse.processing.org/t/how-do-i-call-fill-in-a-function/23043)

<div class="topic-metadata">

**Author:** [@alkilum](https://discourse.processing.org/u/alkilum)\
**Replies:** 4\
**Last updated:** [August 5, 2020, 1:17am UTC](https://discourse.processing.org/t/how-do-i-call-fill-in-a-function/23043 "2020-08-05T01:17:47Z")

</div>

So I have a function tied to rendering and I used fill in it like this: public static int rd(int k){ fill(#ff0000); line(0,0,0,k); return k; } It said something along the lines of you can’t call fill() in a stati…

---

## [Using a Serial port. Can processing boot even if the port is un available](https://discourse.processing.org/t/using-a-serial-port-can-processing-boot-even-if-the-port-is-un-available/23041)

<div class="topic-metadata">

**Author:** [@laptophead](https://discourse.processing.org/u/laptophead)\
**Replies:** 2\
**Last updated:** [August 5, 2020, 12:48am UTC](https://discourse.processing.org/t/using-a-serial-port-can-processing-boot-even-if-the-port-is-un-available/23041 "2020-08-05T00:48:10Z")

</div>

I would want to be able to boot the sketch even if the USB cord is unplugged to my arduino. Eventually I would write a message “COM Not Available” and maybe make a button to re-connect. But Processing will stop in the …

---

## [Arduino Add Library Error - not valid library reported - will not install](https://discourse.processing.org/t/arduino-add-library-error-not-valid-library-reported-will-not-install/23037)

<div class="topic-metadata">

**Author:** [@videodub](https://discourse.processing.org/u/videodub)\
**Replies:** 0\
**Last updated:** [August 4, 2020, 6:54pm UTC](https://discourse.processing.org/t/arduino-add-library-error-not-valid-library-reported-will-not-install/23037 "2020-08-04T18:54:45Z")

</div>

When attempting to add video processing library for Arduino, reports ‘zip does not contain a valid library’ Tried older version, same result. Library will not install in Arduino environment. Running Win7 64bit. Used — …

---

## [Understanding the Diffusion Curves Algorithm](https://discourse.processing.org/t/understanding-the-diffusion-curves-algorithm/21605)

<div class="topic-metadata">

**Author:** [@micycle](https://discourse.processing.org/u/micycle)\
**Replies:** 13\
**Last updated:** [August 4, 2020, 4:53pm UTC](https://discourse.processing.org/t/understanding-the-diffusion-curves-algorithm/21605 "2020-08-04T16:53:49Z")

</div>

Paper outcome above. I’m not going anything this complicated (beziers) yet, but just a simple working prototype of the diffusion part. The broad idea with Diffusion Curves is you specify some pixels in a canvas (su…

---

## [Creating collision](https://discourse.processing.org/t/creating-collision/23029)

<div class="topic-metadata">

**Author:** [@DeidaraLP](https://discourse.processing.org/u/DeidaraLP)\
**Replies:** 4\
**Last updated:** [August 4, 2020, 4:13pm UTC](https://discourse.processing.org/t/creating-collision/23029 "2020-08-04T16:13:36Z")

</div>

Hello /sub I’ve been trying to create a simple game based on different classes. However, i’m currently at a dead end, since i’m trying to create a collision detector between the player class and the asteroid class. How…

---

## [How to access SVG/PShape original width & height?](https://discourse.processing.org/t/how-to-access-svg-pshape-original-width-height/23027)

<div class="topic-metadata">

**Author:** [@Ruchi](https://discourse.processing.org/u/Ruchi)\
**Replies:** 0\
**Last updated:** [August 4, 2020, 7:40am UTC](https://discourse.processing.org/t/how-to-access-svg-pshape-original-width-height/23027 "2020-08-04T07:40:53Z")

</div>

import processing.svg.\*; float reso; void setup() { size(800, 800); reso = width; beginRecord(SVG,"a.svg"); } void draw() { background(0); PVector center = new PVector(reso/2,reso-5); //float center = re…

---

## [Creating an array of vectors in a line](https://discourse.processing.org/t/creating-an-array-of-vectors-in-a-line/22959)

<div class="topic-metadata">

**Author:** [@MelonMan](https://discourse.processing.org/u/MelonMan)\
**Replies:** 9\
**Last updated:** [August 4, 2020, 6:06am UTC](https://discourse.processing.org/t/creating-an-array-of-vectors-in-a-line/22959 "2020-08-04T06:06:54Z")

</div>

Hello! I’m new here, hopefully this is the right place to ask. I have an odd problem I’m trying to resolve. attempting to curve off a tutorial and turn the project into something of my own. The problem being; I have a …

---

## [Double hit on object collision and repeat trigger](https://discourse.processing.org/t/double-hit-on-object-collision-and-repeat-trigger/22970)

<div class="topic-metadata">

**Author:** [@chuchu](https://discourse.processing.org/u/chuchu)\
**Replies:** 2\
**Last updated:** [August 3, 2020, 9:41pm UTC](https://discourse.processing.org/t/double-hit-on-object-collision-and-repeat-trigger/22970 "2020-08-03T21:41:13Z")

</div>

Hello processing forum :slight\_smile: I’m making a small program that moves circles (‘buoys’) around the screen that are then triggered by expanding circles (‘waves’) in turn making more waves of their own. Waves have r…

---

## [Add a custom cast?](https://discourse.processing.org/t/add-a-custom-cast/22995)

<div class="topic-metadata">

**Author:** [@NumericPrime](https://discourse.processing.org/u/NumericPrime)\
**Replies:** 8\
**Last updated:** [August 3, 2020, 7:25pm UTC](https://discourse.processing.org/t/add-a-custom-cast/22995 "2020-08-03T19:25:53Z")

</div>

Hi I’m making a math library and it includes a matrix class. I wish to make it possible to cast it from a float\[\]\[\]. Something like this: float\[\]\[\] a={{1,2},{3,4}}; Matrix m=(Matrix) a;

---

## [Images Rotate Themselves](https://discourse.processing.org/t/images-rotate-themselves/23015)

<div class="topic-metadata">

**Author:** [@AngryPig](https://discourse.processing.org/u/AngryPig)\
**Replies:** 2\
**Last updated:** [August 3, 2020, 3:47pm UTC](https://discourse.processing.org/t/images-rotate-themselves/23015 "2020-08-03T15:47:09Z")

</div>

I was working on a larger project and noticed that every time I try import a photo that I rotated in Windows, it rotates it back. I have made a basic example with the same photo to test it and it still occurs. Does anyon…

---

## [Agnostic Transparencies](https://discourse.processing.org/t/agnostic-transparencies/22997)

<div class="topic-metadata">

**Author:** [@Aleksi](https://discourse.processing.org/u/Aleksi)\
**Replies:** 3\
**Last updated:** [August 2, 2020, 9:06pm UTC](https://discourse.processing.org/t/agnostic-transparencies/22997 "2020-08-02T21:06:43Z")

</div>

Hi there. Is there any way to draw transparent objects that allow them to stay transparent no matter which order they’re drawn? Here’s a gif demonstrating how the order in which they’re drawn affects an object’s transpa…

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

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