# Latest

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

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

**Page:** 101

---

## [How to get instance p5 object when clicking on the div container?](https://discourse.processing.org/t/how-to-get-instance-p5-object-when-clicking-on-the-div-container/39831)

<div class="topic-metadata">

**Author:** [@Chris](https://discourse.processing.org/u/Chris)\
**Replies:** 4\
**Last updated:** [November 23, 2022, 4:08pm UTC](https://discourse.processing.org/t/how-to-get-instance-p5-object-when-clicking-on-the-div-container/39831 "2022-11-23T16:08:53Z")

</div>

Hello all ! How to get instance p5 object when clicked on the div which contain this p5 instance canvas ? Actually, I have an array of array {divName,p5Inst} divname + P5 object. When I clic on the div, then I can get …

---

## [Collision between rectangles](https://discourse.processing.org/t/collision-between-rectangles/39834)

<div class="topic-metadata">

**Author:** [@turke1034](https://discourse.processing.org/u/turke1034)\
**Replies:** 4\
**Last updated:** [November 23, 2022, 2:51am UTC](https://discourse.processing.org/t/collision-between-rectangles/39834 "2022-11-23T02:51:04Z")

</div>

I am trying to make collision between rectangles in my game. The player can move with W, A, S, D and there are ‘blocks’ that the player is supposed to collide with. I’m able to make it so the player can collide normally …

---

## [Websockets Library Issues (WebsocketClient constructor)](https://discourse.processing.org/t/websockets-library-issues-websocketclient-constructor/39823)

<div class="topic-metadata">

**Author:** [@Mattyjak](https://discourse.processing.org/u/Mattyjak)\
**Replies:** 5\
**Last updated:** [November 23, 2022, 1:29am UTC](https://discourse.processing.org/t/websockets-library-issues-websocketclient-constructor/39823 "2022-11-23T01:29:49Z")

</div>

Hello guys! I’m having some issue with the websockets library. In the “docs” (aka the github repo) the WebsocketClient class has several different constructor forms. The main one I’m trying to use, is the primary form: …

---

## [Text random position](https://discourse.processing.org/t/text-random-position/39571)

<div class="topic-metadata">

**Author:** [@Moonshiner](https://discourse.processing.org/u/Moonshiner)\
**Replies:** 2\
**Last updated:** [November 22, 2022, 7:37pm UTC](https://discourse.processing.org/t/text-random-position/39571 "2022-11-22T19:37:02Z")

</div>

Hey guys, I’m new to processing. I need a text at a random Position. But text(“Hello”,random(1,500)); isn’t allowed. How do i do that ? Thank you in Advance

---

## [3D Shape picking in p5.js](https://discourse.processing.org/t/3d-shape-picking-in-p5-js/39778)

<div class="topic-metadata">

**Author:** [@quark](https://discourse.processing.org/u/quark)\
**Replies:** 3\
**Last updated:** [November 22, 2022, 6:32pm UTC](https://discourse.processing.org/t/3d-shape-picking-in-p5-js/39778 "2022-11-22T18:32:03Z")

</div>

I needed a 3D shape picker for p5.js so I used what I had learnt from mixing 3D and 2D in canvasGUI to create my own. In the Jetsons sketch the boxes were created with the box(...) method and you can select any box by c…

---

## [Millis . How to calculate 80hz in millis%](https://discourse.processing.org/t/millis-how-to-calculate-80hz-in-millis/39774)

<div class="topic-metadata">

**Author:** [@vrtx](https://discourse.processing.org/u/vrtx)\
**Replies:** 13\
**Last updated:** [November 22, 2022, 6:30pm UTC](https://discourse.processing.org/t/millis-how-to-calculate-80hz-in-millis/39774 "2022-11-22T18:30:26Z")

</div>

Hi there… I have this exemple to learn how to calculate flash per second from hz to millis %. I know that it is 1/1000 seconds. What i want is to make the rect flashes 80hz or 80 x per second. tks //String\[\] sentenc…

---

## [Cant get object to work in processing.py](https://discourse.processing.org/t/cant-get-object-to-work-in-processing-py/39830)

<div class="topic-metadata">

**Author:** [@Fosker](https://discourse.processing.org/u/Fosker)\
**Replies:** 1\
**Last updated:** [November 22, 2022, 6:02pm UTC](https://discourse.processing.org/t/cant-get-object-to-work-in-processing-py/39830 "2022-11-22T18:02:25Z")

</div>

Sorry new to Processing and trying to build a wall with different sized bricks, at the basic stage of creating a brick class this doesn’t produce anything when I run it and I can’t work out why…! class Brick(object): d…

---

## [Distort a time graph sample. Transform a shape recorded for 2 seconds into a perfect movement](https://discourse.processing.org/t/distort-a-time-graph-sample-transform-a-shape-recorded-for-2-seconds-into-a-perfect-movement/39828)

<div class="topic-metadata">

**Author:** [@bking](https://discourse.processing.org/u/bking)\
**Replies:** 0\
**Last updated:** [November 22, 2022, 2:46pm UTC](https://discourse.processing.org/t/distort-a-time-graph-sample-transform-a-shape-recorded-for-2-seconds-into-a-perfect-movement/39828 "2022-11-22T14:46:41Z")

</div>

Dear everyones :wink: The idea is to record any movement for 2 sec, transform it to loop it (so that the movement is ‘full’) and play it back for exactly 2 sec. To replay the transformed movement, the movement must be d…

---

## [How do I change mouseX, mouseY default origin positions](https://discourse.processing.org/t/how-do-i-change-mousex-mousey-default-origin-positions/39780)

<div class="topic-metadata">

**Author:** [@Siyue](https://discourse.processing.org/u/Siyue)\
**Replies:** 7\
**Last updated:** [November 22, 2022, 3:27pm UTC](https://discourse.processing.org/t/how-do-i-change-mousex-mousey-default-origin-positions/39780 "2022-11-22T15:27:07Z")

</div>

hey guys, this is a very small question. and here is my code: void setup() { size(600, 800); background(20, 40, 80); } void draw() { stroke(30,200,100,40); line(mouseX,mouseY,300,30); } void mousePressed(){back…

---

## [Duplicate method error after moving from v3 to v4](https://discourse.processing.org/t/duplicate-method-error-after-moving-from-v3-to-v4/36775)

<div class="topic-metadata">

**Author:** [@deisengard](https://discourse.processing.org/u/deisengard)\
**Replies:** 3\
**Last updated:** [November 22, 2022, 10:48am UTC](https://discourse.processing.org/t/duplicate-method-error-after-moving-from-v3-to-v4/36775 "2022-11-22T10:48:48Z")

</div>

Running Processing 4 beta 7 on Windows 11. I am attempting to run a sketch that runs fine in Processing 3 on the same machine. Loading it now in P4 with no changes results in a “duplicate method settings()” error even …

---

## [I want to add wind force on this code and also if possible changing the colours in every movement.Can someone help me or give a idea of that?](https://discourse.processing.org/t/i-want-to-add-wind-force-on-this-code-and-also-if-possible-changing-the-colours-in-every-movement-can-someone-help-me-or-give-a-idea-of-that/39819)

<div class="topic-metadata">

**Author:** [@rocky](https://discourse.processing.org/u/rocky)\
**Replies:** 1\
**Last updated:** [November 21, 2022, 10:22pm UTC](https://discourse.processing.org/t/i-want-to-add-wind-force-on-this-code-and-also-if-possible-changing-the-colours-in-every-movement-can-someone-help-me-or-give-a-idea-of-that/39819 "2022-11-21T22:22:01Z")

</div>

Flock flock; void setup() { size(500,500); flock = new Flock(); for (int i=0; i\<100; i++) { Boid b = new Boid(width/1, height/1); flock.addBoid(b); } } void draw() { background(100); flock.run(); } class Boi…

---

## [Processing - Serial Coms with Arduino - receiving mostly "nulls"](https://discourse.processing.org/t/processing-serial-coms-with-arduino-receiving-mostly-nulls/39816)

<div class="topic-metadata">

**Author:** [@Europa81](https://discourse.processing.org/u/Europa81)\
**Replies:** 1\
**Last updated:** [November 21, 2022, 11:50pm UTC](https://discourse.processing.org/t/processing-serial-coms-with-arduino-receiving-mostly-nulls/39816 "2022-11-21T23:50:29Z")

</div>

Trying to get an Arduino report Data to Processing with a sketch which sends a String (“abcd”) every second. On Processing side there is: import processing.serial.\*; Serial SerPort; String rx = ""; void setup () { …

---

## [Particle collision in a 3D box](https://discourse.processing.org/t/particle-collision-in-a-3d-box/39821)

<div class="topic-metadata">

**Author:** [@Divitiacus](https://discourse.processing.org/u/Divitiacus)\
**Replies:** 1\
**Last updated:** [November 22, 2022, 12:23am UTC](https://discourse.processing.org/t/particle-collision-in-a-3d-box/39821 "2022-11-22T00:23:05Z")

</div>

Originally I had planned to develop that a bit further before presenting it here but now I spend weeks chasing bugs (some even imaginary) to make that work, that I decide to leave that here as one option how to do 3D par…

---

## [Importing Java libraries into embed Processing sketch online](https://discourse.processing.org/t/importing-java-libraries-into-embed-processing-sketch-online/39693)

<div class="topic-metadata">

**Author:** [@zellwd](https://discourse.processing.org/u/zellwd)\
**Replies:** 4\
**Last updated:** [November 21, 2022, 6:08pm UTC](https://discourse.processing.org/t/importing-java-libraries-into-embed-processing-sketch-online/39693 "2022-11-21T18:08:06Z")

</div>

Hello, I’m trying to embed a Processing sketch onto an HTML page, which uses Java libraries, I’ve been following this guide. Processing on the web does not support imported libraries, which is probably why the program w…

---

## [How to record and playback samples using Minim library?](https://discourse.processing.org/t/how-to-record-and-playback-samples-using-minim-library/39814)

<div class="topic-metadata">

**Author:** [@jvolker](https://discourse.processing.org/u/jvolker)\
**Replies:** 0\
**Last updated:** [November 21, 2022, 5:26pm UTC](https://discourse.processing.org/t/how-to-record-and-playback-samples-using-minim-library/39814 "2022-11-21T17:26:31Z")

</div>

Hi, I’m trying to record and play back sound samples. I found this example using the Minim library: Minim : : Minim : : createRecorder However, the example requires saving the recorded audio to a file in order to play …

---

## [Random running continously (Card Game, deck of cards)](https://discourse.processing.org/t/random-running-continously-card-game-deck-of-cards/39784)

<div class="topic-metadata">

**Author:** [@BrokenSpace](https://discourse.processing.org/u/BrokenSpace)\
**Replies:** 7\
**Last updated:** [November 21, 2022, 1:18pm UTC](https://discourse.processing.org/t/random-running-continously-card-game-deck-of-cards/39784 "2022-11-21T13:18:03Z")

</div>

I’m making a deck of cards. I have each image of the cards in a 2D array with each value of the array representing suit\[4\] and rank\[13\]. I’m trying to use random to randomly pull an image from it but it just cycles throu…

---

## [Canvas2D: Multiple readback operations](https://discourse.processing.org/t/canvas2d-multiple-readback-operations/39804)

<div class="topic-metadata">

**Author:** [@mattobject](https://discourse.processing.org/u/mattobject)\
**Replies:** 2\
**Last updated:** [November 20, 2022, 10:53pm UTC](https://discourse.processing.org/t/canvas2d-multiple-readback-operations/39804 "2022-11-20T22:53:20Z")

</div>

I’ve noticed in the past few months a new warning in the console when a sketch loads image files: p5.js:80807 Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set…

---

## [Importing PSurfaceAWT](https://discourse.processing.org/t/importing-psurfaceawt/39777)

<div class="topic-metadata">

**Author:** [@Svedblen](https://discourse.processing.org/u/Svedblen)\
**Replies:** 5\
**Last updated:** [November 20, 2022, 11:43am UTC](https://discourse.processing.org/t/importing-psurfaceawt/39777 "2022-11-20T11:43:00Z")

</div>

Hi! I’m new to Processing and also to Java (but not to SW otherwise). I’m trying to piece together a WindowAdapter, and eventually an window listener, but have trouble getting this import to work: import processing.awt…

---

## [Serial Events and the which parameter](https://discourse.processing.org/t/serial-events-and-the-which-parameter/39638)

<div class="topic-metadata">

**Author:** [@GhostGlitch](https://discourse.processing.org/u/GhostGlitch)\
**Replies:** 4\
**Last updated:** [November 20, 2022, 1:58am UTC](https://discourse.processing.org/t/serial-events-and-the-which-parameter/39638 "2022-11-20T01:58:44Z")

</div>

In the Libraries Reference for serialEvents it mentions a “which” parameter but does not go into any details about it. I’ve search for any references on how to use this, but have come up short. How does this parameter …

---

## [Performance issue when drawing on large canvas after loadPixels()](https://discourse.processing.org/t/performance-issue-when-drawing-on-large-canvas-after-loadpixels/39645)

<div class="topic-metadata">

**Author:** [@meezwhite](https://discourse.processing.org/u/meezwhite)\
**Replies:** 1\
**Last updated:** [November 20, 2022, 1:07am UTC](https://discourse.processing.org/t/performance-issue-when-drawing-on-large-canvas-after-loadpixels/39645 "2022-11-20T01:07:47Z")

</div>

I encountered a performance issue (especially on Chrome) when drawing on a large canvas after executing loadPixels(). Here’s an example The example code: const canvasSize = 2048; // try 4096 const density = 1; let dia…

---

## [Csv does not exist or could not be read (application)](https://discourse.processing.org/t/csv-does-not-exist-or-could-not-be-read-application/39763)

<div class="topic-metadata">

**Author:** [@Jean-no](https://discourse.processing.org/u/Jean-no)\
**Replies:** 11\
**Last updated:** [November 20, 2022, 12:44am UTC](https://discourse.processing.org/t/csv-does-not-exist-or-could-not-be-read-application/39763 "2022-11-20T00:44:25Z")

</div>

Hi ! My program is quite simple : Table base = loadTable("base.csv"); println(base.getRowCount() + " total rows in table"); And it works well while running it from Processing. The base.csv file is in the data fol…

---

## [Dividing two numbers results in int, even though it should be a float](https://discourse.processing.org/t/dividing-two-numbers-results-in-int-even-though-it-should-be-a-float/39794)

<div class="topic-metadata">

**Author:** [@Kalarila](https://discourse.processing.org/u/Kalarila)\
**Replies:** 3\
**Last updated:** [November 19, 2022, 9:23pm UTC](https://discourse.processing.org/t/dividing-two-numbers-results-in-int-even-though-it-should-be-a-float/39794 "2022-11-19T21:23:28Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Ok, so I’m writing an image editing program and would like to get the aspect ratio of the image. So I declared a float variable called “aspectRa…

---

## [Loss of sound/audio when using VideoExport (hamoid import)](https://discourse.processing.org/t/loss-of-sound-audio-when-using-videoexport-hamoid-import/23306)

<div class="topic-metadata">

**Author:** [@jesspayne](https://discourse.processing.org/u/jesspayne)\
**Replies:** 2\
**Last updated:** [November 19, 2022, 6:35pm UTC](https://discourse.processing.org/t/loss-of-sound-audio-when-using-videoexport-hamoid-import/23306 "2022-11-19T18:35:35Z")

</div>

Hi all, I’m trying to export my sketch using the VideoExport function (Hamoid import) but am losing sound on playback. I’ve copied my code below - am I missing something? Thanks in advance, Jess import com.hamoid.\*; …

---

## [How to create a 3D star?](https://discourse.processing.org/t/how-to-create-a-3d-star/39754)

<div class="topic-metadata">

**Author:** [@timob256](https://discourse.processing.org/u/timob256)\
**Replies:** 10\
**Last updated:** [November 19, 2022, 6:28pm UTC](https://discourse.processing.org/t/how-to-create-a-3d-star/39754 "2022-11-19T18:28:06Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I trying create 3d star but this not good wraiting cone :disappointed: // звезда 3д модель function zvezda ( per\_x, per\_y, per\_z) { …

---

## [p5.Vector functions in instance mode with Angular 8](https://discourse.processing.org/t/p5-vector-functions-in-instance-mode-with-angular-8/12415)

<div class="topic-metadata">

**Author:** [@thonpy](https://discourse.processing.org/u/thonpy)\
**Replies:** 10\
**Last updated:** [November 19, 2022, 5:22pm UTC](https://discourse.processing.org/t/p5-vector-functions-in-instance-mode-with-angular-8/12415 "2022-11-19T17:22:04Z")

</div>

I have never used p5 as instance in a web app before and p5.vector functions are not working. All other p5 functions are working, but when I use a datatype from p5 like p5.Vector, the setMag or setLimit functions are not…

---

## [How to solve error: "Error in void"?](https://discourse.processing.org/t/how-to-solve-error-error-in-void/39790)

<div class="topic-metadata">

**Author:** [@nicoos](https://discourse.processing.org/u/nicoos)\
**Replies:** 2\
**Last updated:** [November 19, 2022, 5:37pm UTC](https://discourse.processing.org/t/how-to-solve-error-error-in-void/39790 "2022-11-19T17:37:03Z")

</div>

//Google chrome dinosaurio Dinosaurio d1 = new Dinosaurio void setup(){ //void setup its an error says. size(1080, 720); } void draw() { background(255); d1.display(); }

---

## [Spherical Coordinates and Angle back to Origin?](https://discourse.processing.org/t/spherical-coordinates-and-angle-back-to-origin/39770)

<div class="topic-metadata">

**Author:** [@ASHER](https://discourse.processing.org/u/ASHER)\
**Replies:** 2\
**Last updated:** [November 19, 2022, 12:53pm UTC](https://discourse.processing.org/t/spherical-coordinates-and-angle-back-to-origin/39770 "2022-11-19T12:53:58Z")

</div>

Alright, so I’ve been Googling for several days and cannot figure how to solve what I think is rather simple…? I’ve also searched the forum here and will list at the end some of the links I’ve explored. Context: In 2D I…

---

## [Basic Newbie OSC int and float](https://discourse.processing.org/t/basic-newbie-osc-int-and-float/39758)

<div class="topic-metadata">

**Author:** [@JonnieNightTime](https://discourse.processing.org/u/JonnieNightTime)\
**Replies:** 2\
**Last updated:** [November 19, 2022, 9:08am UTC](https://discourse.processing.org/t/basic-newbie-osc-int-and-float/39758 "2022-11-19T09:08:19Z")

</div>

Dear All, I’m going crazy trying to work this out - it’s gotta be something so obvious, but I’m just not getting there. I have a Lemur template on an ipad sending OSC to my MacBook (see attached image). I want to jump…

---

## [Halftone with custom shape or typography](https://discourse.processing.org/t/halftone-with-custom-shape-or-typography/39767)

<div class="topic-metadata">

**Author:** [@eddg101](https://discourse.processing.org/u/eddg101)\
**Replies:** 2\
**Last updated:** [November 18, 2022, 10:26am UTC](https://discourse.processing.org/t/halftone-with-custom-shape-or-typography/39767 "2022-11-18T10:26:12Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Does anyone know how to create half tone images with custom shapes or an imported shape? Also want to achieve this effect with typography, the …

---

## [Preferences are reset every time when I open Processing](https://discourse.processing.org/t/preferences-are-reset-every-time-when-i-open-processing/36883)

<div class="topic-metadata">

**Author:** [@sugree](https://discourse.processing.org/u/sugree)\
**Replies:** 6\
**Last updated:** [November 18, 2022, 7:04am UTC](https://discourse.processing.org/t/preferences-are-reset-every-time-when-i-open-processing/36883 "2022-11-18T07:04:03Z")

</div>

I’m in Windows 10. Every time I open Processing, all the Settings in the preferences are reset. Has anyone ever seen this before? How should I deal with it?

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

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