# Latest

**URL:** https://discourse.processing.org/latest.md?page=258

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

**Page:** 259

---

## [Using p5.js on a jetson nano](https://discourse.processing.org/t/using-p5-js-on-a-jetson-nano/27511)

<div class="topic-metadata">

**Author:** [@skypickle](https://discourse.processing.org/u/skypickle)\
**Replies:** 0\
**Last updated:** [January 31, 2021, 9:31pm UTC](https://discourse.processing.org/t/using-p5-js-on-a-jetson-nano/27511 "2021-01-31T21:31:09Z")

</div>

P5js is a javascript library that enables media presentation, interactive drawing as well as user input in an area of a web page defined as the CANVAS. https://p5js.org/ I’ve gotten it to work with the jetson nano sinc…

---

## [How do I merge shapes that have a stroke?](https://discourse.processing.org/t/how-do-i-merge-shapes-that-have-a-stroke/27493)

<div class="topic-metadata">

**Author:** [@thesuperdaine](https://discourse.processing.org/u/thesuperdaine)\
**Replies:** 6\
**Last updated:** [January 31, 2021, 9:13pm UTC](https://discourse.processing.org/t/how-do-i-merge-shapes-that-have-a-stroke/27493 "2021-01-31T21:13:18Z")

</div>

I need this ear to be flush with the head. I want to merge it with the head like how you can merge shapes in Inkscape or Illustrator. I can’t do this by just making everything one shape using vertices and beginShape() an…

---

## [Code on events is not executed always how to fix?](https://discourse.processing.org/t/code-on-events-is-not-executed-always-how-to-fix/27504)

<div class="topic-metadata">

**Author:** [@dimpapadop](https://discourse.processing.org/u/dimpapadop)\
**Replies:** 1\
**Last updated:** [January 31, 2021, 8:37pm UTC](https://discourse.processing.org/t/code-on-events-is-not-executed-always-how-to-fix/27504 "2021-01-31T20:37:51Z")

</div>

i have some code inside void oscEvent(OscMessage theOscMessage) event that resizes sketch size with surface eg. pg.beginDraw(); pg.background(0, 0, 0, 0); pg.endDraw(); oldW = int(displ…

---

## [Game of Life Implementation Bug](https://discourse.processing.org/t/game-of-life-implementation-bug/27495)

<div class="topic-metadata">

**Author:** [@rikitiki](https://discourse.processing.org/u/rikitiki)\
**Replies:** 5\
**Last updated:** [January 31, 2021, 8:26pm UTC](https://discourse.processing.org/t/game-of-life-implementation-bug/27495 "2021-01-31T20:26:48Z")

</div>

Hi, I’m trying to implement Life and I’ve written a class that should work, but I guess I’m missing something. I’ve followed all of the rules set forth in the book Cellular Automata Machines by Toffoli and Margolus. I …

---

## [How to make a simple bar?](https://discourse.processing.org/t/how-to-make-a-simple-bar/27500)

<div class="topic-metadata">

**Author:** [@SNICKRS](https://discourse.processing.org/u/SNICKRS)\
**Replies:** 3\
**Last updated:** [January 31, 2021, 8:14pm UTC](https://discourse.processing.org/t/how-to-make-a-simple-bar/27500 "2021-01-31T20:14:51Z")

</div>

I want to make a simple bar that fills up when the value is positive, and the bar goes down when the value is negative. The only thing is, that when the value is at 0 it should be half filled. I have tried implenting thi…

---

## [Edit text box Processing for Android](https://discourse.processing.org/t/edit-text-box-processing-for-android/15833)

<div class="topic-metadata">

**Author:** [@noel](https://discourse.processing.org/u/noel)\
**Replies:** 3\
**Last updated:** [January 31, 2021, 7:02pm UTC](https://discourse.processing.org/t/edit-text-box-processing-for-android/15833 "2021-01-31T19:02:20Z")

</div>

Another utility for your Android’s Processing sketch based on Alert Dialog. It can be handy to write a file name to be saved or changing a variable. Please comment if any error. import android.content.DialogInterface; …

---

## [Box stroke width](https://discourse.processing.org/t/box-stroke-width/27436)

<div class="topic-metadata">

**Author:** [@yasboy](https://discourse.processing.org/u/yasboy)\
**Replies:** 6\
**Last updated:** [January 31, 2021, 2:17pm UTC](https://discourse.processing.org/t/box-stroke-width/27436 "2021-01-31T14:17:59Z")

</div>

Hello, I’ve just started learning how to use p5.js in a 3D environment. I made a simple array of boxes with different heights (here’s the code, it is very simple https://editor.p5js.org/ybenbihi/sketches/F05toan8W) Ho…

---

## [How can I turn an image in PNG or SVG format into a ring shape?](https://discourse.processing.org/t/how-can-i-turn-an-image-in-png-or-svg-format-into-a-ring-shape/27479)

<div class="topic-metadata">

**Author:** [@Violet](https://discourse.processing.org/u/Violet)\
**Replies:** 11\
**Last updated:** [January 31, 2021, 10:59am UTC](https://discourse.processing.org/t/how-can-i-turn-an-image-in-png-or-svg-format-into-a-ring-shape/27479 "2021-01-31T10:59:57Z")

</div>

I want to use processing to complete the following effect, which is to copy a picture and deform it to make it ring.But I don’t know how to turn the image into a fan shape. The general method of operation should be as…

---

## [getChild() not displaying anything](https://discourse.processing.org/t/getchild-not-displaying-anything/25858)

<div class="topic-metadata">

**Author:** [@Ruchi](https://discourse.processing.org/u/Ruchi)\
**Replies:** 7\
**Last updated:** [January 31, 2021, 10:38am UTC](https://discourse.processing.org/t/getchild-not-displaying-anything/25858 "2021-01-31T10:38:28Z")

</div>

import processing.svg.\*; PShape s; float reso, dLen; int counter = 0; void setup() { size(800, 800); reso = width; dLen =sqrt(pow(reso, 2)+pow(reso, 2)); shapeMode(CENTER); beginRecord(SVG, "DL-"+nf(counter, 3…

---

## [Sound frequency label](https://discourse.processing.org/t/sound-frequency-label/27456)

<div class="topic-metadata">

**Author:** [@jafal](https://discourse.processing.org/u/jafal)\
**Replies:** 1\
**Last updated:** [January 31, 2021, 7:34am UTC](https://discourse.processing.org/t/sound-frequency-label/27456 "2021-01-31T07:34:19Z")

</div>

hi how to set frequency values to each peak in sound library example /\*\* \* Inspect the frequency spectrum of different simple oscillators. \*/ import processing.sound.\*; // All oscillators are instances of the Oscil…

---

## [Playing different videos from mouse coordinates?](https://discourse.processing.org/t/playing-different-videos-from-mouse-coordinates/27492)

<div class="topic-metadata">

**Author:** [@lauren](https://discourse.processing.org/u/lauren)\
**Replies:** 1\
**Last updated:** [January 31, 2021, 12:26am UTC](https://discourse.processing.org/t/playing-different-videos-from-mouse-coordinates/27492 "2021-01-31T00:26:06Z")

</div>

Hi! I’m new to processing. I’m trying to make a program to play different videos depending upon the mouse coordinates. So open up a blank window, then if the mouse coordinates are between these sets of numbers, play vide…

---

## [How do I pass a function by reference and then call it?](https://discourse.processing.org/t/how-do-i-pass-a-function-by-reference-and-then-call-it/27474)

<div class="topic-metadata">

**Author:** [@thesuperdaine](https://discourse.processing.org/u/thesuperdaine)\
**Replies:** 7\
**Last updated:** [January 30, 2021, 10:46pm UTC](https://discourse.processing.org/t/how-do-i-pass-a-function-by-reference-and-then-call-it/27474 "2021-01-30T22:46:41Z")

</div>

I’m making a character animation engine and I want to make this animation class that lets me specify a function to call and 2 sets of arguments and then it uses lerp() to transition overtime using setInterval() between t…

---

## [BlendMode Documentation?](https://discourse.processing.org/t/blendmode-documentation/27451)

<div class="topic-metadata">

**Author:** [@tinywitchdraws](https://discourse.processing.org/u/tinywitchdraws)\
**Replies:** 2\
**Last updated:** [January 30, 2021, 9:27pm UTC](https://discourse.processing.org/t/blendmode-documentation/27451 "2021-01-30T21:27:36Z")

</div>

Hi, I’m working on a little project that plays with blend modes, and I’ve kind of gotten to the point where I’ll need to know the specific math that p5js uses for their blend modes (ie. MULTIPLY=A\*B, LIGHTEST=max(A,B) et…

---

## [APDE heap size,how to change allocated memory size?](https://discourse.processing.org/t/apde-heap-size-how-to-change-allocated-memory-size/27333)

<div class="topic-metadata">

**Author:** [@Kvi](https://discourse.processing.org/u/Kvi)\
**Replies:** 6\
**Last updated:** [January 30, 2021, 7:39pm UTC](https://discourse.processing.org/t/apde-heap-size-how-to-change-allocated-memory-size/27333 "2021-01-30T19:39:42Z")

</div>

Hi I my tying to make simple game,but have a trouble with java.lang.OutOfMemoryError. My sketch by default (without any P2D,P3D) uses about 40 000 000 bytes,but i have 4gb ram and need minimum 100mb,when i am using P2D…

---

## [Processing and JOGL - How are concave polygons and borders rendered?](https://discourse.processing.org/t/processing-and-jogl-how-are-concave-polygons-and-borders-rendered/27485)

<div class="topic-metadata">

**Author:** [@r.jaoui](https://discourse.processing.org/u/r.jaoui)\
**Replies:** 1\
**Last updated:** [January 30, 2021, 6:42pm UTC](https://discourse.processing.org/t/processing-and-jogl-how-are-concave-polygons-and-borders-rendered/27485 "2021-01-30T18:42:53Z")

</div>

Hello ! First of all, sorry for this post that is not really about Processing coding but about how processing itself is coded, and the JOGL library. I’ve recently started working in OpenGL for a project, and I’m faced …

---

## [Using Arduino for timer and using 2 readstringuntill](https://discourse.processing.org/t/using-arduino-for-timer-and-using-2-readstringuntill/27469)

<div class="topic-metadata">

**Author:** [@saaqib.m](https://discourse.processing.org/u/saaqib.m)\
**Replies:** 1\
**Last updated:** [January 30, 2021, 10:38am UTC](https://discourse.processing.org/t/using-arduino-for-timer-and-using-2-readstringuntill/27469 "2021-01-30T10:38:51Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hi, in my code I am trying to implement a sampling rate to sample the incoming data from my Arduino. Right now, my Arduino code has a timer of …

---

## [Condition and interruption problems for a newbie](https://discourse.processing.org/t/condition-and-interruption-problems-for-a-newbie/27467)

<div class="topic-metadata">

**Author:** [@freddukas](https://discourse.processing.org/u/freddukas)\
**Replies:** 4\
**Last updated:** [January 29, 2021, 8:24pm UTC](https://discourse.processing.org/t/condition-and-interruption-problems-for-a-newbie/27467 "2021-01-29T20:24:44Z")

</div>

Hello everyone thanks for the add.I’m totally newbie to Processing & I tried to create my first code who works as a magic trick. I have several conditions in my code in order to help me to guess a number within the seve…

---

## [Table print columnName as 1 row](https://discourse.processing.org/t/table-print-columnname-as-1-row/27465)

<div class="topic-metadata">

**Author:** [@ren](https://discourse.processing.org/u/ren)\
**Replies:** 1\
**Last updated:** [January 29, 2021, 5:14pm UTC](https://discourse.processing.org/t/table-print-columnname-as-1-row/27465 "2021-01-29T17:14:01Z")

</div>

How can I first print out on a single line all of my table’s column name of my table like this: X Y Z 8 15.99 Oxygen Table table; table = new Table(); table.addColumn("X"); tabl…

---

## [How can I test with a function whether another function is being executed?](https://discourse.processing.org/t/how-can-i-test-with-a-function-whether-another-function-is-being-executed/27460)

<div class="topic-metadata">

**Author:** [@Flolo](https://discourse.processing.org/u/Flolo)\
**Replies:** 1\
**Last updated:** [January 29, 2021, 4:47pm UTC](https://discourse.processing.org/t/how-can-i-test-with-a-function-whether-another-function-is-being-executed/27460 "2021-01-29T16:47:23Z")

</div>

Hi I want the mousePressed () function to be executed whenever the mousePressed function is executed by the parent without having to write it into the function of the parent … I hope you can help me :slight\_smile: clas…

---

## [Extend p5.js function](https://discourse.processing.org/t/extend-p5-js-function/27441)

<div class="topic-metadata">

**Author:** [@jeffthompson](https://discourse.processing.org/u/jeffthompson)\
**Replies:** 3\
**Last updated:** [January 29, 2021, 2:28pm UTC](https://discourse.processing.org/t/extend-p5-js-function/27441 "2021-01-29T14:28:04Z")

</div>

I’d like to be able to extend the functionality of built-in p5.js functions, keeping the same name but adding some additional code. I don’t want to create my own version of p5.js, since maintaining that will be a pain. I…

---

## [Why doesn't an object return a random() value?](https://discourse.processing.org/t/why-doesnt-an-object-return-a-random-value/27448)

<div class="topic-metadata">

**Author:** [@vettefreak](https://discourse.processing.org/u/vettefreak)\
**Replies:** 8\
**Last updated:** [January 29, 2021, 12:35pm UTC](https://discourse.processing.org/t/why-doesnt-an-object-return-a-random-value/27448 "2021-01-29T12:35:23Z")

</div>

const randomizer = { "rgb1": random(0, 255), } draw = () =\> { let y = random(0, height); let x = random(0, width); noStroke(); fill(randomizer\["rgb1"\], randomizer\["rgb1"\], randomizer\["rgb1"\]); e…

---

## [Community challenge - Compact programs!](https://discourse.processing.org/t/community-challenge-compact-programs/27455)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 1\
**Last updated:** [January 29, 2021, 10:35am UTC](https://discourse.processing.org/t/community-challenge-compact-programs/27455 "2021-01-29T10:35:33Z")

</div>

Compact code challenge Hi! I’ve always been obsessed with shortening the code. Even if it becomes unreadable. It was always fun trying to make the code as short as possible! So I decided to create this post. In this po…

---

## [Pls help me with my homework](https://discourse.processing.org/t/pls-help-me-with-my-homework/27439)

<div class="topic-metadata">

**Author:** [@campervi](https://discourse.processing.org/u/campervi)\
**Replies:** 2\
**Last updated:** [January 29, 2021, 9:40am UTC](https://discourse.processing.org/t/pls-help-me-with-my-homework/27439 "2021-01-29T09:40:34Z")

</div>

Please help me with my homework. No.1 -Size 500 x 500 -Background: White -Rectangle start: x = 10, y = 30 -Rectangle size 40 horizontal and 30 vertical -Use width / height variables -Color: Make gradiation occur I…

---

## [Identify / Understand a Function in a Code](https://discourse.processing.org/t/identify-understand-a-function-in-a-code/27450)

<div class="topic-metadata">

**Author:** [@maneschka](https://discourse.processing.org/u/maneschka)\
**Replies:** 2\
**Last updated:** [January 29, 2021, 2:14am UTC](https://discourse.processing.org/t/identify-understand-a-function-in-a-code/27450 "2021-01-29T02:14:17Z")

</div>

Hi! I found this code in OpenProcessing and I want to change some of its functions, I have been trying to understand the code but I simply cant. So, what I’m trying to do, is that instead of manipulating the mesh with t…

---

## [Adding a random value to each item in array?](https://discourse.processing.org/t/adding-a-random-value-to-each-item-in-array/27430)

<div class="topic-metadata">

**Author:** [@Marinus](https://discourse.processing.org/u/Marinus)\
**Replies:** 3\
**Last updated:** [January 29, 2021, 1:16am UTC](https://discourse.processing.org/t/adding-a-random-value-to-each-item-in-array/27430 "2021-01-29T01:16:57Z")

</div>

Hello, I am trying to achieve a loop that runs through an array with 120 values for sin and a second array that runs through 120 values for cos. Every time the loop runs I want to add a random number to the previous valu…

---

## [Help with Arduino and processing connection](https://discourse.processing.org/t/help-with-arduino-and-processing-connection/27422)

<div class="topic-metadata">

**Author:** [@TiBasic](https://discourse.processing.org/u/TiBasic)\
**Replies:** 5\
**Last updated:** [January 28, 2021, 9:49pm UTC](https://discourse.processing.org/t/help-with-arduino-and-processing-connection/27422 "2021-01-28T21:49:58Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I’m trying to connect a processing program to arduino. It’s for a heart sensor. It works great except that the processing code can repeat the ar…

---

## [What codecs are supported by the Video library?](https://discourse.processing.org/t/what-codecs-are-supported-by-the-video-library/27442)

<div class="topic-metadata">

**Author:** [@esc746](https://discourse.processing.org/u/esc746)\
**Replies:** 0\
**Last updated:** [January 28, 2021, 7:29pm UTC](https://discourse.processing.org/t/what-codecs-are-supported-by-the-video-library/27442 "2021-01-28T19:29:56Z")

</div>

Seems strange to me the documentation for the Video library doesn’t mention what codecs are supported. The first three files I have tried do not load. Also: Which would be the optimal codec if I was to pre-process video…

---

## [Video not playing in repl.it but is playing on other platforms](https://discourse.processing.org/t/video-not-playing-in-repl-it-but-is-playing-on-other-platforms/27414)

<div class="topic-metadata">

**Author:** [@SheCurvesMobius](https://discourse.processing.org/u/SheCurvesMobius)\
**Replies:** 11\
**Last updated:** [January 28, 2021, 7:11pm UTC](https://discourse.processing.org/t/video-not-playing-in-repl-it-but-is-playing-on-other-platforms/27414 "2021-01-28T19:11:10Z")

</div>

Hi all, Does anyone have any insight as to why my code does not work on repl.it but it does work on OpenProcessing .org and on the p5.js web editor? Here’s the code: var vid; function setup() { createCanvas(0, 0); …

---

## [Sinusoidal wave made out of dots](https://discourse.processing.org/t/sinusoidal-wave-made-out-of-dots/27368)

<div class="topic-metadata">

**Author:** [@Pastaz](https://discourse.processing.org/u/Pastaz)\
**Replies:** 12\
**Last updated:** [January 28, 2021, 3:18pm UTC](https://discourse.processing.org/t/sinusoidal-wave-made-out-of-dots/27368 "2021-01-28T15:18:17Z")

</div>

Hello, I’m stuck on a code for an output of a sinusoidal wave made out of single dots, i’m looking for a solution without using vertexCurve(). Please have a look at the image below for a better explanation: …

---

## [Pid dc motor position control](https://discourse.processing.org/t/pid-dc-motor-position-control/27304)

<div class="topic-metadata">

**Author:** [@r0x15](https://discourse.processing.org/u/r0x15)\
**Replies:** 1\
**Last updated:** [January 28, 2021, 2:44pm UTC](https://discourse.processing.org/t/pid-dc-motor-position-control/27304 "2021-01-28T14:44:38Z")

</div>

Good evening I would need to check the position of an engine via android (mobile phone) everything is managed by arduino uno, with a motor driver, an encoder and dc motor connected, the code should have a text box wher…

[Previous page](https://discourse.processing.org/latest.md?page=257)

[Next page](https://discourse.processing.org/latest.md?page=259)
