# Latest

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

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

**Page:** 292

---

## [AR processing for Android](https://discourse.processing.org/t/ar-processing-for-android/24989)

<div class="topic-metadata">

**Author:** [@Kaykins](https://discourse.processing.org/u/Kaykins)\
**Replies:** 2\
**Last updated:** [October 29, 2020, 10:13am UTC](https://discourse.processing.org/t/ar-processing-for-android/24989 "2020-10-29T10:13:11Z")

</div>

Hello I’m a beginner and I’m trying to follow this tutorial https://android.processing.org/tutorials/ar\_intro/index.html because I want to do the 2d ar image that’s shown at the top of the page. Everything is working …

---

## [Friendly reminder: don't use sketchPath() before setup()!](https://discourse.processing.org/t/friendly-reminder-dont-use-sketchpath-before-setup/24994)

<div class="topic-metadata">

**Author:** [@villares](https://discourse.processing.org/u/villares)\
**Replies:** 0\
**Last updated:** [October 29, 2020, 2:14am UTC](https://discourse.processing.org/t/friendly-reminder-dont-use-sketchpath-before-setup/24994 "2020-10-29T02:14:07Z")

</div>

I always forget this, then I get desperate searching the forums and thinking I must be doing something wrong, and looking at older sketches where it worked just fine, jut to realize this: print(sketchPath('data')) # wr…

---

## [Saving images from the window](https://discourse.processing.org/t/saving-images-from-the-window/24964)

<div class="topic-metadata">

**Author:** [@HumanoidX](https://discourse.processing.org/u/HumanoidX)\
**Replies:** 3\
**Last updated:** [October 29, 2020, 1:38am UTC](https://discourse.processing.org/t/saving-images-from-the-window/24964 "2020-10-29T01:38:10Z")

</div>

My question is, what is the difference between save() and saveFrame()? Which one must I use if I want to save, only the drawings inside the windows, not savijng mouse.

---

## [Planet Generation](https://discourse.processing.org/t/planet-generation/24966)

<div class="topic-metadata">

**Author:** [@HumanoidX](https://discourse.processing.org/u/HumanoidX)\
**Replies:** 2\
**Last updated:** [October 29, 2020, 1:37am UTC](https://discourse.processing.org/t/planet-generation/24966 "2020-10-29T01:37:29Z")

</div>

I’m doing a planet generation program. My code: import peasy.\*; PVector resolution = new PVector(200,200); PVector\[\]\[\] basicGlobe = new PVector\[round(resolution.x) + 1\]\[round(resolution.y) + 1\]; float radius = 400; P…

---

## [Projecting several p5.js sketches sequentially](https://discourse.processing.org/t/projecting-several-p5-js-sketches-sequentially/24991)

<div class="topic-metadata">

**Author:** [@isaacmg](https://discourse.processing.org/u/isaacmg)\
**Replies:** 0\
**Last updated:** [October 29, 2020, 12:30am UTC](https://discourse.processing.org/t/projecting-several-p5-js-sketches-sequentially/24991 "2020-10-29T00:30:27Z")

</div>

I think may be interested projecting several p5.js sketches sequentially. If you want to see the submissions of your students with them as a presentation. I think it is interesting for schools. I created a git repo tryi…

---

## [Getting error message using ml5js with p5js](https://discourse.processing.org/t/getting-error-message-using-ml5js-with-p5js/24980)

<div class="topic-metadata">

**Author:** [@maddyna](https://discourse.processing.org/u/maddyna)\
**Replies:** 1\
**Last updated:** [October 28, 2020, 10:40pm UTC](https://discourse.processing.org/t/getting-error-message-using-ml5js-with-p5js/24980 "2020-10-28T22:40:57Z")

</div>

the errors I got: Uncaught TypeError: Cannot read property ‘split’ of undefined (: line 57) model is loaded Error: Failed to execute ‘texImage2D’ on ‘WebGL2RenderingContext’: The image element contains cross-origin da…

---

## [I need help with my snake game](https://discourse.processing.org/t/i-need-help-with-my-snake-game/24986)

<div class="topic-metadata">

**Author:** [@umar](https://discourse.processing.org/u/umar)\
**Replies:** 2\
**Last updated:** [October 28, 2020, 9:40pm UTC](https://discourse.processing.org/t/i-need-help-with-my-snake-game/24986 "2020-10-28T21:40:33Z")

</div>

but with 16 by 8 blocks window size, where yellow is for banana(+10 points), red is for apple(+5 points) and green block is for cameleon(-5 points). The problem I’m facing is that my fruits are never in the same coordina…

---

## [How to use for loop to draw a 9-sided polygon](https://discourse.processing.org/t/how-to-use-for-loop-to-draw-a-9-sided-polygon/24968)

<div class="topic-metadata">

**Author:** [@mengtong](https://discourse.processing.org/u/mengtong)\
**Replies:** 8\
**Last updated:** [October 28, 2020, 9:42pm UTC](https://discourse.processing.org/t/how-to-use-for-loop-to-draw-a-9-sided-polygon/24968 "2020-10-28T21:42:12Z")

</div>

I am trying to draw a 9-sided polygon, only use for loop, here is my code, but I don’t know what’s wrong with it. int points=9;//9-sided polygon size(600,600);//no setup and draw function float angle=0;//angle start f…

---

## [Avoid click audio](https://discourse.processing.org/t/avoid-click-audio/24961)

<div class="topic-metadata">

**Author:** [@Kompozitorz](https://discourse.processing.org/u/Kompozitorz)\
**Replies:** 5\
**Last updated:** [October 28, 2020, 5:10pm UTC](https://discourse.processing.org/t/avoid-click-audio/24961 "2020-10-28T17:10:57Z")

</div>

Hi! I have create a sketch in which two sound run simultaneously and I can switch between them… the problem is that when I switch between them (using mouse pressed and release) I hear a click. How can I solve the problem…

---

## [Calculate something written in a string](https://discourse.processing.org/t/calculate-something-written-in-a-string/24977)

<div class="topic-metadata">

**Author:** [@NumericPrime](https://discourse.processing.org/u/NumericPrime)\
**Replies:** 2\
**Last updated:** [October 28, 2020, 4:29pm UTC](https://discourse.processing.org/t/calculate-something-written-in-a-string/24977 "2020-10-28T16:29:02Z")

</div>

I’m currently writing a programm to solve equations. I have the following Problem: My equation will be in the form of a string. What I need is some kind of method to do something like. String calculation="5×(4+1\*3)";…

---

## [Processing library equivalent to p5's "Play" library?](https://discourse.processing.org/t/processing-library-equivalent-to-p5s-play-library/24973)

<div class="topic-metadata">

**Author:** [@SheCurvesMobius](https://discourse.processing.org/u/SheCurvesMobius)\
**Replies:** 0\
**Last updated:** [October 28, 2020, 3:23pm UTC](https://discourse.processing.org/t/processing-library-equivalent-to-p5s-play-library/24973 "2020-10-28T15:23:54Z")

</div>

Hi all, I’m wondering if Processing has a library that has similar functionality to p5’s play library? (The Play library contains functions that make collision, sprite animation, and mouse events much, much faster) Tha…

---

## [Force calculation for magnetic pendulum and numerical integration](https://discourse.processing.org/t/force-calculation-for-magnetic-pendulum-and-numerical-integration/24972)

<div class="topic-metadata">

**Author:** [@Eioer](https://discourse.processing.org/u/Eioer)\
**Replies:** 0\
**Last updated:** [October 28, 2020, 3:03pm UTC](https://discourse.processing.org/t/force-calculation-for-magnetic-pendulum-and-numerical-integration/24972 "2020-10-28T15:03:27Z")

</div>

Hello everyone, I’ve been working on a simulation of a magnetic pendulum (Magnetic Pendulum for reference). Now, I have a question concerning how you calculate the forces/acceleration: In examples you find online of th…

---

## [Color Gradient in Stroke](https://discourse.processing.org/t/color-gradient-in-stroke/24910)

<div class="topic-metadata">

**Author:** [@Ladan](https://discourse.processing.org/u/Ladan)\
**Replies:** 4\
**Last updated:** [October 28, 2020, 1:05pm UTC](https://discourse.processing.org/t/color-gradient-in-stroke/24910 "2020-10-28T13:05:46Z")

</div>

Hello! Is there any way, I can make a color gradient in the stroke of a button?

---

## [Help: How can I make this generator pause and resume between random videos?](https://discourse.processing.org/t/help-how-can-i-make-this-generator-pause-and-resume-between-random-videos/24881)

<div class="topic-metadata">

**Author:** [@malani](https://discourse.processing.org/u/malani)\
**Replies:** 4\
**Last updated:** [October 28, 2020, 10:39am UTC](https://discourse.processing.org/t/help-how-can-i-make-this-generator-pause-and-resume-between-random-videos/24881 "2020-10-28T10:39:04Z")

</div>

Hi all! I’m working on a random video generator that imitates TV with the mouseClicked to switch through the “channels”/videos. I am aiming to make it so that even if you aren’t on the “channel”, it still plays in the b…

---

## [Need help with these codes! (array)](https://discourse.processing.org/t/need-help-with-these-codes-array/24940)

<div class="topic-metadata">

**Author:** [@BettyBai](https://discourse.processing.org/u/BettyBai)\
**Replies:** 2\
**Last updated:** [October 28, 2020, 4:59am UTC](https://discourse.processing.org/t/need-help-with-these-codes-array/24940 "2020-10-28T04:59:53Z")

</div>

please format code with \</\> button \* homework policy \* asking questions My teacher is asking us to use Array and for loop functions to draw the same image many times. I tried to create new arrays for different variab…

---

## [Cant get sequence of images to save](https://discourse.processing.org/t/cant-get-sequence-of-images-to-save/24630)

<div class="topic-metadata">

**Author:** [@DeadMusik](https://discourse.processing.org/u/DeadMusik)\
**Replies:** 7\
**Last updated:** [October 28, 2020, 4:26am UTC](https://discourse.processing.org/t/cant-get-sequence-of-images-to-save/24630 "2020-10-28T04:26:07Z")

</div>

Hello, so I picked this code up off the net, its not mine but after doing some tweaks I was trying to get it to save images so I could upload into after effects, can you please tell me where I need to put my if statement…

---

## [Smooothing out Z height with sin()?](https://discourse.processing.org/t/smooothing-out-z-height-with-sin/24959)

<div class="topic-metadata">

**Author:** [@DeadMusik](https://discourse.processing.org/u/DeadMusik)\
**Replies:** 0\
**Last updated:** [October 28, 2020, 3:47am UTC](https://discourse.processing.org/t/smooothing-out-z-height-with-sin/24959 "2020-10-28T03:47:14Z")

</div>

Hello I have a sketch here I got watching the great Dan S. , I altered his Perlin noise terrain with some color now I want to be able to get the terrain to smooth out after going into the more extreme levels of z height.…

---

## [Open-Source Processing Sketchbook](https://discourse.processing.org/t/open-source-processing-sketchbook/24947)

<div class="topic-metadata">

**Author:** [@AdityaRana](https://discourse.processing.org/u/AdityaRana)\
**Replies:** 2\
**Last updated:** [October 28, 2020, 1:24am UTC](https://discourse.processing.org/t/open-source-processing-sketchbook/24947 "2020-10-28T01:24:25Z")

</div>

Hi everone, I am working on an Open-Source Sketchbook written in Processing. If anyone interested in learning processing sketches then contributing in this Sketchbook would be the best move to learn and doing opensource…

---

## [Different Paint tools for color picker](https://discourse.processing.org/t/different-paint-tools-for-color-picker/24931)

<div class="topic-metadata">

**Author:** [@kasper1](https://discourse.processing.org/u/kasper1)\
**Replies:** 6\
**Last updated:** [October 27, 2020, 10:44pm UTC](https://discourse.processing.org/t/different-paint-tools-for-color-picker/24931 "2020-10-27T22:44:02Z")

</div>

Hello everyone I am a beginner and I am trying to make four different drawing tools (one of them is a simple draw tool, i.e. dragging the mouse pointer draws pixels in the selected color; the other three tools could be, …

---

## [Random position of class objects](https://discourse.processing.org/t/random-position-of-class-objects/24950)

<div class="topic-metadata">

**Author:** [@MaxMax](https://discourse.processing.org/u/MaxMax)\
**Replies:** 3\
**Last updated:** [October 27, 2020, 9:13pm UTC](https://discourse.processing.org/t/random-position-of-class-objects/24950 "2020-10-27T21:13:39Z")

</div>

Hi, I managed to make my player ( the car ) collide with the obstacles that are falling down. I tried to make a class so I would be able to make the position, speed, and size of each obstacle random. But it doesn’t work …

---

## [Can we add to the android processing reference?](https://discourse.processing.org/t/can-we-add-to-the-android-processing-reference/24878)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 13\
**Last updated:** [October 27, 2020, 6:11pm UTC](https://discourse.processing.org/t/can-we-add-to-the-android-processing-reference/24878 "2020-10-27T18:11:35Z")

</div>

As the title implies is there any way to submit code to the processing android reference. The current reference is a bit light and I feel it might be good if more examples were added.

---

## [Help with using input values with variables along with if, else if code](https://discourse.processing.org/t/help-with-using-input-values-with-variables-along-with-if-else-if-code/23910)

<div class="topic-metadata">

**Author:** [@DariusKempton](https://discourse.processing.org/u/DariusKempton)\
**Replies:** 29\
**Last updated:** [October 27, 2020, 5:08pm UTC](https://discourse.processing.org/t/help-with-using-input-values-with-variables-along-with-if-else-if-code/23910 "2020-10-27T17:08:03Z")

</div>

//Variables //Character Stat and Detail Variables //Character Details var Character\_Name = \[""\]; var Age = \[""\]; var Alignment = \[""\]; var Religion = \[""\]; var Background = \[""\]; var Hair = \[""\]; …

---

## [Get non sketch active focused window size and position possible?](https://discourse.processing.org/t/get-non-sketch-active-focused-window-size-and-position-possible/24944)

<div class="topic-metadata">

**Author:** [@mrmatthewfelton](https://discourse.processing.org/u/mrmatthewfelton)\
**Replies:** 2\
**Last updated:** [October 27, 2020, 2:25pm UTC](https://discourse.processing.org/t/get-non-sketch-active-focused-window-size-and-position-possible/24944 "2020-10-27T14:25:53Z")

</div>

Hi. I’m super new to processing 3. is it possible to find the the size and position of an active window. by that I mean whatever window is currently the main focused and active window ? just need to know if its possible …

---

## [Shapes unexpectedly overlay other shapes](https://discourse.processing.org/t/shapes-unexpectedly-overlay-other-shapes/24946)

<div class="topic-metadata">

**Author:** [@alt](https://discourse.processing.org/u/alt)\
**Replies:** 13\
**Last updated:** [October 27, 2020, 3:12pm UTC](https://discourse.processing.org/t/shapes-unexpectedly-overlay-other-shapes/24946 "2020-10-27T15:12:25Z")

</div>

So, In my code, The circles sometimes fill up tiles that have been occupied by the Squares. As seen here: The relevant code is as follows function draw() { noStroke(); // These make a sort-of grid to be filled w…

---

## [Web editor version not working in China](https://discourse.processing.org/t/web-editor-version-not-working-in-china/24789)

<div class="topic-metadata">

**Author:** [@lwlsn](https://discourse.processing.org/u/lwlsn)\
**Replies:** 3\
**Last updated:** [October 27, 2020, 2:57pm UTC](https://discourse.processing.org/t/web-editor-version-not-working-in-china/24789 "2020-10-27T14:57:06Z")

</div>

Hi, I’m trying to teach a course using processing. However there is currently issues with accessing the web editor version in China, presumably due to governmental restrictions. Has anyone encountered this and found a …

---

## [Initial state of vector (or array?), I do not understand](https://discourse.processing.org/t/initial-state-of-vector-or-array-i-do-not-understand/24897)

<div class="topic-metadata">

**Author:** [@raboytniksings](https://discourse.processing.org/u/raboytniksings)\
**Replies:** 7\
**Last updated:** [October 26, 2020, 11:33pm UTC](https://discourse.processing.org/t/initial-state-of-vector-or-array-i-do-not-understand/24897 "2020-10-26T23:33:10Z")

</div>

I have just discovered Processing and so far it is extremely addictive and fun! I want to create two “droplets” of points, one near the top and one near the bottom of the visible space, but for some reason I do not unde…

---

## [Minim help for changing speed for Sampler](https://discourse.processing.org/t/minim-help-for-changing-speed-for-sampler/24684)

<div class="topic-metadata">

**Author:** [@justin\_lincoln](https://discourse.processing.org/u/justin_lincoln)\
**Replies:** 2\
**Last updated:** [October 26, 2020, 11:26pm UTC](https://discourse.processing.org/t/minim-help-for-changing-speed-for-sampler/24684 "2020-10-26T23:26:03Z")

</div>

Hi folks, I’ve been trying to build a midiDrum program for a while now. I got the pads to work with AudioSamples but I just switched to using UGens so that I can apply effects and change the speed of the samples. This co…

---

## [How do I change the font that is used by a button in p5?](https://discourse.processing.org/t/how-do-i-change-the-font-that-is-used-by-a-button-in-p5/24887)

<div class="topic-metadata">

**Author:** [@The\_Rogue12](https://discourse.processing.org/u/The_Rogue12)\
**Replies:** 6\
**Last updated:** [October 26, 2020, 11:24pm UTC](https://discourse.processing.org/t/how-do-i-change-the-font-that-is-used-by-a-button-in-p5/24887 "2020-10-26T23:24:15Z")

</div>

I am not sure how I can do this. I have tried all the style() properties that I know, but none of them are able to change the font on a button. Example code I am trying to write: let drawButton; let circle = false; fun…

---

## [Cursor clipping mask](https://discourse.processing.org/t/cursor-clipping-mask/24934)

<div class="topic-metadata">

**Author:** [@pescemc](https://discourse.processing.org/u/pescemc)\
**Replies:** 0\
**Last updated:** [October 26, 2020, 8:44pm UTC](https://discourse.processing.org/t/cursor-clipping-mask/24934 "2020-10-26T20:44:51Z")

</div>

Hello, I need to create a program like the one in the video that I leave below, it is about 2 overlapping images, with a clipping mask in a circular shape handled by the mouse, which shows the outside of one image, and i…

---

## [Help with this Processing / Java syntax](https://discourse.processing.org/t/help-with-this-processing-java-syntax/24922)

<div class="topic-metadata">

**Author:** [@aaronm](https://discourse.processing.org/u/aaronm)\
**Replies:** 6\
**Last updated:** [October 26, 2020, 8:15pm UTC](https://discourse.processing.org/t/help-with-this-processing-java-syntax/24922 "2020-10-26T20:15:00Z")

</div>

Hello, I’m new to Processing and Java. I’m following along with the “Generative Design” book (first edition / Java / Processing version of the book) and I’ve come across some syntax which I’m unsure about. I’m not sure i…

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

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