# Latest

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

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

**Page:** 269

---

## [Can someone create two loops out of this code?](https://discourse.processing.org/t/can-someone-create-two-loops-out-of-this-code/26760)

<div class="topic-metadata">

**Author:** [@popin](https://discourse.processing.org/u/popin)\
**Replies:** 1\
**Last updated:** [January 4, 2021, 6:50am UTC](https://discourse.processing.org/t/can-someone-create-two-loops-out-of-this-code/26760 "2021-01-04T06:50:06Z")

</div>

Hey guys, is it possible to create two loops out of this code? thank you! color\[\] colors = { #654321, #A0522D, #000000, #8B4513, #64190D, #00FF00 }; int circleX, circleY; int circle1X, circle1Y; int circle2X,…

---

## [Processing Download Issue MacOS](https://discourse.processing.org/t/processing-download-issue-macos/26735)

<div class="topic-metadata">

**Author:** [@kefournier1](https://discourse.processing.org/u/kefournier1)\
**Replies:** 2\
**Last updated:** [January 4, 2021, 2:22am UTC](https://discourse.processing.org/t/processing-download-issue-macos/26735 "2021-01-04T02:22:17Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hi everyone - I am a high school teacher in the midst of some lesson planning that uses Processing and suddenly I am no longer able to open the …

---

## [Transition from one vector array to another](https://discourse.processing.org/t/transition-from-one-vector-array-to-another/26728)

<div class="topic-metadata">

**Author:** [@fbrie002](https://discourse.processing.org/u/fbrie002)\
**Replies:** 5\
**Last updated:** [January 4, 2021, 1:36am UTC](https://discourse.processing.org/t/transition-from-one-vector-array-to-another/26728 "2021-01-04T01:36:13Z")

</div>

Hi, I’m trying to create a smooth transition from one array of numbers to another but the numbers in question are all floating point numbers between 1 and -1, most of which below 0, so it’s been tricky. The arrays in que…

---

## [Main canvas and createGraphics() off screen canvas not matching](https://discourse.processing.org/t/main-canvas-and-creategraphics-off-screen-canvas-not-matching/26706)

<div class="topic-metadata">

**Author:** [@hansi95](https://discourse.processing.org/u/hansi95)\
**Replies:** 3\
**Last updated:** [January 4, 2021, 12:55am UTC](https://discourse.processing.org/t/main-canvas-and-creategraphics-off-screen-canvas-not-matching/26706 "2021-01-04T00:55:55Z")

</div>

Hey everyone! Here’s the image I’m talking about (https://imgur.com/ZzCpEca) You can see the particles on my exported canvas are not in the same place as the main canvas. Seems like they start in different positions or s…

---

## [My sketch is smooth until i zoom in (drop to 15fps)](https://discourse.processing.org/t/my-sketch-is-smooth-until-i-zoom-in-drop-to-15fps/26714)

<div class="topic-metadata">

**Author:** [@WillG](https://discourse.processing.org/u/WillG)\
**Replies:** 3\
**Last updated:** [January 3, 2021, 11:38pm UTC](https://discourse.processing.org/t/my-sketch-is-smooth-until-i-zoom-in-drop-to-15fps/26714 "2021-01-03T23:38:03Z")

</div>

Hello there, for a school project, i’ve created a map with bus point and density at these bus point. Everything works fine except the frame rate when i zoom in with the slider. But i can’t remove it cause the teacher wa…

---

## [Can someone comment this code?](https://discourse.processing.org/t/can-someone-comment-this-code/26716)

<div class="topic-metadata">

**Author:** [@popin](https://discourse.processing.org/u/popin)\
**Replies:** 14\
**Last updated:** [January 3, 2021, 10:17pm UTC](https://discourse.processing.org/t/can-someone-comment-this-code/26716 "2021-01-03T22:17:22Z")

</div>

Hey can you comment this code? i dont understand please void draw () { pushMatrix(); fill(0); translate(130, 40); //adjust position for (int k = 0; k \< myLetters.length; ++k) { for (int i = 0; i \< 4; i++) {//clarte…

---

## [Properties in the Composite Objects EggRing Example](https://discourse.processing.org/t/properties-in-the-composite-objects-eggring-example/26678)

<div class="topic-metadata">

**Author:** [@javagar](https://discourse.processing.org/u/javagar)\
**Replies:** 6\
**Last updated:** [January 3, 2021, 9:15pm UTC](https://discourse.processing.org/t/properties-in-the-composite-objects-eggring-example/26678 "2021-01-03T21:15:46Z")

</div>

This concerns the p5.js class EggRing example that is accessible through the Processing Development Environment menu via File \> Examples… \> Objects \> ex05\_Composite\_Objects. It can also be found online here: Composite…

---

## [Appending to two dimensional array](https://discourse.processing.org/t/appending-to-two-dimensional-array/26736)

<div class="topic-metadata">

**Author:** [@dave307](https://discourse.processing.org/u/dave307)\
**Replies:** 4\
**Last updated:** [January 3, 2021, 7:45pm UTC](https://discourse.processing.org/t/appending-to-two-dimensional-array/26736 "2021-01-03T19:45:43Z")

</div>

How would you append to a two array and append to a certain rows. like a = \[1,2,3\] b = \[5,6\] then you append a to the first column and b to the second column of another array so it would be c = \[1,2,3\] \[5,6\] hope…

---

## [Draw code frame by frame](https://discourse.processing.org/t/draw-code-frame-by-frame/26687)

<div class="topic-metadata">

**Author:** [@Sophie](https://discourse.processing.org/u/Sophie)\
**Replies:** 7\
**Last updated:** [January 3, 2021, 6:39pm UTC](https://discourse.processing.org/t/draw-code-frame-by-frame/26687 "2021-01-03T18:39:12Z")

</div>

Hello, I am new to Processing and need help with a problem. I need the code in draw not to be played completely over and over again, but frame by frame. The background should change his color according to the first char…

---

## [Can't load API data](https://discourse.processing.org/t/cant-load-api-data/26722)

<div class="topic-metadata">

**Author:** [@Chudroy](https://discourse.processing.org/u/Chudroy)\
**Replies:** 2\
**Last updated:** [January 3, 2021, 4:03pm UTC](https://discourse.processing.org/t/cant-load-api-data/26722 "2021-01-03T16:03:43Z")

</div>

function setup() { createCanvas(400, 400); var url = "http://api.openweathermap.org/data/2.5/weather?q=London&appid=\_\_\_\_\_\_&units=metric" loadJSON(url); } Hi! When I try to load JSON data from this weather API, …

---

## [Updating drawing with codemirror contents](https://discourse.processing.org/t/updating-drawing-with-codemirror-contents/26695)

<div class="topic-metadata">

**Author:** [@kutal](https://discourse.processing.org/u/kutal)\
**Replies:** 1\
**Last updated:** [January 3, 2021, 4:00pm UTC](https://discourse.processing.org/t/updating-drawing-with-codemirror-contents/26695 "2021-01-03T16:00:47Z")

</div>

Hi all, Problem statement I am struggling to understand how to pass the contents of a codemirror editor (when it’s updated manually on screen, by deleting or add new code) to a p5.js instance, on a button click. In ot…

---

## [GUI builder will close because the GUI found was created with an earlier version, Help, I don't want to build again](https://discourse.processing.org/t/gui-builder-will-close-because-the-gui-found-was-created-with-an-earlier-version-help-i-dont-want-to-build-again/26711)

<div class="topic-metadata">

**Author:** [@laptophead](https://discourse.processing.org/u/laptophead)\
**Replies:** 1\
**Last updated:** [January 3, 2021, 3:56pm UTC](https://discourse.processing.org/t/gui-builder-will-close-because-the-gui-found-was-created-with-an-earlier-version-help-i-dont-want-to-build-again/26711 "2021-01-03T15:56:33Z")

</div>

Peter, I have this sketch that I didn’t touch in an year, and now it won’t let me edit. Please tell me I don’t have to make it again… over 20 buttons and data… Thanks Mitch I am running the 4.4.1 now. Don’t know …

---

## [About processing for android](https://discourse.processing.org/t/about-processing-for-android/26565)

<div class="topic-metadata">

**Author:** [@Bhavya22](https://discourse.processing.org/u/Bhavya22)\
**Replies:** 16\
**Last updated:** [January 3, 2021, 2:51pm UTC](https://discourse.processing.org/t/about-processing-for-android/26565 "2021-01-03T14:51:22Z")

</div>

Hii to everyone,I am Bhavya Jain 2nd year student at IIT(ISM),Dhanbad I am an intermediate android developer(good front end developer). Since i made all my projects in android X I have an keen interest for processing fo…

---

## [Geologic cross section with a rule](https://discourse.processing.org/t/geologic-cross-section-with-a-rule/26679)

<div class="topic-metadata">

**Author:** [@Huno](https://discourse.processing.org/u/Huno)\
**Replies:** 1\
**Last updated:** [January 2, 2021, 11:24pm UTC](https://discourse.processing.org/t/geologic-cross-section-with-a-rule/26679 "2021-01-02T23:24:48Z")

</div>

Hello! I’ve trying to make a geologic cross section for a while but I have not even had any idea on how to start. My goal is to do this 2d random graphic based on a simple rule. the idea is to: Draw a line Divide tha…

---

## [Image transitions with pixel array in p5.js](https://discourse.processing.org/t/image-transitions-with-pixel-array-in-p5-js/26696)

<div class="topic-metadata">

**Author:** [@fbrie002](https://discourse.processing.org/u/fbrie002)\
**Replies:** 4\
**Last updated:** [January 2, 2021, 11:12pm UTC](https://discourse.processing.org/t/image-transitions-with-pixel-array-in-p5-js/26696 "2021-01-02T23:12:44Z")

</div>

Is it possible to animate a transition between two images in p5? This should be so simple but I can’t find any examples on how to do it. I looked into using createGraphics and an offscreen buffer but apparently it does…

---

## [Help me. Please. (Image and color)](https://discourse.processing.org/t/help-me-please-image-and-color/26674)

<div class="topic-metadata">

**Author:** [@salvofx](https://discourse.processing.org/u/salvofx)\
**Replies:** 4\
**Last updated:** [January 2, 2021, 10:23pm UTC](https://discourse.processing.org/t/help-me-please-image-and-color/26674 "2021-01-02T22:23:26Z")

</div>

Hello everyone, I am a newbie in Processing! I have to submit a project very soon for the final exam at university but i don’t know how i can do this. Could someone help me? Taking any image, I should be able to creat…

---

## [New 3D FPS game engine!](https://discourse.processing.org/t/new-3d-fps-game-engine/26683)

<div class="topic-metadata">

**Author:** [@BennyHacker](https://discourse.processing.org/u/BennyHacker)\
**Replies:** 3\
**Last updated:** [January 2, 2021, 4:35pm UTC](https://discourse.processing.org/t/new-3d-fps-game-engine/26683 "2021-01-02T16:35:39Z")

</div>

Hello forum and Happy New Year!!! :partying\_face: :partying\_face: :partying\_face: Check out this new game engine I’ve made! And feel free to utilize the code in any way you please!

---

## [Help with mousePressed or keyPressed](https://discourse.processing.org/t/help-with-mousepressed-or-keypressed/26689)

<div class="topic-metadata">

**Author:** [@PIlw](https://discourse.processing.org/u/PIlw)\
**Replies:** 3\
**Last updated:** [January 2, 2021, 4:43pm UTC](https://discourse.processing.org/t/help-with-mousepressed-or-keypressed/26689 "2021-01-02T16:43:34Z")

</div>

Hello guys, I need help to make this code into mouse pressed or keypressed so I want that the code appears only if I press the mouse or a key as you want but if someone could help me it would be amazing ! class bug { …

---

## [Combine 2 codes](https://discourse.processing.org/t/combine-2-codes/26671)

<div class="topic-metadata">

**Author:** [@PIlw](https://discourse.processing.org/u/PIlw)\
**Replies:** 4\
**Last updated:** [January 2, 2021, 3:34pm UTC](https://discourse.processing.org/t/combine-2-codes/26671 "2021-01-02T15:34:35Z")

</div>

Hello guys, I’ve a question : The thing is that I have 2 codes and I want to combine them like this ; the basic code would be the image of DVD mooving across the screen and then put a mousePressed line so when we press …

---

## [How to access variables from PApplet (2nd window) in default window?](https://discourse.processing.org/t/how-to-access-variables-from-papplet-2nd-window-in-default-window/26670)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 2\
**Last updated:** [January 2, 2021, 10:44am UTC](https://discourse.processing.org/t/how-to-access-variables-from-papplet-2nd-window-in-default-window/26670 "2021-01-02T10:44:21Z")

</div>

Hi! I recently saw someone’s code which allowed for 2 windows. I tried to adapt one of my programs to it but it didn’t work too well. I know I can just declare them at the beginning and be done with it, but is there a w…

---

## [Color two side of a custom shape](https://discourse.processing.org/t/color-two-side-of-a-custom-shape/26676)

<div class="topic-metadata">

**Author:** [@sarath.jasrin](https://discourse.processing.org/u/sarath.jasrin)\
**Replies:** 2\
**Last updated:** [January 2, 2021, 6:39am UTC](https://discourse.processing.org/t/color-two-side-of-a-custom-shape/26676 "2021-01-02T06:39:01Z")

</div>

How I can use two colors for two sides (top,inner) of a custom shape.

---

## [Can not read property of undefined?](https://discourse.processing.org/t/can-not-read-property-of-undefined/26684)

<div class="topic-metadata">

**Author:** [@olaf000olaf](https://discourse.processing.org/u/olaf000olaf)\
**Replies:** 2\
**Last updated:** [January 2, 2021, 6:00am UTC](https://discourse.processing.org/t/can-not-read-property-of-undefined/26684 "2021-01-02T06:00:21Z")

</div>

I don’t understand why can’t the value in the array be pushed, my maths seems right. The program chooses groups of 9 pixels and checks the contrast, and if it’s higher than 100 it draws a circle in that area. How do I fi…

---

## [Finding vector pointing "down" on 2d plane](https://discourse.processing.org/t/finding-vector-pointing-down-on-2d-plane/26567)

<div class="topic-metadata">

**Author:** [@arcadeperfect](https://discourse.processing.org/u/arcadeperfect)\
**Replies:** 2\
**Last updated:** [January 2, 2021, 3:23am UTC](https://discourse.processing.org/t/finding-vector-pointing-down-on-2d-plane/26567 "2021-01-02T03:23:26Z")

</div>

I guess this is more math than Processing per se but here goes… The 2D plane exists in 3D space and can rotate in any direction about the origin (from gyro data). How can I find the vector shown in blue that always poi…

---

## [Convert from HSB to RGB](https://discourse.processing.org/t/convert-from-hsb-to-rgb/26672)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 4\
**Last updated:** [January 1, 2021, 7:40pm UTC](https://discourse.processing.org/t/convert-from-hsb-to-rgb/26672 "2021-01-01T19:40:48Z")

</div>

Hi! Can someone send me a function that converts HSB input into RGB? (color formats, RGB = red, green, blue, HSB = hue, saturation, brightness (or Value if it is HSV)) preferred format: color toRGB(int h, int s, int b…

---

## [2 for loops inside a String function](https://discourse.processing.org/t/2-for-loops-inside-a-string-function/26669)

<div class="topic-metadata">

**Author:** [@JoLi](https://discourse.processing.org/u/JoLi)\
**Replies:** 4\
**Last updated:** [January 1, 2021, 4:54pm UTC](https://discourse.processing.org/t/2-for-loops-inside-a-string-function/26669 "2021-01-01T16:54:57Z")

</div>

why is this not working? yea, I know I dont need that boolean finished in the beginning

---

## [Can everyone Help me?](https://discourse.processing.org/t/can-everyone-help-me/26661)

<div class="topic-metadata">

**Author:** [@Rogo](https://discourse.processing.org/u/Rogo)\
**Replies:** 13\
**Last updated:** [January 1, 2021, 3:37pm UTC](https://discourse.processing.org/t/can-everyone-help-me/26661 "2021-01-01T15:37:47Z")

</div>

Pls Help me i become a Error java.lang.ArraylndexOutOfBoundsException: length=16; index=16 int numFrames = 16; // The number of frames in the animation int frame = 17; PImage\[\] images = new PImage\[numFrames\]; int j= ye…

---

## [How to give circles(ellipses) certain distance, apart from each other? giving random position every time I press key](https://discourse.processing.org/t/how-to-give-circles-ellipses-certain-distance-apart-from-each-other-giving-random-position-every-time-i-press-key/26646)

<div class="topic-metadata">

**Author:** [@yewon](https://discourse.processing.org/u/yewon)\
**Replies:** 10\
**Last updated:** [January 1, 2021, 2:01pm UTC](https://discourse.processing.org/t/how-to-give-circles-ellipses-certain-distance-apart-from-each-other-giving-random-position-every-time-i-press-key/26646 "2021-01-01T14:01:53Z")

</div>

Hi. what I want to do is, Every time I press key, I want to reposition my object inside screen, but each of my object should be apart from each other by certain distance. for example at least the distance should be lar…

---

## [Why multiple windows can't show sketch correctly?](https://discourse.processing.org/t/why-multiple-windows-cant-show-sketch-correctly/26659)

<div class="topic-metadata">

**Author:** [@IpNeNaEcRe](https://discourse.processing.org/u/IpNeNaEcRe)\
**Replies:** 2\
**Last updated:** [January 1, 2021, 7:43am UTC](https://discourse.processing.org/t/why-multiple-windows-cant-show-sketch-correctly/26659 "2021-01-01T07:43:21Z")

</div>

I want to create multiple windows, one to interact (put slide bar in it) and other to show the sketch. Now I can draw line/rectangle/ellipse directly in the second window. When these things in another class and use the c…

---

## [Interacting with images](https://discourse.processing.org/t/interacting-with-images/26648)

<div class="topic-metadata">

**Author:** [@PIlw](https://discourse.processing.org/u/PIlw)\
**Replies:** 2\
**Last updated:** [December 31, 2020, 11:09pm UTC](https://discourse.processing.org/t/interacting-with-images/26648 "2020-12-31T23:09:32Z")

</div>

Hello guys, I am a beginner on processing and i would like to do something : The thing would be to have 2 images mooving across the screen and when they touch eachother they hit and change directions. for the moment I’…

---

## [Can't activate the flash after entering multi tasking](https://discourse.processing.org/t/cant-activate-the-flash-after-entering-multi-tasking/26658)

<div class="topic-metadata">

**Author:** [@Luca1017](https://discourse.processing.org/u/Luca1017)\
**Replies:** 0\
**Last updated:** [December 31, 2020, 8:17pm UTC](https://discourse.processing.org/t/cant-activate-the-flash-after-entering-multi-tasking/26658 "2020-12-31T20:17:18Z")

</div>

I made this simple code for activating and deactivating the flash of the phone and it’s working fine, but when i go in the multi tasking and then i re-enter in the app (without closing it) I can’t manage to re-activate t…

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

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