# Processing

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

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

**Page:** 204

---

## [Center to mouseX,Y with storing](https://discourse.processing.org/t/center-to-mousex-y-with-storing/21533)

<div class="topic-metadata">

**Author:** [@mrbro](https://discourse.processing.org/u/mrbro)\
**Replies:** 11\
**Last updated:** [June 6, 2020, 11:35pm UTC](https://discourse.processing.org/t/center-to-mousex-y-with-storing/21533 "2020-06-06T23:35:32Z")

</div>

Hi there! I am trying to draw a shape which starts from the center and expands the radius untill the mouse coursore. I am also storing the valuse so I can have it fading into the infinity. I managed to do everything, ex…

---

## [3d Digitzer Arm build](https://discourse.processing.org/t/3d-digitzer-arm-build/2868)

<div class="topic-metadata">

**Author:** [@MickHanks](https://discourse.processing.org/u/MickHanks)\
**Replies:** 16\
**Last updated:** [June 6, 2020, 9:07pm UTC](https://discourse.processing.org/t/3d-digitzer-arm-build/2868 "2020-06-06T21:07:47Z")

</div>

Hi, thanks for any help. Question = How do I know a Processing app is getting a signal from the COMPORT? I’m stuck with this project. https://www.youtube.com/watch?v=8feFq3ugSLI I’ve built the hardware, Wired it, Inst…

---

## [Why can't I access this array within my constructor?](https://discourse.processing.org/t/why-cant-i-access-this-array-within-my-constructor/21576)

<div class="topic-metadata">

**Author:** [@Math\_Machine](https://discourse.processing.org/u/Math_Machine)\
**Replies:** 13\
**Last updated:** [June 6, 2020, 8:54pm UTC](https://discourse.processing.org/t/why-cant-i-access-this-array-within-my-constructor/21576 "2020-06-06T20:54:38Z")

</div>

So, I’ve been looking at this code for the past couple hours, and I can’t for the life of me figure out what’s going on. Please note: For the sake of keeping things simple, I didn’t list the contents of the array sizein…

---

## [Making a PGraphics filled with points (grade of white is based on the amplitude) and texture that to the ever evolving arc](https://discourse.processing.org/t/making-a-pgraphics-filled-with-points-grade-of-white-is-based-on-the-amplitude-and-texture-that-to-the-ever-evolving-arc/21561)

<div class="topic-metadata">

**Author:** [@inzn](https://discourse.processing.org/u/inzn)\
**Replies:** 2\
**Last updated:** [June 6, 2020, 7:13pm UTC](https://discourse.processing.org/t/making-a-pgraphics-filled-with-points-grade-of-white-is-based-on-the-amplitude-and-texture-that-to-the-ever-evolving-arc/21561 "2020-06-06T19:13:04Z")

</div>

I’m working on an audio visualisation that’s basically supposed to be a circular spectrogram. I have a graph that shows the frequency already and an arc, that evolves based on the time passed. Now I would like to fill th…

---

## [Quest for setTexture](https://discourse.processing.org/t/quest-for-settexture/21564)

<div class="topic-metadata">

**Author:** [@MartinGo](https://discourse.processing.org/u/MartinGo)\
**Replies:** 6\
**Last updated:** [June 6, 2020, 7:07pm UTC](https://discourse.processing.org/t/quest-for-settexture/21564 "2020-06-06T19:07:07Z")

</div>

Hi. I want to make an hexagonal tile using the setTexture method of PShape, the problem is I want to run the following example PImage img; PShape globe; void setup() { // Load an image img = loadImage("earth.jpg")…

---

## [Using Values from a Class as Arguments for Another Class](https://discourse.processing.org/t/using-values-from-a-class-as-arguments-for-another-class/21601)

<div class="topic-metadata">

**Author:** [@brent](https://discourse.processing.org/u/brent)\
**Replies:** 3\
**Last updated:** [June 6, 2020, 3:42pm UTC](https://discourse.processing.org/t/using-values-from-a-class-as-arguments-for-another-class/21601 "2020-06-06T15:42:00Z")

</div>

I’m trying to make the code I have for a basic painting sketch more efficient, so I made classes for the color sliders and the brush. I’m trying to set the arguments for Brush() using the values from each colorSlider\[\]. …

---

## [Using a 2D Array in a Class Object - NullPointerException?](https://discourse.processing.org/t/using-a-2d-array-in-a-class-object-nullpointerexception/21606)

<div class="topic-metadata">

**Author:** [@RetProf](https://discourse.processing.org/u/RetProf)\
**Replies:** 10\
**Last updated:** [June 6, 2020, 3:10am UTC](https://discourse.processing.org/t/using-a-2d-array-in-a-class-object-nullpointerexception/21606 "2020-06-06T03:10:45Z")

</div>

The following is a short sketch with a single new Class. In the class I’m trying to develop a 2D array in the Constructor and then use it in a method in the class. The method recognizes a variable in the constructor but …

---

## [X =width/2 not plotting to the middle of the sketch window](https://discourse.processing.org/t/x-width-2-not-plotting-to-the-middle-of-the-sketch-window/21585)

<div class="topic-metadata">

**Author:** [@BackTo](https://discourse.processing.org/u/BackTo)\
**Replies:** 4\
**Last updated:** [June 5, 2020, 6:16pm UTC](https://discourse.processing.org/t/x-width-2-not-plotting-to-the-middle-of-the-sketch-window/21585 "2020-06-05T18:16:58Z")

</div>

Hello, I have a very basic question. When I set the X coordinate to width/2 and the Y coordinate to height/2, the coordinate, plotted never ends up in the middle of the screen. Is there some coding syntax I’m missing? …

---

## [Map() value to fit screen](https://discourse.processing.org/t/map-value-to-fit-screen/21558)

<div class="topic-metadata">

**Author:** [@mockingjay](https://discourse.processing.org/u/mockingjay)\
**Replies:** 11\
**Last updated:** [June 5, 2020, 6:13pm UTC](https://discourse.processing.org/t/map-value-to-fit-screen/21558 "2020-06-05T18:13:48Z")

</div>

void setup() { size(1280,720); background(0); } float currentVal = 0; float reading = 0; float value = -150; void draw() { reading = getData(); map(reading, -150,height,0,height/2); currentVal += (reading - cu…

---

## [About Processing Tools](https://discourse.processing.org/t/about-processing-tools/21565)

<div class="topic-metadata">

**Author:** [@wwave](https://discourse.processing.org/u/wwave)\
**Replies:** 2\
**Last updated:** [June 5, 2020, 6:11pm UTC](https://discourse.processing.org/t/about-processing-tools/21565 "2020-06-05T18:11:40Z")

</div>

Hi, Is there any tools in Processing that I have a list in a window which I have many options? For example, in the list, I have introduction option, relazation option and etc. I can slide the slider. When I choose one …

---

## [Simulation about Cooperative Object Transport in Multi-Robot Systems](https://discourse.processing.org/t/simulation-about-cooperative-object-transport-in-multi-robot-systems/21393)

<div class="topic-metadata">

**Author:** [@weijie](https://discourse.processing.org/u/weijie)\
**Replies:** 3\
**Last updated:** [June 5, 2020, 1:21pm UTC](https://discourse.processing.org/t/simulation-about-cooperative-object-transport-in-multi-robot-systems/21393 "2020-06-05T13:21:43Z")

</div>

Hi everyone, I’m developing a simulation of a group of simple robots transporting objects together. The multi-robot system should be able to: transport object of different shapes able to stabilize the object while tr…

---

## [Custom mouse cursor](https://discourse.processing.org/t/custom-mouse-cursor/21549)

<div class="topic-metadata">

**Author:** [@mgood7123](https://discourse.processing.org/u/mgood7123)\
**Replies:** 6\
**Last updated:** [June 5, 2020, 4:48am UTC](https://discourse.processing.org/t/custom-mouse-cursor/21549 "2020-06-05T04:48:16Z")

</div>

how can i customize the cursor that is displayed inside Processing 3, for example, make it appear as a custom png image instead of the OS’s cursor image

---

## [Simple way to create this diagram using pythagoras theorem](https://discourse.processing.org/t/simple-way-to-create-this-diagram-using-pythagoras-theorem/21583)

<div class="topic-metadata">

**Author:** [@leronix](https://discourse.processing.org/u/leronix)\
**Replies:** 2\
**Last updated:** [June 5, 2020, 11:00am UTC](https://discourse.processing.org/t/simple-way-to-create-this-diagram-using-pythagoras-theorem/21583 "2020-06-05T11:00:28Z")

</div>

int a; int c; int b = sqrt(aa+cc);

---

## [Odd TableSaving Behavoir](https://discourse.processing.org/t/odd-tablesaving-behavoir/21586)

<div class="topic-metadata">

**Author:** [@TheEternalDragon](https://discourse.processing.org/u/TheEternalDragon)\
**Replies:** 1\
**Last updated:** [June 5, 2020, 10:43am UTC](https://discourse.processing.org/t/odd-tablesaving-behavoir/21586 "2020-06-05T10:43:26Z")

</div>

I’m trying to save the data of a few objects to a table, this includes their position as a vector and their current size so that it can be used when reopening the program. However when using the code below, instead of ge…

---

## [Beginner who can use some help](https://discourse.processing.org/t/beginner-who-can-use-some-help/21505)

<div class="topic-metadata">

**Author:** [@Student](https://discourse.processing.org/u/Student)\
**Replies:** 5\
**Last updated:** [June 5, 2020, 10:18am UTC](https://discourse.processing.org/t/beginner-who-can-use-some-help/21505 "2020-06-05T10:18:28Z")

</div>

Hey! Im currently working on a small project, for which I need a certain function which I just don’t seem to get working. I am working with motion tracking. Within the code, I try to change the color of the screen, the …

---

## [Per-vertex color gradient fill](https://discourse.processing.org/t/per-vertex-color-gradient-fill/9679)

<div class="topic-metadata">

**Author:** [@cdaein](https://discourse.processing.org/u/cdaein)\
**Replies:** 14\
**Last updated:** [June 5, 2020, 9:18am UTC](https://discourse.processing.org/t/per-vertex-color-gradient-fill/9679 "2020-06-05T09:18:44Z")

</div>

I’m trying to color each vertex of a rectangle differently to create a nice, smooth gradient fill inside. But when I run the sketch below, it looks like the shapes are broken into triangles and I see a clear band - is th…

---

## [Requires restart of Processing?](https://discourse.processing.org/t/requires-restart-of-processing/21574)

<div class="topic-metadata">

**Author:** [@Math\_Machine](https://discourse.processing.org/u/Math_Machine)\
**Replies:** 2\
**Last updated:** [June 5, 2020, 12:41am UTC](https://discourse.processing.org/t/requires-restart-of-processing/21574 "2020-06-05T00:41:38Z")

</div>

Okay, so I know I’m going to sound very, very stupid asking this question, but I’d also be very, very upset if I lost 2 years worth of programs from my save folders. So, in the preferences tab of Processing, there’s an …

---

## [Processing match 3](https://discourse.processing.org/t/processing-match-3/21507)

<div class="topic-metadata">

**Author:** [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Replies:** 16\
**Last updated:** [June 5, 2020, 12:13am UTC](https://discourse.processing.org/t/processing-match-3/21507 "2020-06-05T00:13:10Z")

</div>

I’m making a match 3 game or at least I think it still called match 3. Anyways you click on a block and all the blocks touching that one of the same type vanish too. My problem is diagonal blocks are being chosen instead…

---

## [Processing Array size](https://discourse.processing.org/t/processing-array-size/21569)

<div class="topic-metadata">

**Author:** [@philspitler](https://discourse.processing.org/u/philspitler)\
**Replies:** 4\
**Last updated:** [June 5, 2020, 12:01am UTC](https://discourse.processing.org/t/processing-array-size/21569 "2020-06-05T00:01:43Z")

</div>

I have a Processing sketch that reads folders of images and displays them. It has been working great but it seems that as soon as the folder got over 500 images I get an error. My code is pretty straight forward. I de…

---

## [I need help please! Mario](https://discourse.processing.org/t/i-need-help-please-mario/21409)

<div class="topic-metadata">

**Author:** [@jasmine](https://discourse.processing.org/u/jasmine)\
**Replies:** 13\
**Last updated:** [June 4, 2020, 11:57pm UTC](https://discourse.processing.org/t/i-need-help-please-mario/21409 "2020-06-04T23:57:07Z")

</div>

int gameMode=0;//0 - menu, 1 - play game, 2 - instructions, 3 - character selection int selChar=1;//default character is "character 1" int level=1; color red=color(255, 0, 0); color green=color(0, 255, 0); color blue=col…

---

## [Calculating spin physics](https://discourse.processing.org/t/calculating-spin-physics/21289)

<div class="topic-metadata">

**Author:** [@markcosmic](https://discourse.processing.org/u/markcosmic)\
**Replies:** 10\
**Last updated:** [June 4, 2020, 7:36pm UTC](https://discourse.processing.org/t/calculating-spin-physics/21289 "2020-06-04T19:36:58Z")

</div>

Greetings all, Without using one of the physics engine libraries, I’d like to calculate the spin of a ball bouncing off a boundary. As I understand it, the algorithm has to do with the ball’s velocity and the angle betw…

---

## [Getting position from playNote (Minim)](https://discourse.processing.org/t/getting-position-from-playnote-minim/21360)

<div class="topic-metadata">

**Author:** [@tribblesontoast](https://discourse.processing.org/u/tribblesontoast)\
**Replies:** 14\
**Last updated:** [June 4, 2020, 4:43pm UTC](https://discourse.processing.org/t/getting-position-from-playnote-minim/21360 "2020-06-04T16:43:26Z")

</div>

Hi all, I’m using the Minim Library to play music using the playNotes() function. My question is twofold: What structure is the playNote function populating? (is it an array?) How do I get the position within this st…

---

## [Set PShape parameters](https://discourse.processing.org/t/set-pshape-parameters/21556)

<div class="topic-metadata">

**Author:** [@Moritz](https://discourse.processing.org/u/Moritz)\
**Replies:** 7\
**Last updated:** [June 4, 2020, 4:18pm UTC](https://discourse.processing.org/t/set-pshape-parameters/21556 "2020-06-04T16:18:55Z")

</div>

Hello, I want to set the parameters of a PShape without creating a new one. Is it possible or do i have to create a new Pshape? thank you

---

## [When I have compiled my ByteCode how do I insert it into my methods](https://discourse.processing.org/t/when-i-have-compiled-my-bytecode-how-do-i-insert-it-into-my-methods/21538)

<div class="topic-metadata">

**Author:** [@AntiViral\_Builder](https://discourse.processing.org/u/AntiViral_Builder)\
**Replies:** 3\
**Last updated:** [June 4, 2020, 8:38am UTC](https://discourse.processing.org/t/when-i-have-compiled-my-bytecode-how-do-i-insert-it-into-my-methods/21538 "2020-06-04T08:38:28Z")

</div>

I am new to java and processing what I actually do understand is that they are C++ based. I only understand a little about C. I do not have time to look at thousands of java files just to do something that should be simp…

---

## [PGraphics recreation safely](https://discourse.processing.org/t/pgraphics-recreation-safely/21468)

<div class="topic-metadata">

**Author:** [@mgood7123](https://discourse.processing.org/u/mgood7123)\
**Replies:** 13\
**Last updated:** [June 4, 2020, 12:45pm UTC](https://discourse.processing.org/t/pgraphics-recreation-safely/21468 "2020-06-04T12:45:07Z")

</div>

if a PGraphics object is recreated with a different size, does the user need to invoke setup() again or is it safe to just keep calling draw()

---

## [Anybody have looking at multiple java files; I have a fix for this but I can't get it to work on mac](https://discourse.processing.org/t/anybody-have-looking-at-multiple-java-files-i-have-a-fix-for-this-but-i-cant-get-it-to-work-on-mac/21545)

<div class="topic-metadata">

**Author:** [@AntiViral\_Builder](https://discourse.processing.org/u/AntiViral_Builder)\
**Replies:** 2\
**Last updated:** [June 4, 2020, 9:01am UTC](https://discourse.processing.org/t/anybody-have-looking-at-multiple-java-files-i-have-a-fix-for-this-but-i-cant-get-it-to-work-on-mac/21545 "2020-06-04T09:01:29Z")

</div>

I filnally got this done. Remember that it is made for mac so with windows you need C:\\ as a root path and to add ‘’ to the path which is ‘\\’ . it will not start in the root path. it might take a while to display the fi…

---

## [Porting OpenGL Applications to Processing 3 Sketchs](https://discourse.processing.org/t/porting-opengl-applications-to-processing-3-sketchs/21547)

<div class="topic-metadata">

**Author:** [@mgood7123](https://discourse.processing.org/u/mgood7123)\
**Replies:** 1\
**Last updated:** [June 4, 2020, 8:01am UTC](https://discourse.processing.org/t/porting-opengl-applications-to-processing-3-sketchs/21547 "2020-06-04T08:01:58Z")

</div>

how would one go about porting an OpenGL Application to a Processing 3 Sketch, or if possible, directly run the OpenGL application with as small as modifications as possible eg maybe implement and use the OpenGL Applica…

---

## [Image error with face detector( noob question)](https://discourse.processing.org/t/image-error-with-face-detector-noob-question/21536)

<div class="topic-metadata">

**Author:** [@panic](https://discourse.processing.org/u/panic)\
**Replies:** 2\
**Last updated:** [June 3, 2020, 11:35pm UTC](https://discourse.processing.org/t/image-error-with-face-detector-noob-question/21536 "2020-06-03T23:35:26Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hello, I am trying to put an image instead of a square in the face detector code and on a video and it gives me error the image is too big, it d…

---

## [Quiz with XML need help](https://discourse.processing.org/t/quiz-with-xml-need-help/21514)

<div class="topic-metadata">

**Author:** [@s.k9](https://discourse.processing.org/u/s.k9)\
**Replies:** 19\
**Last updated:** [June 3, 2020, 9:16pm UTC](https://discourse.processing.org/t/quiz-with-xml-need-help/21514 "2020-06-03T21:16:44Z")

</div>

Hi all, I am new to both coding and this forum so sorry in advance for whatever errors I am probably already making. For context, for this project, we were provided with a code skeleton. Right now I am having trouble fig…

---

## [Having trouble adding a window](https://discourse.processing.org/t/having-trouble-adding-a-window/21384)

<div class="topic-metadata">

**Author:** [@AntiViral\_Builder](https://discourse.processing.org/u/AntiViral_Builder)\
**Replies:** 2\
**Last updated:** [June 3, 2020, 6:26pm UTC](https://discourse.processing.org/t/having-trouble-adding-a-window/21384 "2020-06-03T18:26:00Z")

</div>

Hello There, I am having trouble creating another window using G4P. I can add my controls, but I cannot add my content unless I make two windows. Of course I only want one, how do I make my controls compatible with my c…

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

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