# Latest

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

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

**Page:** 235

---

## [Linear color lerp with three colors](https://discourse.processing.org/t/linear-color-lerp-with-three-colors/29269)

<div class="topic-metadata">

**Author:** [@jaspervb](https://discourse.processing.org/u/jaspervb)\
**Replies:** 2\
**Last updated:** [April 10, 2021, 10:44pm UTC](https://discourse.processing.org/t/linear-color-lerp-with-three-colors/29269 "2021-04-10T22:44:31Z")

</div>

Hi There, I Want to make a linear color lerp with three colors. I already figured out how to make a lerp with just two colors. Is there someone who can help me to make a ‘lerpColor()’ with three separete color values? T…

---

## [Resize shapes random](https://discourse.processing.org/t/resize-shapes-random/29265)

<div class="topic-metadata">

**Author:** [@Panda](https://discourse.processing.org/u/Panda)\
**Replies:** 1\
**Last updated:** [April 10, 2021, 7:59pm UTC](https://discourse.processing.org/t/resize-shapes-random/29265 "2021-04-10T19:59:19Z")

</div>

Is there a way to randomly resize shapes that are repeating? I have a simple window full of repeating rect(). Is there a way to throw in a random option, so that each repetition is randomly shrunk or enlarged? (Thus, ra…

---

## [Library installation](https://discourse.processing.org/t/library-installation/22283)

<div class="topic-metadata">

**Author:** [@code\_X](https://discourse.processing.org/u/code_X)\
**Replies:** 1\
**Last updated:** [July 1, 2020, 2:00am UTC](https://discourse.processing.org/t/library-installation/22283 "2020-07-01T02:00:53Z")

</div>

Hello, i am here to ask for help getting a usable repository import link, i use microbits and want to use the p5js library in a microbit program but I can’t import the library from the links i’ve tried. I needs help. Tha…

---

## [Zooming and moving canvas](https://discourse.processing.org/t/zooming-and-moving-canvas/29263)

<div class="topic-metadata">

**Author:** [@rat](https://discourse.processing.org/u/rat)\
**Replies:** 2\
**Last updated:** [April 10, 2021, 5:02pm UTC](https://discourse.processing.org/t/zooming-and-moving-canvas/29263 "2021-04-10T17:02:27Z")

</div>

So I tried implementing a zoom and drag function but its not behaving as expected, I can about the steps to get it to behave like I want it here is a great example of what I was expecting: Desmos | Graphing Calculator …

---

## [Performance issue - \[Violation\] 'requestAnimationFrame'](https://discourse.processing.org/t/performance-issue-violation-requestanimationframe/29260)

<div class="topic-metadata">

**Author:** [@xbix](https://discourse.processing.org/u/xbix)\
**Replies:** 3\
**Last updated:** [April 10, 2021, 4:45pm UTC](https://discourse.processing.org/t/performance-issue-violation-requestanimationframe/29260 "2021-04-10T16:45:04Z")

</div>

In my code, I draw excel data using 2 classes. The CPU load is extremely high and I get this message in the console: \[Violation\] 'requestAnimationFrame' handler took 542ms There are no flare messages and when I reduce …

---

## [Processing Android debug mode](https://discourse.processing.org/t/processing-android-debug-mode/29094)

<div class="topic-metadata">

**Author:** [@SNICKRS](https://discourse.processing.org/u/SNICKRS)\
**Replies:** 5\
**Last updated:** [April 10, 2021, 3:45pm UTC](https://discourse.processing.org/t/processing-android-debug-mode/29094 "2021-04-10T15:45:01Z")

</div>

Hello everyone, I am trying to export a processing game I made in android mode to google play. I am trying to upload the apk, but it keeps throwing an error that it’s a “debuggable” apk. I tried setting the debug value i…

---

## [Canvas doesn't show on mobile](https://discourse.processing.org/t/canvas-doesnt-show-on-mobile/29250)

<div class="topic-metadata">

**Author:** [@loopy](https://discourse.processing.org/u/loopy)\
**Replies:** 1\
**Last updated:** [April 10, 2021, 2:03pm UTC](https://discourse.processing.org/t/canvas-doesnt-show-on-mobile/29250 "2021-04-10T14:03:29Z")

</div>

Hi everyone! I recently published a background creation app and I’m confused about its canvas behavior, namely that the canvas sometimes doesn’t display on mobile. I know it doesn’t show on my old iPhone on Safari and Fi…

---

## [Read data from csv file](https://discourse.processing.org/t/read-data-from-csv-file/29248)

<div class="topic-metadata">

**Author:** [@fleshcircuit](https://discourse.processing.org/u/fleshcircuit)\
**Replies:** 5\
**Last updated:** [April 10, 2021, 12:22pm UTC](https://discourse.processing.org/t/read-data-from-csv-file/29248 "2021-04-10T12:22:27Z")

</div>

Hello, I am working on a project where I would like to read data from a csv file using python mode. From what I can gather, I need to create a Reader, though I am uncertain how to do so (please note that I am a self tau…

---

## [Cp5 slider progressbar](https://discourse.processing.org/t/cp5-slider-progressbar/29225)

<div class="topic-metadata">

**Author:** [@HITman](https://discourse.processing.org/u/HITman)\
**Replies:** 2\
**Last updated:** [April 10, 2021, 7:52am UTC](https://discourse.processing.org/t/cp5-slider-progressbar/29225 "2021-04-10T07:52:12Z")

</div>

Hello, how to use slider as progressbar? If I have 10 lines in array and if for 1 line took 1 second, that means that slider should come to 100% in 10 seconds. B.R Tom

---

## [Draw Order Issue - For Loop and ellipses](https://discourse.processing.org/t/draw-order-issue-for-loop-and-ellipses/29258)

<div class="topic-metadata">

**Author:** [@akathewb](https://discourse.processing.org/u/akathewb)\
**Replies:** 2\
**Last updated:** [April 10, 2021, 7:41am UTC](https://discourse.processing.org/t/draw-order-issue-for-loop-and-ellipses/29258 "2021-04-10T07:41:48Z")

</div>

In the code below I’d like the ellipses to draw on top of the code being run in the for loops, but for some reason they keep drawing before, and I’m not sure how to fix it. Thanks for taking a look. //color variables co…

---

## [Some please help me with my code](https://discourse.processing.org/t/some-please-help-me-with-my-code/29254)

<div class="topic-metadata">

**Author:** [@Bryce](https://discourse.processing.org/u/Bryce)\
**Replies:** 3\
**Last updated:** [April 10, 2021, 2:32am UTC](https://discourse.processing.org/t/some-please-help-me-with-my-code/29254 "2021-04-10T02:32:31Z")

</div>

Hi, my name is Bryce, I am confused about how to make the squares disappear once to circle hits them. Here is my code // circX is for the smaller circle let circX; // circY is for the smaller circle let circY; //b…

---

## [Reset the game of bursting ballons](https://discourse.processing.org/t/reset-the-game-of-bursting-ballons/29238)

<div class="topic-metadata">

**Author:** [@ashk](https://discourse.processing.org/u/ashk)\
**Replies:** 5\
**Last updated:** [April 10, 2021, 2:26am UTC](https://discourse.processing.org/t/reset-the-game-of-bursting-ballons/29238 "2021-04-10T02:26:38Z")

</div>

How could i reset and restart game with a key or button after gameover is displayed? float x = 0; float y = 0; float dim = 50.0; float xim = 90.0; float start = PI; float stop = TWO\_PI; float angle = 0; float s; …

---

## [Help with my code](https://discourse.processing.org/t/help-with-my-code/29013)

<div class="topic-metadata">

**Author:** [@Bryce](https://discourse.processing.org/u/Bryce)\
**Replies:** 3\
**Last updated:** [April 9, 2021, 9:43pm UTC](https://discourse.processing.org/t/help-with-my-code/29013 "2021-04-09T21:43:04Z")

</div>

Hello, my name is Bryce, I have been working on a project for a while and I just cant get it. This is what I'm supposed to do: “Your job is to create a game where there is a row of boxes along the top of the canvas…

---

## [How to show the objects when the ball hits left and right side wall](https://discourse.processing.org/t/how-to-show-the-objects-when-the-ball-hits-left-and-right-side-wall/29252)

<div class="topic-metadata">

**Author:** [@pou5678](https://discourse.processing.org/u/pou5678)\
**Replies:** 2\
**Last updated:** [April 9, 2021, 10:14pm UTC](https://discourse.processing.org/t/how-to-show-the-objects-when-the-ball-hits-left-and-right-side-wall/29252 "2021-04-09T22:14:27Z")

</div>

I tried to do to fix this issue, but it didn’t work well… :/… You know this example is bouncing ball and I want to show the obstacle until ball hits obstacle. I want to get some help to solve. :)… (The problem is this c…

---

## [Periodicity of perlin noise](https://discourse.processing.org/t/periodicity-of-perlin-noise/29245)

<div class="topic-metadata">

**Author:** [@Leoperix03](https://discourse.processing.org/u/Leoperix03)\
**Replies:** 3\
**Last updated:** [April 9, 2021, 8:09pm UTC](https://discourse.processing.org/t/periodicity-of-perlin-noise/29245 "2021-04-09T20:09:14Z")

</div>

Hey everyone, I created a grid of nodes (every node is a class) and every node has its own color, the problem is that I tried to randomize each node\_color with noise() function, the problem though is that when I scroll t…

---

## [ControlP5 and keyPressed()](https://discourse.processing.org/t/controlp5-and-keypressed/29221)

<div class="topic-metadata">

**Author:** [@toby](https://discourse.processing.org/u/toby)\
**Replies:** 2\
**Last updated:** [April 9, 2021, 5:44pm UTC](https://discourse.processing.org/t/controlp5-and-keypressed/29221 "2021-04-09T17:44:00Z")

</div>

Hello fellow Processors! I have an issue with CP5 and I’d appreciate any thoughts. I’m using a text field: gui.addTextfield("frames") .setPosition(100, 400) .setSize(30, 30) .setFont(font) .setValue(1)…

---

## [Where or how to learn trigonometry for processing?](https://discourse.processing.org/t/where-or-how-to-learn-trigonometry-for-processing/28819)

<div class="topic-metadata">

**Author:** [@resboy2445](https://discourse.processing.org/u/resboy2445)\
**Replies:** 21\
**Last updated:** [April 9, 2021, 5:05pm UTC](https://discourse.processing.org/t/where-or-how-to-learn-trigonometry-for-processing/28819 "2021-04-09T17:05:10Z")

</div>

Hello all! where can i learn trigonometry for processing? or can somebody teach me? my teacher taught it in class and i still don’t understand it, i even watched a bunch of youtube videos and i still don’t understand the…

---

## [How do i make a new image file](https://discourse.processing.org/t/how-do-i-make-a-new-image-file/29235)

<div class="topic-metadata">

**Author:** [@canslp](https://discourse.processing.org/u/canslp)\
**Replies:** 8\
**Last updated:** [April 9, 2021, 4:39pm UTC](https://discourse.processing.org/t/how-do-i-make-a-new-image-file/29235 "2021-04-09T16:39:07Z")

</div>

i know how to save a PImage as a png but i have to overwrite an existing file. can i manually create a new png file in my data folder and then write a PImage to it? if i just try to do PImage.save(filename) it tells me …

---

## [Privacy policy and terms of service for p5js.org web editor?](https://discourse.processing.org/t/privacy-policy-and-terms-of-service-for-p5js-org-web-editor/29247)

<div class="topic-metadata">

**Author:** [@teacher\_guy](https://discourse.processing.org/u/teacher_guy)\
**Replies:** 4\
**Last updated:** [April 9, 2021, 4:05pm UTC](https://discourse.processing.org/t/privacy-policy-and-terms-of-service-for-p5js-org-web-editor/29247 "2021-04-09T16:05:14Z")

</div>

I’d like to start using the p5js.org web editor with my elementary and middle school students, but I can’t do so without first reviewing a privacy policy and/or terms of service. I’ve looked through the site and can’t se…

---

## [Pixel window setup](https://discourse.processing.org/t/pixel-window-setup/26136)

<div class="topic-metadata">

**Author:** [@humus](https://discourse.processing.org/u/humus)\
**Replies:** 10\
**Last updated:** [April 9, 2021, 3:17pm UTC](https://discourse.processing.org/t/pixel-window-setup/26136 "2021-04-09T15:17:49Z")

</div>

Hi, I would like to setup a display with CMYK colors chosen randomly every time by Processing (see the exemple in attach but I need one with one colour per pixel and not group of pixels per colour as in the image attach…

---

## [Can random(5) output the number 5?](https://discourse.processing.org/t/can-random-5-output-the-number-5/29241)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 11\
**Last updated:** [April 9, 2021, 1:11pm UTC](https://discourse.processing.org/t/can-random-5-output-the-number-5/29241 "2021-04-09T13:11:31Z")

</div>

Hi! The title says it all. so can floor(random(5)) == 5

---

## [GSOC '21 - Expanding p5.js accessibility features Review of Proposal](https://discourse.processing.org/t/gsoc-21-expanding-p5-js-accessibility-features-review-of-proposal/29237)

<div class="topic-metadata">

**Author:** [@rt1301](https://discourse.processing.org/u/rt1301)\
**Replies:** 3\
**Last updated:** [April 9, 2021, 12:20pm UTC](https://discourse.processing.org/t/gsoc-21-expanding-p5-js-accessibility-features-review-of-proposal/29237 "2021-04-09T12:20:26Z")

</div>

Hello everyone, I am Rishabh Taparia. I am planning on submitting a proposal on expanding the p5.js accessibility features project. A lot of amazing work on this has been done on this by Luis Morales last summer and I pl…

---

## [Calculation result doesnt make sense](https://discourse.processing.org/t/calculation-result-doesnt-make-sense/29232)

<div class="topic-metadata">

**Author:** [@Rektic](https://discourse.processing.org/u/Rektic)\
**Replies:** 3\
**Last updated:** [April 9, 2021, 8:42am UTC](https://discourse.processing.org/t/calculation-result-doesnt-make-sense/29232 "2021-04-09T08:42:57Z")

</div>

Hi, I need help. Its simple, 3\*1/4 obviously equals 0.75 but when I write the following code, it says, the result is 0.0 float x = 3\*1/4; void draw(){ println(x); }

---

## [A better p5.js project creator extension for vscode!](https://discourse.processing.org/t/a-better-p5-js-project-creator-extension-for-vscode/29240)

<div class="topic-metadata">

**Author:** [@langxm](https://discourse.processing.org/u/langxm)\
**Replies:** 3\
**Last updated:** [April 9, 2021, 8:20am UTC](https://discourse.processing.org/t/a-better-p5-js-project-creator-extension-for-vscode/29240 "2021-04-09T08:20:17Z")

</div>

After install this extension you can create multi p5.js project, each project will be in seperate different folders.

---

## [JAVA sketch not working in Android](https://discourse.processing.org/t/java-sketch-not-working-in-android/29211)

<div class="topic-metadata">

**Author:** [@MPROCD](https://discourse.processing.org/u/MPROCD)\
**Replies:** 2\
**Last updated:** [April 9, 2021, 8:03am UTC](https://discourse.processing.org/t/java-sketch-not-working-in-android/29211 "2021-04-09T08:03:30Z")

</div>

I am working on an application which needs to get my router’s IP. The following sketch works in JAVA. Before running in Android, I checked the Internet option under Permissions. With ANDROID, it compiles OK but does n…

---

## [How do I find a maximum number of consecutive non-zero values in the array?](https://discourse.processing.org/t/how-do-i-find-a-maximum-number-of-consecutive-non-zero-values-in-the-array/29200)

<div class="topic-metadata">

**Author:** [@batmm](https://discourse.processing.org/u/batmm)\
**Replies:** 20\
**Last updated:** [April 9, 2021, 1:00am UTC](https://discourse.processing.org/t/how-do-i-find-a-maximum-number-of-consecutive-non-zero-values-in-the-array/29200 "2021-04-09T01:00:10Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I am going to write a function that accept an array of integers(the frequency of number). In this function, I need to return a maximum number of…

---

## [Arduino write data - serial](https://discourse.processing.org/t/arduino-write-data-serial/29128)

<div class="topic-metadata">

**Author:** [@HITman](https://discourse.processing.org/u/HITman)\
**Replies:** 10\
**Last updated:** [April 8, 2021, 11:56pm UTC](https://discourse.processing.org/t/arduino-write-data-serial/29128 "2021-04-08T23:56:08Z")

</div>

Hello, Can someone help me with processing serial code. I have a txt file with gcode, what I need is to open that file, ( for example positions.txt ) read line by line ( array ) and using timer ( delay ) send line b…

---

## [Problem with processing.net.\* library in Android](https://discourse.processing.org/t/problem-with-processing-net-library-in-android/28722)

<div class="topic-metadata">

**Author:** [@MPROCD](https://discourse.processing.org/u/MPROCD)\
**Replies:** 9\
**Last updated:** [April 8, 2021, 6:34pm UTC](https://discourse.processing.org/t/problem-with-processing-net-library-in-android/28722 "2021-04-08T18:34:24Z")

</div>

\<!-- Tips: Hello I have a Processing sketch running OK on JAVA. The sketch uses the processing.net.\* library. When compiled for Android, I get an error message: "No library found for processing.net". Can anyone have an …

---

## [Need Help with Android tint](https://discourse.processing.org/t/need-help-with-android-tint/28991)

<div class="topic-metadata">

**Author:** [@Rogo](https://discourse.processing.org/u/Rogo)\
**Replies:** 6\
**Last updated:** [April 8, 2021, 6:24pm UTC](https://discourse.processing.org/t/need-help-with-android-tint/28991 "2021-04-08T18:24:48Z")

</div>

can someone help me that I come from transparent to an empty picture? PImage startlogo; int start\_time, tnt, count; void setup() { orientation(PORTRAIT); fullScreen(); startlogo = loadImage("logo.png"); star…

---

## [Android mode import processing.net fails build](https://discourse.processing.org/t/android-mode-import-processing-net-fails-build/28473)

<div class="topic-metadata">

**Author:** [@javamind](https://discourse.processing.org/u/javamind)\
**Replies:** 3\
**Last updated:** [April 8, 2021, 6:22pm UTC](https://discourse.processing.org/t/android-mode-import-processing-net-fails-build/28473 "2021-04-08T18:22:23Z")

</div>

Is there an alternative library to replace import processing.net.\* that is not available in Android mode apparently? In Java mode I use Client (processing.net) to telnet into other devices on my local network. thanks,

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

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