# Latest

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

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

**Page:** 179

---

## [Help translating p3 to p5js](https://discourse.processing.org/t/help-translating-p3-to-p5js/33199)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 10\
**Last updated:** [November 10, 2021, 4:16pm UTC](https://discourse.processing.org/t/help-translating-p3-to-p5js/33199 "2021-11-10T16:16:26Z")

</div>

i tried translating my processing 3 code into p5js code but it doesn’t work. what did i do wrong? p5js code: var trashX; var trashY; var boatX; var boatY; var ropelenght = 0; var movingspeed = 10; var time; var sc…

---

## [How to set the frequency of loaddata requests](https://discourse.processing.org/t/how-to-set-the-frequency-of-loaddata-requests/33442)

<div class="topic-metadata">

**Author:** [@Arabesque0210](https://discourse.processing.org/u/Arabesque0210)\
**Replies:** 0\
**Last updated:** [November 10, 2021, 2:48pm UTC](https://discourse.processing.org/t/how-to-set-the-frequency-of-loaddata-requests/33442 "2021-11-10T14:48:49Z")

</div>

Hi, I am still exploring this interesting code, but I met this problem today. I tried to use API to get real-time wind data from a website, but the free plan only allows me to request data 500 times a day. So I was won…

---

## [Can't run Processing](https://discourse.processing.org/t/cant-run-processing/33294)

<div class="topic-metadata">

**Author:** [@yalaniv](https://discourse.processing.org/u/yalaniv)\
**Replies:** 1\
**Last updated:** [November 10, 2021, 5:55am UTC](https://discourse.processing.org/t/cant-run-processing/33294 "2021-11-10T05:55:41Z")

</div>

Recently I had to replace my Hdd, so I had to download processing again. Since then, I cannot run it, because it only shows the small black intro screen for a second, and it shut down. Any ideas?

---

## [P5 js editor blocked by Avast- new problem](https://discourse.processing.org/t/p5-js-editor-blocked-by-avast-new-problem/33417)

<div class="topic-metadata">

**Author:** [@Kris1](https://discourse.processing.org/u/Kris1)\
**Replies:** 4\
**Last updated:** [November 9, 2021, 11:46pm UTC](https://discourse.processing.org/t/p5-js-editor-blocked-by-avast-new-problem/33417 "2021-11-09T23:46:10Z")

</div>

Hi Folks- yesterday I was working on a project. There were no isssues with the P5 editor. I came back a few hours later and a warning message from Avast came up. This has never happened to me before using P5 JS. Has …

---

## [Getting a gradient RGB line using lerp](https://discourse.processing.org/t/getting-a-gradient-rgb-line-using-lerp/33424)

<div class="topic-metadata">

**Author:** [@endymion](https://discourse.processing.org/u/endymion)\
**Replies:** 1\
**Last updated:** [November 9, 2021, 8:51pm UTC](https://discourse.processing.org/t/getting-a-gradient-rgb-line-using-lerp/33424 "2021-11-09T20:51:11Z")

</div>

So I found some code that used lerp to create a gradient between black and white and I modified it to create a gradient between red and blue, but I’d like it to span the whole RGB spectrum: void gradient\_line( color s, …

---

## [How do i create a program to loop through videos in p5.js](https://discourse.processing.org/t/how-do-i-create-a-program-to-loop-through-videos-in-p5-js/33401)

<div class="topic-metadata">

**Author:** [@iade2021](https://discourse.processing.org/u/iade2021)\
**Replies:** 8\
**Last updated:** [November 9, 2021, 7:11pm UTC](https://discourse.processing.org/t/how-do-i-create-a-program-to-loop-through-videos-in-p5-js/33401 "2021-11-09T19:11:04Z")

</div>

\< I am pretty new to coding, I am trying to apply different seriously.js effects on different arrays of videos, I am not even able to make the program loop through the videos in the array …

---

## [Esri/Leaflet : converting between pixel coordinates and latitude/longitude coordinates](https://discourse.processing.org/t/esri-leaflet-converting-between-pixel-coordinates-and-latitude-longitude-coordinates/33418)

<div class="topic-metadata">

**Author:** [@cartopher](https://discourse.processing.org/u/cartopher)\
**Replies:** 1\
**Last updated:** [November 9, 2021, 4:43pm UTC](https://discourse.processing.org/t/esri-leaflet-converting-between-pixel-coordinates-and-latitude-longitude-coordinates/33418 "2021-11-09T16:43:57Z")

</div>

I’m currently working on an interactive map using p5.js. Having said that, I’m on a mission to figure out how to communicate between a p5.js sketch and the leaflet map’s geographic coordinates, i.e., converting between p…

---

## [G4P Library : GTextField text alignment](https://discourse.processing.org/t/g4p-library-gtextfield-text-alignment/33319)

<div class="topic-metadata">

**Author:** [@R2processing](https://discourse.processing.org/u/R2processing)\
**Replies:** 2\
**Last updated:** [November 9, 2021, 5:07am UTC](https://discourse.processing.org/t/g4p-library-gtextfield-text-alignment/33319 "2021-11-09T05:07:54Z")

</div>

Hello, I’m using the useful G4P library. using txfTEST = new GTextField(this, 10, 20, 70, 20); txfTEST.setText(strTEST); pnlCtrl.addControl(txfTEST); allows me to define a GTextField object in the panel but the te…

---

## [Setting random image texture on randomized number of torus from image array](https://discourse.processing.org/t/setting-random-image-texture-on-randomized-number-of-torus-from-image-array/33031)

<div class="topic-metadata">

**Author:** [@repeaterblues](https://discourse.processing.org/u/repeaterblues)\
**Replies:** 5\
**Last updated:** [November 9, 2021, 4:46am UTC](https://discourse.processing.org/t/setting-random-image-texture-on-randomized-number-of-torus-from-image-array/33031 "2021-11-09T04:46:52Z")

</div>

Hello, I am working on a code in webgl in the p5js web editor that calls in a random number of spinning torus, spinning at different speeds and angles, which are all defined. I have set the texture to pull from an array …

---

## [IndexOutOfBoundsException](https://discourse.processing.org/t/indexoutofboundsexception/12499)

<div class="topic-metadata">

**Author:** [@bu.aus](https://discourse.processing.org/u/bu.aus)\
**Replies:** 3\
**Last updated:** [November 9, 2021, 1:19am UTC](https://discourse.processing.org/t/indexoutofboundsexception/12499 "2021-11-09T01:19:43Z")

</div>

Hello, i copied a very simple code from the website,https://processing.org/reference/libraries/sound/SoundFile.html but turns out the problem:IndexOutOfBoundsException .I’ve checked that the file is in the data folder. …

---

## [Size only accepts literals not expressions 4 beta](https://discourse.processing.org/t/size-only-accepts-literals-not-expressions-4-beta/33372)

<div class="topic-metadata">

**Author:** [@seanc4s](https://discourse.processing.org/u/seanc4s)\
**Replies:** 4\
**Last updated:** [November 9, 2021, 12:12am UTC](https://discourse.processing.org/t/size-only-accepts-literals-not-expressions-4-beta/33372 "2021-11-09T00:12:15Z")

</div>

float\[\] data=new float\[50000\]; void setup(){ size(300\*3,300); background(0); for(int i=0;i\<50000;i++){ data\[i\]=randomGaussian(); } for(int i=0;i\<50000;i+=2){ int x=150+int(50f\*data\[i\]); int y=150+in…

---

## [Building App Bundles with Processing](https://discourse.processing.org/t/building-app-bundles-with-processing/16471)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 4\
**Last updated:** [November 8, 2021, 4:51pm UTC](https://discourse.processing.org/t/building-app-bundles-with-processing/16471 "2021-11-08T16:51:16Z")

</div>

I have finished my app with processing, I have exported to apk file and now Google Play says I need a bundle. All tutorials on internet are with Android Studio, but I don’t know how to use this software, and every tutori…

---

## [How to create Android app bundle?](https://discourse.processing.org/t/how-to-create-android-app-bundle/26592)

<div class="topic-metadata">

**Author:** [@gio93](https://discourse.processing.org/u/gio93)\
**Replies:** 8\
**Last updated:** [November 8, 2021, 4:49pm UTC](https://discourse.processing.org/t/how-to-create-android-app-bundle/26592 "2021-11-08T16:49:32Z")

</div>

how to create android app bundle?

---

## [Serial data from Arduino to Processing does not update](https://discourse.processing.org/t/serial-data-from-arduino-to-processing-does-not-update/33378)

<div class="topic-metadata">

**Author:** [@BerndKoggel](https://discourse.processing.org/u/BerndKoggel)\
**Replies:** 4\
**Last updated:** [November 8, 2021, 3:07pm UTC](https://discourse.processing.org/t/serial-data-from-arduino-to-processing-does-not-update/33378 "2021-11-08T15:07:27Z")

</div>

I have an arduino test wether two wires touch, this works. The data is stored in an array for each pin and given either a 1 or 0 if the wire connects to another. The Serial.print is used to send the data, the serial moni…

---

## [Drag & Drop PGraphics](https://discourse.processing.org/t/drag-drop-pgraphics/33396)

<div class="topic-metadata">

**Author:** [@rism](https://discourse.processing.org/u/rism)\
**Replies:** 2\
**Last updated:** [November 8, 2021, 2:48pm UTC](https://discourse.processing.org/t/drag-drop-pgraphics/33396 "2021-11-08T14:48:45Z")

</div>

Hi, I am trying to move the square to another position but it forms a streak of squares instead when dragged. Here is what I have so far: PGraphics squares; float bx; float by; boolean locked = false; float xOffset …

---

## [Why are two rects displayed](https://discourse.processing.org/t/why-are-two-rects-displayed/33393)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 1\
**Last updated:** [November 8, 2021, 1:36pm UTC](https://discourse.processing.org/t/why-are-two-rects-displayed/33393 "2021-11-08T13:36:43Z")

</div>

when i press on the kill icon, two rects are displayed when only one should

---

## [Webcam capture and PGraphics](https://discourse.processing.org/t/webcam-capture-and-pgraphics/33389)

<div class="topic-metadata">

**Author:** [@mario60](https://discourse.processing.org/u/mario60)\
**Replies:** 3\
**Last updated:** [November 8, 2021, 1:09pm UTC](https://discourse.processing.org/t/webcam-capture-and-pgraphics/33389 "2021-11-08T13:09:58Z")

</div>

import processing.video.\*; Capture cam; PGraphics pg1; void setup() { size(950, 950); frameRate(10); pg1 = createGraphics(475, 475); String\[\] cameras = Capture.list(); if (cameras.length == 0) { pr…

---

## [Casting 3d to 2d](https://discourse.processing.org/t/casting-3d-to-2d/33185)

<div class="topic-metadata">

**Author:** [@Infi](https://discourse.processing.org/u/Infi)\
**Replies:** 8\
**Last updated:** [November 8, 2021, 12:30pm UTC](https://discourse.processing.org/t/casting-3d-to-2d/33185 "2021-11-08T12:30:20Z")

</div>

Hello, I am searching for a method of casting a loaded 3d object into 2d image, similarly to 2D Topographical Map - #2 by solub Although i would need, instead of height contours, a full 2d image, where gray-scale repre…

---

## [Can I rotate PGraphics by its center axis?](https://discourse.processing.org/t/can-i-rotate-pgraphics-by-its-center-axis/33398)

<div class="topic-metadata">

**Author:** [@Skycstls](https://discourse.processing.org/u/Skycstls)\
**Replies:** 1\
**Last updated:** [November 8, 2021, 12:16pm UTC](https://discourse.processing.org/t/can-i-rotate-pgraphics-by-its-center-axis/33398 "2021-11-08T12:16:02Z")

</div>

Hello processing forum! I have this little code working, it starts by creating a few PGraphics on an array like this: void shapesCreation(int nShapes) { shapes = new PGraphics\[nShapes\]; for (int i = 0; i \< shapes.l…

---

## [Displaying movie in Processing not working!?](https://discourse.processing.org/t/displaying-movie-in-processing-not-working/33179)

<div class="topic-metadata">

**Author:** [@xeronimo](https://discourse.processing.org/u/xeronimo)\
**Replies:** 2\
**Last updated:** [November 8, 2021, 8:55am UTC](https://discourse.processing.org/t/displaying-movie-in-processing-not-working/33179 "2021-11-08T08:55:54Z")

</div>

Hi, I’m trying to import a movie into my sketch using the movie library. It used to work in the past but now it doesn’t … it crashes in P2D and P3D, and in the normal mode it shows the video in a distorted way It’s an…

---

## [Convert any image to a puzzle](https://discourse.processing.org/t/convert-any-image-to-a-puzzle/33149)

<div class="topic-metadata">

**Author:** [@Stephcraft](https://discourse.processing.org/u/Stephcraft)\
**Replies:** 3\
**Last updated:** [November 8, 2021, 4:27am UTC](https://discourse.processing.org/t/convert-any-image-to-a-puzzle/33149 "2021-11-08T04:27:01Z")

</div>

Made with p5.js Usage https://puzzlefy.netlify.app/?image=\<url\>&cols=\<number\>&rows=\<number\> image : link to an image url .jpg , .png … and also certain .gif s! cols : width of puzzle in pieces rows : height of puzzl…

---

## [Efficiency of code with 100+ objects](https://discourse.processing.org/t/efficiency-of-code-with-100-objects/33236)

<div class="topic-metadata">

**Author:** [@tribblesontoast](https://discourse.processing.org/u/tribblesontoast)\
**Replies:** 5\
**Last updated:** [November 8, 2021, 3:28am UTC](https://discourse.processing.org/t/efficiency-of-code-with-100-objects/33236 "2021-11-08T03:28:02Z")

</div>

Hi all, I’m writing a program that has numerous moving objects on screen and my frame rate starts to take a serious hit at around 100 - 110 objects. I’ve seen programs with thousands running easily so clearly I’m writi…

---

## [Math doesn't work?](https://discourse.processing.org/t/math-doesnt-work/33384)

<div class="topic-metadata">

**Author:** [@stefanmz7](https://discourse.processing.org/u/stefanmz7)\
**Replies:** 11\
**Last updated:** [November 8, 2021, 1:24am UTC](https://discourse.processing.org/t/math-doesnt-work/33384 "2021-11-08T01:24:48Z")

</div>

Hey so why when I do location.y-brick1.y ,location 1 is positive brick1 is -500 it gives out a negative number? Like location.y–500 is location.y +500 so that’s positive. Do math rules not apply in processing?

---

## [Creating a word carpet by rotating and positioning a word a mulitple times](https://discourse.processing.org/t/creating-a-word-carpet-by-rotating-and-positioning-a-word-a-mulitple-times/33153)

<div class="topic-metadata">

**Author:** [@ontherun](https://discourse.processing.org/u/ontherun)\
**Replies:** 7\
**Last updated:** [November 8, 2021, 12:26am UTC](https://discourse.processing.org/t/creating-a-word-carpet-by-rotating-and-positioning-a-word-a-mulitple-times/33153 "2021-11-08T00:26:30Z")

</div>

Hi dear community, Im quite new into processing, but seeing more and more the advantages for generative design aspects and experiments. So for an analog project I would try out the digital dummy. As written in the head…

---

## [Ball Moving Along the Screen Similar to the Game Pong](https://discourse.processing.org/t/ball-moving-along-the-screen-similar-to-the-game-pong/33388)

<div class="topic-metadata">

**Author:** [@Chels](https://discourse.processing.org/u/Chels)\
**Replies:** 2\
**Last updated:** [November 7, 2021, 9:36pm UTC](https://discourse.processing.org/t/ball-moving-along-the-screen-similar-to-the-game-pong/33388 "2021-11-07T21:36:59Z")

</div>

I’m fairly new to processing. So I searched up the Coding Train channel on YouTube and changed a bit of a code to not have the bouncing ball get cut out the window when it runs. Source: https://www.youtube.com/watch?v=Y…

---

## [Struggling to create a gradient](https://discourse.processing.org/t/struggling-to-create-a-gradient/33355)

<div class="topic-metadata">

**Author:** [@bcabc](https://discourse.processing.org/u/bcabc)\
**Replies:** 4\
**Last updated:** [November 7, 2021, 7:07pm UTC](https://discourse.processing.org/t/struggling-to-create-a-gradient/33355 "2021-11-07T19:07:41Z")

</div>

hi there - i am looking to include gradients in my processing drawings. i am generating svg images, so i believe the P2D renderer isn’t for me. i’d also like to apply the gradients to large shapes made out of bezier cu…

---

## [Straightening out the Gaussian random distribution](https://discourse.processing.org/t/straightening-out-the-gaussian-random-distribution/33373)

<div class="topic-metadata">

**Author:** [@seanc4s](https://discourse.processing.org/u/seanc4s)\
**Replies:** 0\
**Last updated:** [November 7, 2021, 1:03pm UTC](https://discourse.processing.org/t/straightening-out-the-gaussian-random-distribution/33373 "2021-11-07T13:03:11Z")

</div>

Any time you sum up a bunch of variables or use the weighted sum the Gaussian distribution tends to appear. You may want to convert that into the uniform distribution for various applications. The standard method is to …

---

## [Connecting Perlin noise waves](https://discourse.processing.org/t/connecting-perlin-noise-waves/33359)

<div class="topic-metadata">

**Author:** [@basielcole](https://discourse.processing.org/u/basielcole)\
**Replies:** 2\
**Last updated:** [November 7, 2021, 12:21pm UTC](https://discourse.processing.org/t/connecting-perlin-noise-waves/33359 "2021-11-07T12:21:32Z")

</div>

Hi everyone, I have been trying to connect two or more waves generated with the noise() function. The idea is to get one continuous wave with specific areas having more/less noise added to them. Is there a simple way to …

---

## [Methods bound to p5 "canvas" vs. offscreen p5 "graphics"](https://discourse.processing.org/t/methods-bound-to-p5-canvas-vs-offscreen-p5-graphics/14079)

<div class="topic-metadata">

**Author:** [@grege2](https://discourse.processing.org/u/grege2)\
**Replies:** 5\
**Last updated:** [November 7, 2021, 4:23am UTC](https://discourse.processing.org/t/methods-bound-to-p5-canvas-vs-offscreen-p5-graphics/14079 "2021-11-07T04:23:30Z")

</div>

Hi folks, I’m finding that some everyday p5.js methods are not bound to a p5 canvas in the way that I expected. But they are all bound ok to a p5.Graphics created with createGraphics(). So, if I create a canvas, with …

---

## [Insert a path into a flowfield](https://discourse.processing.org/t/insert-a-path-into-a-flowfield/33334)

<div class="topic-metadata">

**Author:** [@sigbjorn](https://discourse.processing.org/u/sigbjorn)\
**Replies:** 0\
**Last updated:** [November 5, 2021, 1:26pm UTC](https://discourse.processing.org/t/insert-a-path-into-a-flowfield/33334 "2021-11-05T13:26:35Z")

</div>

Hi I have an art project for my class. For this I would like to insert a path function to a flowfield. I feel like im almost done, but cant seem to place the last puzzle. For mye work I have been using the Coding trai…

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

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