# Latest

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

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

**Page:** 550

---

## [Hue with specific colors](https://discourse.processing.org/t/hue-with-specific-colors/6297)

<div class="topic-metadata">

**Author:** [@Missmew72](https://discourse.processing.org/u/Missmew72)\
**Replies:** 5\
**Last updated:** [December 7, 2018, 12:50am UTC](https://discourse.processing.org/t/hue-with-specific-colors/6297 "2018-12-07T00:50:30Z")

</div>

Hi, so I’m working on a school project and basically I want the option for hue in the background. I am able to get a horizontal hue with all the colours, but I was hoping to do a vertical hue with a specific set of colou…

---

## [Re-initilizing instance of p5.js](https://discourse.processing.org/t/re-initilizing-instance-of-p5-js/6384)

<div class="topic-metadata">

**Author:** [@ffd8](https://discourse.processing.org/u/ffd8)\
**Replies:** 4\
**Last updated:** [December 7, 2018, 12:31am UTC](https://discourse.processing.org/t/re-initilizing-instance-of-p5-js/6384 "2018-12-07T00:31:05Z")

</div>

I’m working on a special use of p5.js, for hot-swapping sketches – this involves dynamically embedding a script with a new setup()/draw() which overrides the initial one. It’s working quite well, however I run into two m…

---

## [ArrayList causing an IndexOutOfBoundsException](https://discourse.processing.org/t/arraylist-causing-an-indexoutofboundsexception/6247)

<div class="topic-metadata">

**Author:** [@CyberneticSquid](https://discourse.processing.org/u/CyberneticSquid)\
**Replies:** 2\
**Last updated:** [December 7, 2018, 12:09am UTC](https://discourse.processing.org/t/arraylist-causing-an-indexoutofboundsexception/6247 "2018-12-07T00:09:35Z")

</div>

I’m making a basic “Life” game, where larger circles eat smaller ones, and I keep getting a seemingly random IndexOutOfBoundsException. This is the section of code that causes the error: for (int i = beings.size() - …

---

## [How do I make a second level on processing.py](https://discourse.processing.org/t/how-do-i-make-a-second-level-on-processing-py/6244)

<div class="topic-metadata">

**Author:** [@dashmc](https://discourse.processing.org/u/dashmc)\
**Replies:** 1\
**Last updated:** [December 6, 2018, 11:48pm UTC](https://discourse.processing.org/t/how-do-i-make-a-second-level-on-processing-py/6244 "2018-12-06T23:48:11Z")

</div>

Here is my code so far. Level two is not activating when I need it to. Any ideas? Pls help global cWidth global cHeight cWidth=600 cHeight=600 level1 = True level2 = False class character(object): def \_\_init\_\_(self)…

---

## [Generating a live Jpeg from random numbers](https://discourse.processing.org/t/generating-a-live-jpeg-from-random-numbers/6066)

<div class="topic-metadata">

**Author:** [@glegassick](https://discourse.processing.org/u/glegassick)\
**Replies:** 5\
**Last updated:** [December 6, 2018, 10:17pm UTC](https://discourse.processing.org/t/generating-a-live-jpeg-from-random-numbers/6066 "2018-12-06T22:17:32Z")

</div>

Hi, I am new to the community and new to Processing and have a project in mind that I would like to tackle in order to learn. I would like to generate a “live” jpeg image from random number inputs. I am aware that the …

---

## [Trying to find the easiest way to export custom maps](https://discourse.processing.org/t/trying-to-find-the-easiest-way-to-export-custom-maps/6329)

<div class="topic-metadata">

**Author:** [@quorumetrix](https://discourse.processing.org/u/quorumetrix)\
**Replies:** 4\
**Last updated:** [December 6, 2018, 9:45pm UTC](https://discourse.processing.org/t/trying-to-find-the-easiest-way-to-export-custom-maps/6329 "2018-12-06T21:45:22Z")

</div>

Hi all, Long-time Processing user, but new to the forum. I’m wondering if someone can give me a suggestion of the best way to accomplish this. I am visualizing a series of GPS coordinates, spanning a large part of the…

---

## [Objects becoming children of other objects. How do I make them completely separate?](https://discourse.processing.org/t/objects-becoming-children-of-other-objects-how-do-i-make-them-completely-separate/6346)

<div class="topic-metadata">

**Author:** [@castaway](https://discourse.processing.org/u/castaway)\
**Replies:** 2\
**Last updated:** [December 6, 2018, 9:13pm UTC](https://discourse.processing.org/t/objects-becoming-children-of-other-objects-how-do-i-make-them-completely-separate/6346 "2018-12-06T21:13:29Z")

</div>

Greetings, I am trying to create a small animation where squares scale down at different speeds from different positions to eventually stop at a specific size and create a mosaic made of several squares. I wrote differe…

---

## [Load with loadStrings() a text file saved with saveStrings()?](https://discourse.processing.org/t/load-with-loadstrings-a-text-file-saved-with-savestrings/6009)

<div class="topic-metadata">

**Author:** [@Laurent](https://discourse.processing.org/u/Laurent)\
**Replies:** 11\
**Last updated:** [December 6, 2018, 8:42pm UTC](https://discourse.processing.org/t/load-with-loadstrings-a-text-file-saved-with-savestrings/6009 "2018-12-06T20:42:37Z")

</div>

Hi everyone. I’d like to write two demonstration codes for my students that makes the following operations: #1 save a list of strings into a text file with saveStrings() #2 open this text file and read/transfer the sav…

---

## [Setting limit of random colours](https://discourse.processing.org/t/setting-limit-of-random-colours/6051)

<div class="topic-metadata">

**Author:** [@CowPieForever](https://discourse.processing.org/u/CowPieForever)\
**Replies:** 5\
**Last updated:** [December 6, 2018, 8:21pm UTC](https://discourse.processing.org/t/setting-limit-of-random-colours/6051 "2018-12-06T20:21:07Z")

</div>

So I have written that, when drawing a shape, the stroke and fill are random colours: stroke(random(255),random(255),random(255)); fill(random(255),random(255),random(255)); So if I wanted to set the colours to be rand…

---

## [Assign a Value to Every Element in an Array?](https://discourse.processing.org/t/assign-a-value-to-every-element-in-an-array/6381)

<div class="topic-metadata">

**Author:** [@Fixinit1](https://discourse.processing.org/u/Fixinit1)\
**Replies:** 3\
**Last updated:** [December 6, 2018, 7:51pm UTC](https://discourse.processing.org/t/assign-a-value-to-every-element-in-an-array/6381 "2018-12-06T19:51:58Z")

</div>

Can someone tell me how I could assign a value to every element in an array with a single line of code? Is it even possible? Right now i have this, yposi\[0\] = 0; yposi\[1\] = 0; yposi\[2\] = 0; yposi\[3\] = 0; yposi\[4\] = …

---

## [Hola :) soy nuevo](https://discourse.processing.org/t/hola-soy-nuevo/5982)

<div class="topic-metadata">

**Author:** [@Gargantia](https://discourse.processing.org/u/Gargantia)\
**Replies:** 1\
**Last updated:** [December 6, 2018, 6:45pm UTC](https://discourse.processing.org/t/hola-soy-nuevo/5982 "2018-12-06T18:45:23Z")

</div>

Hola mucho gusto :slight\_smile:!!! soy nuevo en este foro y apenas empece en el mundo de Processing espero que nos llevemos bien

---

## [Multiple draggable images (drags once and locks)](https://discourse.processing.org/t/multiple-draggable-images-drags-once-and-locks/6001)

<div class="topic-metadata">

**Author:** [@HelaRua](https://discourse.processing.org/u/HelaRua)\
**Replies:** 6\
**Last updated:** [December 6, 2018, 5:20pm UTC](https://discourse.processing.org/t/multiple-draggable-images-drags-once-and-locks/6001 "2018-12-06T17:20:53Z")

</div>

Hello! I’ve got many images—over 30—and want to drag each one of them independently across the canvas. Once you move one of the images, by releasing it becomes locked at current mouseX and Y coordinates and can’t be mov…

---

## [Help on adding Color Collision to my game](https://discourse.processing.org/t/help-on-adding-color-collision-to-my-game/6358)

<div class="topic-metadata">

**Author:** [@Catbreath1](https://discourse.processing.org/u/Catbreath1)\
**Replies:** 2\
**Last updated:** [December 6, 2018, 2:49pm UTC](https://discourse.processing.org/t/help-on-adding-color-collision-to-my-game/6358 "2018-12-06T14:49:35Z")

</div>

Hey, so I am somewhat new to coding, and I have began to create a game out of what I knew. The game is pretty much like the Chrome dino jump game, but simplified for now as I make the base code. So far, I have all I need…

---

## [Mirror effect by mouse movement](https://discourse.processing.org/t/mirror-effect-by-mouse-movement/6363)

<div class="topic-metadata">

**Author:** [@AnisZo](https://discourse.processing.org/u/AnisZo)\
**Replies:** 3\
**Last updated:** [December 6, 2018, 1:51pm UTC](https://discourse.processing.org/t/mirror-effect-by-mouse-movement/6363 "2018-12-06T13:51:30Z")

</div>

Hi, guys, I have a question how can I mirror my mouse event? At the moment I have a growing lightningbolt while moving my mouse and I need it mirrored now. Here is the code int width = 250; int height = 250; //angl…

---

## [How to dynamically resize GTextField?](https://discourse.processing.org/t/how-to-dynamically-resize-gtextfield/6353)

<div class="topic-metadata">

**Author:** [@notcatfish2017](https://discourse.processing.org/u/notcatfish2017)\
**Replies:** 1\
**Last updated:** [December 6, 2018, 12:24pm UTC](https://discourse.processing.org/t/how-to-dynamically-resize-gtextfield/6353 "2018-12-06T12:24:44Z")

</div>

Hi, I’m using the G4P library and I’m trying to create a text field that will automatically resize when the user enters more and more text. However, I am unable to find a setWidth() method, is there any other way that I…

---

## [How do I make a ball continuously bounce on one platform?](https://discourse.processing.org/t/how-do-i-make-a-ball-continuously-bounce-on-one-platform/6355)

<div class="topic-metadata">

**Author:** [@irukandjijelly](https://discourse.processing.org/u/irukandjijelly)\
**Replies:** 2\
**Last updated:** [December 6, 2018, 9:45am UTC](https://discourse.processing.org/t/how-do-i-make-a-ball-continuously-bounce-on-one-platform/6355 "2018-12-06T09:45:13Z")

</div>

This is my code. What can I do to make the ball up and down on one platform. Right now when the right key is pressed, it goes straight up. int y=770; int back=20; int dir=20; int level=3; void setup(){ size(700,80…

---

## [Help with creating the correct functions for my ATM](https://discourse.processing.org/t/help-with-creating-the-correct-functions-for-my-atm/6337)

<div class="topic-metadata">

**Author:** [@Sventhepuffin](https://discourse.processing.org/u/Sventhepuffin)\
**Replies:** 9\
**Last updated:** [December 6, 2018, 7:08am UTC](https://discourse.processing.org/t/help-with-creating-the-correct-functions-for-my-atm/6337 "2018-12-06T07:08:06Z")

</div>

I know it is sloppy or most likely not done correct, i’m not very good at this but i’m still trying. I have been able to assign each numbered button to display its corresponding number but when it comes to creating the f…

---

## [(saving sounds on magnetometer values) Problems updating PVector Arrays](https://discourse.processing.org/t/saving-sounds-on-magnetometer-values-problems-updating-pvector-arrays/6356)

<div class="topic-metadata">

**Author:** [@doordewar](https://discourse.processing.org/u/doordewar)\
**Replies:** 0\
**Last updated:** [December 5, 2018, 11:45pm UTC](https://discourse.processing.org/t/saving-sounds-on-magnetometer-values-problems-updating-pvector-arrays/6356 "2018-12-05T23:45:24Z")

</div>

Currently I am making an android app where you can save soundfragments on positions in 3d space (trigger files on certain magnet values(x,y,z)). Started with a working version where I didnt use arrays at all, but that go…

---

## [I'm trying to convert a fractal tree program from processing to p5js](https://discourse.processing.org/t/im-trying-to-convert-a-fractal-tree-program-from-processing-to-p5js/6336)

<div class="topic-metadata">

**Author:** [@Sunnylimenoid](https://discourse.processing.org/u/Sunnylimenoid)\
**Replies:** 3\
**Last updated:** [December 5, 2018, 10:55pm UTC](https://discourse.processing.org/t/im-trying-to-convert-a-fractal-tree-program-from-processing-to-p5js/6336 "2018-12-05T22:55:41Z")

</div>

Hello, I’m quite new to both processing and p5.js. I am experimenting with this demo on the processing site https://processing.org/examples/tree.html. I got it working in processing and want to publish it on my blog, but…

---

## [Parallel Array for ripple effect/rain drop](https://discourse.processing.org/t/parallel-array-for-ripple-effect-rain-drop/6268)

<div class="topic-metadata">

**Author:** [@James](https://discourse.processing.org/u/James)\
**Replies:** 1\
**Last updated:** [December 5, 2018, 9:13pm UTC](https://discourse.processing.org/t/parallel-array-for-ripple-effect-rain-drop/6268 "2018-12-05T21:13:55Z")

</div>

Hello guys and gals, I’m trying to make something really weird and kinda stupid (ripple effect/rain drop effect). I’m trying to make a partial full array that can hold up to 1000 x & y cords pair. For me to do that I wi…

---

## [Connecting Xbee and processing and reading remote data](https://discourse.processing.org/t/connecting-xbee-and-processing-and-reading-remote-data/6349)

<div class="topic-metadata">

**Author:** [@stevenette](https://discourse.processing.org/u/stevenette)\
**Replies:** 0\
**Last updated:** [December 5, 2018, 9:05pm UTC](https://discourse.processing.org/t/connecting-xbee-and-processing-and-reading-remote-data/6349 "2018-12-05T21:05:55Z")

</div>

Hello, I am currently using processing, hooked up to a arduino Uno with an Xbee shield and an Xbee to top it all off. This setup is reading a mesh network of other xbee radios out there, and processing the data. What I …

---

## [Help with interfaces](https://discourse.processing.org/t/help-with-interfaces/6272)

<div class="topic-metadata">

**Author:** [@dcravens](https://discourse.processing.org/u/dcravens)\
**Replies:** 1\
**Last updated:** [December 5, 2018, 9:00pm UTC](https://discourse.processing.org/t/help-with-interfaces/6272 "2018-12-05T21:00:13Z")

</div>

I am a beginning coder trying to understand the best way to organize my code using inheritance, composition, and interfaces in a program that models a simple ecosystem. I apologize in advance for not knowing how word m…

---

## [How do I load multiple JSON urls?](https://discourse.processing.org/t/how-do-i-load-multiple-json-urls/6150)

<div class="topic-metadata">

**Author:** [@salazarspanish](https://discourse.processing.org/u/salazarspanish)\
**Replies:** 15\
**Last updated:** [December 5, 2018, 6:45pm UTC](https://discourse.processing.org/t/how-do-i-load-multiple-json-urls/6150 "2018-12-05T18:45:47Z")

</div>

Hello! I was able to load one JSON url from Yahoo Weather, but now I am having trouble loading multiple urls. I tried searching my question on stack overflow, but the posts I found mentioned one JSON url, not several. Al…

---

## [Trying to use modelX() but built a spiral galaxy of points](https://discourse.processing.org/t/trying-to-use-modelx-but-built-a-spiral-galaxy-of-points/6064)

<div class="topic-metadata">

**Author:** [@HackinHarry](https://discourse.processing.org/u/HackinHarry)\
**Replies:** 26\
**Last updated:** [December 5, 2018, 6:18pm UTC](https://discourse.processing.org/t/trying-to-use-modelx-but-built-a-spiral-galaxy-of-points/6064 "2018-12-05T18:18:16Z")

</div>

I’m trying to use modelX() and modelY() to capture transformed coordinate values of a shape. I’ve cut the code down from 600 lines to 200 some by using processing’s built in functions rather than struggle with writing …

---

## [Trouble with variable as text on screen](https://discourse.processing.org/t/trouble-with-variable-as-text-on-screen/6333)

<div class="topic-metadata">

**Author:** [@Banansplitt](https://discourse.processing.org/u/Banansplitt)\
**Replies:** 1\
**Last updated:** [December 5, 2018, 5:36pm UTC](https://discourse.processing.org/t/trouble-with-variable-as-text-on-screen/6333 "2018-12-05T17:36:05Z")

</div>

I am showing text in a window but instead of showing my number it just shows “Humidity: null%” Here is my code: import processing.serial.\*; Serial myPort; // Create object from Serial class String val; // Data re…

---

## [Need help from converting this p5.js/JavaScript program to Processing](https://discourse.processing.org/t/need-help-from-converting-this-p5-js-javascript-program-to-processing/6287)

<div class="topic-metadata">

**Author:** [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Replies:** 5\
**Last updated:** [December 5, 2018, 2:20pm UTC](https://discourse.processing.org/t/need-help-from-converting-this-p5-js-javascript-program-to-processing/6287 "2018-12-05T14:20:58Z")

</div>

I want to do this same exact thing and needed help converting this p5.js program to processing code. I’m not sure how to do that. Any suggestions? Or if anyone knows where I can find a simpler fireworks example that I ca…

---

## [Help needed with Leap Motion and live capture](https://discourse.processing.org/t/help-needed-with-leap-motion-and-live-capture/6323)

<div class="topic-metadata">

**Author:** [@saskia\_NL](https://discourse.processing.org/u/saskia_NL)\
**Replies:** 0\
**Last updated:** [December 5, 2018, 11:30am UTC](https://discourse.processing.org/t/help-needed-with-leap-motion-and-live-capture/6323 "2018-12-05T11:30:21Z")

</div>

Hi all! Can someone help me with this code? I’m trying to use the Leap Motion control the movement of the “scan beam” on the screen. It works when I use the mouseX as a input, but now I want it to use te X position from…

---

## [Trying to get animation to stop](https://discourse.processing.org/t/trying-to-get-animation-to-stop/6282)

<div class="topic-metadata">

**Author:** [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Replies:** 11\
**Last updated:** [December 5, 2018, 12:21pm UTC](https://discourse.processing.org/t/trying-to-get-animation-to-stop/6282 "2018-12-05T12:21:48Z")

</div>

have two tabs here, one is the sketch and the other is Star. I’m trying to have the starfield in the background to only be there half way into the song. After the songs are played halfway, I want to have a different anim…

---

## [How to distribuite a value unequally?](https://discourse.processing.org/t/how-to-distribuite-a-value-unequally/6104)

<div class="topic-metadata">

**Author:** [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Replies:** 18\
**Last updated:** [December 5, 2018, 12:08pm UTC](https://discourse.processing.org/t/how-to-distribuite-a-value-unequally/6104 "2018-12-05T12:08:01Z")

</div>

Hey, so distributing a value equally is just 50/5 = 5 Times a 10 value, But i Would Need a result of something like {15, 5, 20, 7, 3}. Now, i technically know how to do this in Code, But it‘s not very efficient, so i was…

---

## [Last click and keeping the image](https://discourse.processing.org/t/last-click-and-keeping-the-image/6317)

<div class="topic-metadata">

**Author:** [@Missmew72](https://discourse.processing.org/u/Missmew72)\
**Replies:** 6\
**Last updated:** [December 5, 2018, 11:27am UTC](https://discourse.processing.org/t/last-click-and-keeping-the-image/6317 "2018-12-05T11:27:49Z")

</div>

So I have a series of clicks setup, each click replaces the last image with the next one. When I get to the last image, I want it to stay even if there is an accidental click afterwards. Is there a way to do this?

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

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