# Processing

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

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

**Page:** 253

---

## [Creating 2D Obstacle-Dodging Game](https://discourse.processing.org/t/creating-2d-obstacle-dodging-game/16196)

<div class="topic-metadata">

**Author:** [@beanbagchair](https://discourse.processing.org/u/beanbagchair)\
**Replies:** 1\
**Last updated:** [December 7, 2019, 2:34am UTC](https://discourse.processing.org/t/creating-2d-obstacle-dodging-game/16196 "2019-12-07T02:34:02Z")

</div>

Hi, I am taking an Object-Oriented Programming class, and our final project can be anything we want. I decided to create a game which has a car traveling around a track, with a random set of objects appearing on the tra…

---

## [Library acess some core function and other not](https://discourse.processing.org/t/library-acess-some-core-function-and-other-not/16077)

<div class="topic-metadata">

**Author:** [@matheplica](https://discourse.processing.org/u/matheplica)\
**Replies:** 5\
**Last updated:** [December 7, 2019, 1:07am UTC](https://discourse.processing.org/t/library-acess-some-core-function-and-other-not/16077 "2019-12-07T01:07:23Z")

</div>

I, I’m trying to create my own library and it’s not so easy. The small class I create don’t recognize the “color” type even he is in processing.core. public class Triangle { color\[\] colors = new color\[3\];} The functi…

---

## [Kinect - flickering screen on part of image](https://discourse.processing.org/t/kinect-flickering-screen-on-part-of-image/16182)

<div class="topic-metadata">

**Author:** [@Jackieh111](https://discourse.processing.org/u/Jackieh111)\
**Replies:** 0\
**Last updated:** [December 6, 2019, 5:31pm UTC](https://discourse.processing.org/t/kinect-flickering-screen-on-part-of-image/16182 "2019-12-06T17:31:23Z")

</div>

Hello - this sketch is from Making Things See by Greg Borenstein and it works except that the image portion created from userMap flickers on the lower half of the user image. Can anyone help me to solve this problem. On…

---

## [Multiple Instances only drawing last instance](https://discourse.processing.org/t/multiple-instances-only-drawing-last-instance/16186)

<div class="topic-metadata">

**Author:** [@Andrew](https://discourse.processing.org/u/Andrew)\
**Replies:** 2\
**Last updated:** [December 6, 2019, 7:40pm UTC](https://discourse.processing.org/t/multiple-instances-only-drawing-last-instance/16186 "2019-12-06T19:40:57Z")

</div>

I’m just getting started with Processing (3.5.3), and so far it’s been pretty fun. However, I’ve hit a snag, and even after researching for a couple hours I still can’t figure it out. I try to create two instances of ci…

---

## [Finding wordcount/frequency with a given text file](https://discourse.processing.org/t/finding-wordcount-frequency-with-a-given-text-file/16178)

<div class="topic-metadata">

**Author:** [@bc15](https://discourse.processing.org/u/bc15)\
**Replies:** 3\
**Last updated:** [December 6, 2019, 7:27pm UTC](https://discourse.processing.org/t/finding-wordcount-frequency-with-a-given-text-file/16178 "2019-12-06T19:27:46Z")

</div>

I have a decent idea on how to visualize it with a box plot as it was practiced during class, but I’m having trouble calculating the frequency of each words by modifying the given code :frowning: Read in the text file. …

---

## [Finding unique/distinct values in a list](https://discourse.processing.org/t/finding-unique-distinct-values-in-a-list/16183)

<div class="topic-metadata">

**Author:** [@Lehmoxy](https://discourse.processing.org/u/Lehmoxy)\
**Replies:** 3\
**Last updated:** [December 6, 2019, 6:43pm UTC](https://discourse.processing.org/t/finding-unique-distinct-values-in-a-list/16183 "2019-12-06T18:43:34Z")

</div>

Hello all, I’m wondering if there is a function in processing to find unique/distinct values in arrays/lists. I am trying to make a dropdown menu from an imported data set. For example, if I have an array of 5 elements …

---

## ["Case expressions must be constant expressions" with final int](https://discourse.processing.org/t/case-expressions-must-be-constant-expressions-with-final-int/16109)

<div class="topic-metadata">

**Author:** [@TurboSlayer](https://discourse.processing.org/u/TurboSlayer)\
**Replies:** 12\
**Last updated:** [December 6, 2019, 3:47pm UTC](https://discourse.processing.org/t/case-expressions-must-be-constant-expressions-with-final-int/16109 "2019-12-06T15:47:12Z")

</div>

I get an error saying “Case expressions must be constant expressions”. I couldn’t fix it no matter what. Is the only solution to change xSpeed as well as origxSpeed or is there a way to set origxSpeed to xSpeed without g…

---

## [Debugger says getStringColumn() does not exist](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159)

<div class="topic-metadata">

**Author:** [@Lehmoxy](https://discourse.processing.org/u/Lehmoxy)\
**Replies:** 16\
**Last updated:** [December 6, 2019, 4:16pm UTC](https://discourse.processing.org/t/debugger-says-getstringcolumn-does-not-exist/16159 "2019-12-06T16:16:38Z")

</div>

I have created a Table object using the following code: dataTable = new Table("Freezer Stock.txt"); Now, I want to create arrays that have certain columns’ information so that I can create a dropdown menu. For some rea…

---

## [Letra desenfocada](https://discourse.processing.org/t/letra-desenfocada/16169)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 2\
**Last updated:** [December 6, 2019, 2:45pm UTC](https://discourse.processing.org/t/letra-desenfocada/16169 "2019-12-06T14:45:02Z")

</div>

Hi guys, This text does not look very clear, can somebody tell me how make it more defined? Thanks void setup(){ size(270,540); background(0,0,0); noStroke(); smooth(); } void draw() { fill(255, 255, 255,…

---

## [After importing one icon i want to give functionality](https://discourse.processing.org/t/after-importing-one-icon-i-want-to-give-functionality/15859)

<div class="topic-metadata">

**Author:** [@aronisha](https://discourse.processing.org/u/aronisha)\
**Replies:** 24\
**Last updated:** [December 6, 2019, 10:29am UTC](https://discourse.processing.org/t/after-importing-one-icon-i-want-to-give-functionality/15859 "2019-12-06T10:29:35Z")

</div>

i use user account icon and i want to give some functionality for that icon.

---

## [Degradado en fondo con temblor (Gradient in background with tremor)](https://discourse.processing.org/t/degradado-en-fondo-con-temblor-gradient-in-background-with-tremor/16134)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 15\
**Last updated:** [December 6, 2019, 10:37am UTC](https://discourse.processing.org/t/degradado-en-fondo-con-temblor-gradient-in-background-with-tremor/16134 "2019-12-06T10:37:27Z")

</div>

Hi guys, I have a problem with the background of my program. If it is a solid color, everything works, buti if I draw a gradient, animation trembles. Can you recomend me any solution? Thank you very much. int x; int se…

---

## [Problem with boolean changing to false randomly](https://discourse.processing.org/t/problem-with-boolean-changing-to-false-randomly/16152)

<div class="topic-metadata">

**Author:** [@TurboSlayer](https://discourse.processing.org/u/TurboSlayer)\
**Replies:** 3\
**Last updated:** [December 6, 2019, 8:59am UTC](https://discourse.processing.org/t/problem-with-boolean-changing-to-false-randomly/16152 "2019-12-06T08:59:47Z")

</div>

So I’ve made another code using if else instead of a switch, but more problems arise. For some stupid reason, whenever I press “1” on my keyboard, it sets game to false? As you can see in the code below, I didn’t make i…

---

## [A grid of control p5 toggle buttons](https://discourse.processing.org/t/a-grid-of-control-p5-toggle-buttons/16172)

<div class="topic-metadata">

**Author:** [@pandl](https://discourse.processing.org/u/pandl)\
**Replies:** 4\
**Last updated:** [December 6, 2019, 6:41am UTC](https://discourse.processing.org/t/a-grid-of-control-p5-toggle-buttons/16172 "2019-12-06T06:41:54Z")

</div>

Thank you for reading this. I’m trying to created a grid of control P5 toggle buttons and I’m also trying to discover how I can tell which button has been pressed. This piece of code creates two buttons and I was think…

---

## [Array interaction problem!](https://discourse.processing.org/t/array-interaction-problem/16117)

<div class="topic-metadata">

**Author:** [@tsunii](https://discourse.processing.org/u/tsunii)\
**Replies:** 14\
**Last updated:** [December 5, 2019, 10:35pm UTC](https://discourse.processing.org/t/array-interaction-problem/16117 "2019-12-05T22:35:55Z")

</div>

My question are: Why i’m getting 4 valour for every p\[i\], i should have 4 circle but i have 16! Why the “fase 1” ir rolling forever Why c\[i\] isnt getting any value for now that’s it! //Quantidade de circulo\] int ct =…

---

## [Map image to cylinder](https://discourse.processing.org/t/map-image-to-cylinder/15670)

<div class="topic-metadata">

**Author:** [@Cherrycoke](https://discourse.processing.org/u/Cherrycoke)\
**Replies:** 7\
**Last updated:** [December 5, 2019, 9:48pm UTC](https://discourse.processing.org/t/map-image-to-cylinder/15670 "2019-12-05T21:48:48Z")

</div>

I’m interested to learn how to map an image to a cylinder and have the image look undistorted when viewed from one point.

---

## [Renaming PDF generated files](https://discourse.processing.org/t/renaming-pdf-generated-files/16164)

<div class="topic-metadata">

**Author:** [@debxyz](https://discourse.processing.org/u/debxyz)\
**Replies:** 3\
**Last updated:** [December 5, 2019, 9:34pm UTC](https://discourse.processing.org/t/renaming-pdf-generated-files/16164 "2019-12-05T21:34:28Z")

</div>

Unable to find the answer to this in REFERENCE section. I have a very simple program to generate random color block overlaps. Currently set up to record a PDF of each instance when code runs. How do I generate a new n…

---

## [Understanding code](https://discourse.processing.org/t/understanding-code/16155)

<div class="topic-metadata">

**Author:** [@Jackieh111](https://discourse.processing.org/u/Jackieh111)\
**Replies:** 2\
**Last updated:** [December 5, 2019, 5:39pm UTC](https://discourse.processing.org/t/understanding-code/16155 "2019-12-05T17:39:11Z")

</div>

float c = ((img.pixels\[(x+y\*img.width)\] \>\> 8) & 0xFF)/255.0; can you tell me what this code is doing - I know it is extracting G value of RGB and then is it diving by 255 to get hex value? Thanks!

---

## [Array Lists creating/removing objects in a class](https://discourse.processing.org/t/array-lists-creating-removing-objects-in-a-class/16139)

<div class="topic-metadata">

**Author:** [@davidclue](https://discourse.processing.org/u/davidclue)\
**Replies:** 2\
**Last updated:** [December 5, 2019, 12:24pm UTC](https://discourse.processing.org/t/array-lists-creating-removing-objects-in-a-class/16139 "2019-12-05T12:24:22Z")

</div>

Hi I am wondering how to create objects from a classes method and what a ConcurrentModificationException is and why I’m getting it. I am a student and I am confused to why I keep getting this error in my code. ArrayList\<…

---

## [Color Selecting](https://discourse.processing.org/t/color-selecting/16144)

<div class="topic-metadata">

**Author:** [@keeg23](https://discourse.processing.org/u/keeg23)\
**Replies:** 5\
**Last updated:** [December 5, 2019, 9:52am UTC](https://discourse.processing.org/t/color-selecting/16144 "2019-12-05T09:52:32Z")

</div>

I am currently running into trouble having the color being selected and drawing… The colors will not work when pressed on? Not exactly sure why it is not working PImage myElonStart, myMonroe, myLennon, myBlueCan, myR…

---

## [Problem with dividing](https://discourse.processing.org/t/problem-with-dividing/16071)

<div class="topic-metadata">

**Author:** [@24stevek](https://discourse.processing.org/u/24stevek)\
**Replies:** 13\
**Last updated:** [December 5, 2019, 8:03am UTC](https://discourse.processing.org/t/problem-with-dividing/16071 "2019-12-05T08:03:29Z")

</div>

Hi! I am currently making a program that draws a variety of graphs, and I’ve finished with the bar graph and line graph. They work well, and I am trying to add another function: a pie graph. I am making the drawing part…

---

## [RFID sensor Arduino to Processing triggering video](https://discourse.processing.org/t/rfid-sensor-arduino-to-processing-triggering-video/16137)

<div class="topic-metadata">

**Author:** [@GraceOD](https://discourse.processing.org/u/GraceOD)\
**Replies:** 1\
**Last updated:** [December 5, 2019, 6:57am UTC](https://discourse.processing.org/t/rfid-sensor-arduino-to-processing-triggering-video/16137 "2019-12-05T06:57:25Z")

</div>

Hi guys, I am pretty new to Processing and Arduino so an help would be greatly appreciated. I have set up an RFID sensor that is being read through my Arduino and I want to play a video through processing, when the RFI…

---

## [How to randomize colors](https://discourse.processing.org/t/how-to-randomize-colors/16136)

<div class="topic-metadata">

**Author:** [@masterU](https://discourse.processing.org/u/masterU)\
**Replies:** 3\
**Last updated:** [December 5, 2019, 1:58am UTC](https://discourse.processing.org/t/how-to-randomize-colors/16136 "2019-12-05T01:58:47Z")

</div>

Hello all, I am doing a recreation of Pink Floyd’s famous album with a twist - I want every time the mouse is pressed, the colors on the spectrum random and change. This is what I have so far: PImage img; PFont helvetic…

---

## [FX2D Resizable Window Error](https://discourse.processing.org/t/fx2d-resizable-window-error/15995)

<div class="topic-metadata">

**Author:** [@thesuperdaine](https://discourse.processing.org/u/thesuperdaine)\
**Replies:** 12\
**Last updated:** [December 4, 2019, 11:43pm UTC](https://discourse.processing.org/t/fx2d-resizable-window-error/15995 "2019-12-04T23:43:56Z")

</div>

Switching the rendering engine to FX2D has introduced a lot of absurdities that I’ve never had to deal with before, including this issue right here: Which was an easy, yet unexpected, fix. However, another issue has…

---

## [Making rect stop offset movement if the rect is touched by the mouse](https://discourse.processing.org/t/making-rect-stop-offset-movement-if-the-rect-is-touched-by-the-mouse/16103)

<div class="topic-metadata">

**Author:** [@Adrian1998](https://discourse.processing.org/u/Adrian1998)\
**Replies:** 5\
**Last updated:** [December 4, 2019, 8:12pm UTC](https://discourse.processing.org/t/making-rect-stop-offset-movement-if-the-rect-is-touched-by-the-mouse/16103 "2019-12-04T20:12:08Z")

</div>

So i am currently trying to make my rectangles stop when a mouse touches a rectangle. Right now it only stop if the mouse reaches a certain Y axis. How can I make it stop when the mouse only touches the square. int b =…

---

## [Writing out sentences with mouse](https://discourse.processing.org/t/writing-out-sentences-with-mouse/16080)

<div class="topic-metadata">

**Author:** [@tkelly4](https://discourse.processing.org/u/tkelly4)\
**Replies:** 10\
**Last updated:** [December 4, 2019, 6:21pm UTC](https://discourse.processing.org/t/writing-out-sentences-with-mouse/16080 "2019-12-04T18:21:16Z")

</div>

Hello, I am not a programmer in any way, so I barely know anything about coding. We are doing a code based imagery project for my art class using Java coding. We are supposed to eventually turn it into a drawing app and …

---

## [PApplet second win exit, create ... RAM overfill](https://discourse.processing.org/t/papplet-second-win-exit-create-ram-overfill/16090)

<div class="topic-metadata">

**Author:** [@GeorgeJava](https://discourse.processing.org/u/GeorgeJava)\
**Replies:** 4\
**Last updated:** [December 4, 2019, 5:22pm UTC](https://discourse.processing.org/t/papplet-second-win-exit-create-ram-overfill/16090 "2019-12-04T17:22:16Z")

</div>

Helo, i want to exit second window of the PApplet and create another, but i want to clear it absolutely from RAM, becouse its getting takes a lot of RAM, the value getting only higher… how to delete PApplet in all ? PWi…

---

## [New to Processing, I need HELP!](https://discourse.processing.org/t/new-to-processing-i-need-help/16116)

<div class="topic-metadata">

**Author:** [@ihatearrays](https://discourse.processing.org/u/ihatearrays)\
**Replies:** 2\
**Last updated:** [December 4, 2019, 3:38pm UTC](https://discourse.processing.org/t/new-to-processing-i-need-help/16116 "2019-12-04T15:38:21Z")

</div>

Hi, I’m new to Processing, I’m making a 3x3 grid game that makes users mousehover over to a target square that is one of the 9 squares. I’m trying to create a function called getNextSquare that picks a random number betw…

---

## [Factorial not working "cannot convert from float to int"](https://discourse.processing.org/t/factorial-not-working-cannot-convert-from-float-to-int/16115)

<div class="topic-metadata">

**Author:** [@tsunii](https://discourse.processing.org/u/tsunii)\
**Replies:** 1\
**Last updated:** [December 4, 2019, 2:45pm UTC](https://discourse.processing.org/t/factorial-not-working-cannot-convert-from-float-to-int/16115 "2019-12-04T14:45:25Z")

</div>

I’m trying to make a simple 2d application for the “Traveller Salesmanship Problem” i’m configuring the program, i was working on everything in int, but i thougth float would be more accurate, even since i’m working with…

---

## [Difficulty in understanding noise turbulence code from processing book creating organic textures](https://discourse.processing.org/t/difficulty-in-understanding-noise-turbulence-code-from-processing-book-creating-organic-textures/16075)

<div class="topic-metadata">

**Author:** [@Ruchi](https://discourse.processing.org/u/Ruchi)\
**Replies:** 2\
**Last updated:** [December 4, 2019, 6:48am UTC](https://discourse.processing.org/t/difficulty-in-understanding-noise-turbulence-code-from-processing-book-creating-organic-textures/16075 "2019-12-04T06:48:37Z")

</div>

float power=6; //TURBULENCE POWER float d=8; //TURBULENCE DENSITY noStroke(); for (int y=0; y\<height; y++) { for (int x=0; x\<width; x++) { float total=0.0; for (float i=d; i\>=1; i=i/2.0) { t…

---

## [How do I move multiple objects in a circle in order](https://discourse.processing.org/t/how-do-i-move-multiple-objects-in-a-circle-in-order/16101)

<div class="topic-metadata">

**Author:** [@DudVudAura](https://discourse.processing.org/u/DudVudAura)\
**Replies:** 4\
**Last updated:** [December 4, 2019, 6:35am UTC](https://discourse.processing.org/t/how-do-i-move-multiple-objects-in-a-circle-in-order/16101 "2019-12-04T06:35:12Z")

</div>

This is the code I have int cx = 250; int cy = 250; int r = 100; int cq = 250; int ce = 250; int d = 150; void setup() { size(500, 500); } void draw() { background(0); noStroke(); fill(random(0,255),random(0,255…

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

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