# Latest

**URL:** https://discourse.processing.org/latest.md?no_subcategories=false&page=416

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

**Page:** 417

---

## [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…

---

## [The Fault in my Stars (or drawing on top of looping background)](https://discourse.processing.org/t/the-fault-in-my-stars-or-drawing-on-top-of-looping-background/16162)

<div class="topic-metadata">

**Author:** [@AwkwardOwl17](https://discourse.processing.org/u/AwkwardOwl17)\
**Replies:** 2\
**Last updated:** [December 6, 2019, 7:26am UTC](https://discourse.processing.org/t/the-fault-in-my-stars-or-drawing-on-top-of-looping-background/16162 "2019-12-06T07:26:40Z")

</div>

Hello! I’m fairly new to p5.js and object-oriented programming (or programming in general), though I have been playing around in processing for a while. However, I have run into a problem with my code: What I’m trying …

---

## [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…

---

## [Draw continuously animated line with FFT and amplitude](https://discourse.processing.org/t/draw-continuously-animated-line-with-fft-and-amplitude/16069)

<div class="topic-metadata">

**Author:** [@juju](https://discourse.processing.org/u/juju)\
**Replies:** 4\
**Last updated:** [December 6, 2019, 3:43am UTC](https://discourse.processing.org/t/draw-continuously-animated-line-with-fft-and-amplitude/16069 "2019-12-06T03:43:25Z")

</div>

Hi Processing community, I am trying to recreate the effect from this video (8:28 minutes in) which draw the song amplitude as a continuous animated line. I got to the point where I have dots flying around, but have hard…

---

## [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 =…

---

## [Create a text input when mouse clicked](https://discourse.processing.org/t/create-a-text-input-when-mouse-clicked/16167)

<div class="topic-metadata">

**Author:** [@saltsnuf](https://discourse.processing.org/u/saltsnuf)\
**Replies:** 3\
**Last updated:** [December 5, 2019, 10:10pm UTC](https://discourse.processing.org/t/create-a-text-input-when-mouse-clicked/16167 "2019-12-05T22:10:59Z")

</div>

im trying to make a visual program of sticky notes and im wondering how i get a yellow box to appear where a user can enter in text.

---

## [Help with code in python](https://discourse.processing.org/t/help-with-code-in-python/16128)

<div class="topic-metadata">

**Author:** [@mattharmel](https://discourse.processing.org/u/mattharmel)\
**Replies:** 1\
**Last updated:** [December 5, 2019, 9:54pm UTC](https://discourse.processing.org/t/help-with-code-in-python/16128 "2019-12-05T21:54:26Z")

</div>

Hello! I’m in need of help to figure out how to display the code to the interior angle sum of a polygon. if Someone could help me get started that would be amazing!

---

## [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…

---

## [Brightness with original background image](https://discourse.processing.org/t/brightness-with-original-background-image/15792)

<div class="topic-metadata">

**Author:** [@Fadelast](https://discourse.processing.org/u/Fadelast)\
**Replies:** 9\
**Last updated:** [December 5, 2019, 6:12pm UTC](https://discourse.processing.org/t/brightness-with-original-background-image/15792 "2019-12-05T18:12:35Z")

</div>

Hi to all, it is possible to modify the code for brightness, preserving the original color background ? https://p5js.org/examples/color-brightness.html In the example above, the image is only black and white,and i’m tr…

---

## [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!

---

## [Interstitial AdMob Ads](https://discourse.processing.org/t/interstitial-admob-ads/5583)

<div class="topic-metadata">

**Author:** [@MatterLinx](https://discourse.processing.org/u/MatterLinx)\
**Replies:** 5\
**Last updated:** [December 5, 2019, 1:58pm UTC](https://discourse.processing.org/t/interstitial-admob-ads/5583 "2019-12-05T13:58:53Z")

</div>

Hello everyone, I’m trying to implement interstitial ads into my app. I have banner ads working properly, but when I tried to implement interstitial ads, my app crashes when trying to show the ad. I used this tutorial …

---

## [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…

---

## [Implementing ads with admob](https://discourse.processing.org/t/implementing-ads-with-admob/2935)

<div class="topic-metadata">

**Author:** [@Boti](https://discourse.processing.org/u/Boti)\
**Replies:** 11\
**Last updated:** [December 5, 2019, 12:43am UTC](https://discourse.processing.org/t/implementing-ads-with-admob/2935 "2019-12-05T00:43:12Z")

</div>

Hello everyone, I followed these tutorials to add admob ads to my processing sketch: https://forum.processing.org/two/discussion/16686/how-to-add-admob I couldn’t put the second link here because of new user limitatio…

---

## [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 =…

---

## [Function to change Background opacity to an image](https://discourse.processing.org/t/function-to-change-background-opacity-to-an-image/16112)

<div class="topic-metadata">

**Author:** [@Fadelast](https://discourse.processing.org/u/Fadelast)\
**Replies:** 1\
**Last updated:** [December 4, 2019, 6:30pm UTC](https://discourse.processing.org/t/function-to-change-background-opacity-to-an-image/16112 "2019-12-04T18:30:38Z")

</div>

Hi to all, I need a function to change the opacity of a canvas containing an image. How can i achieve this ? Thanks function preload() { img = loadImage("./asset/img/image.jpg"); } function setup() { var can…

---

## [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…

---

## [Modifying line type in WebGL](https://discourse.processing.org/t/modifying-line-type-in-webgl/15339)

<div class="topic-metadata">

**Author:** [@AshaSato](https://discourse.processing.org/u/AshaSato)\
**Replies:** 7\
**Last updated:** [December 4, 2019, 11:45am UTC](https://discourse.processing.org/t/modifying-line-type-in-webgl/15339 "2019-12-04T11:45:56Z")

</div>

Hello! In the past to draw a dashed line I have used the following: drawingContext.setLineDash(\[5, 15\]); This does not appear to work with WebGL. Is there a simple way to get a dashed/dotted line with WebGL?

---

## [\[Project\] Processing for Android Project](https://discourse.processing.org/t/project-processing-for-android-project/16104)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 1\
**Last updated:** [December 4, 2019, 8:43am UTC](https://discourse.processing.org/t/project-processing-for-android-project/16104 "2019-12-04T08:43:24Z")

</div>

Receive data from the database Login and Membership Environment UI CCTV interlocking Set data values Graph display Electric control

---

## [How to write to file](https://discourse.processing.org/t/how-to-write-to-file/16096)

<div class="topic-metadata">

**Author:** [@Asra](https://discourse.processing.org/u/Asra)\
**Replies:** 4\
**Last updated:** [December 4, 2019, 8:16am UTC](https://discourse.processing.org/t/how-to-write-to-file/16096 "2019-12-04T08:16:25Z")

</div>

I have two ArrayLists and I am writing them to a file, though it is not working and the file is not changed. here is my code for writing the list to a file. void save(){ String\[\] save = new String\[10\]; for(int i = 0…

---

## [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/latest.md?no_subcategories=false&page=415)

[Next page](https://discourse.processing.org/latest.md?no_subcategories=false&page=417)
