# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?page=222

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

**Page:** 223

---

## [Difficulty trying to maintain lighting on a wall](https://discourse.processing.org/t/difficulty-trying-to-maintain-lighting-on-a-wall/19253)

<div class="topic-metadata">

**Author:** [@fchavat](https://discourse.processing.org/u/fchavat)\
**Replies:** 2\
**Last updated:** [April 5, 2020, 10:00pm UTC](https://discourse.processing.org/t/difficulty-trying-to-maintain-lighting-on-a-wall/19253 "2020-04-05T22:00:00Z")

</div>

Hello!, I’m trying to simulate a moving wall and I have a ‘pointLight’ lighting from the position of the camera (approximately). The problem I’m having is that when the wall moves, the lighting starts to get darker (ev…

---

## [Difficulty having two balls bounce against eachother without clipping](https://discourse.processing.org/t/difficulty-having-two-balls-bounce-against-eachother-without-clipping/19445)

<div class="topic-metadata">

**Author:** [@worm888](https://discourse.processing.org/u/worm888)\
**Replies:** 1\
**Last updated:** [April 5, 2020, 9:17pm UTC](https://discourse.processing.org/t/difficulty-having-two-balls-bounce-against-eachother-without-clipping/19445 "2020-04-05T21:17:43Z")

</div>

planangle = new PVector(location.x-plan.location.x, location.y-plan.location.y); // if (-90\<velocity.heading() && velocity.heading()\<90) { // planangle.rotate(PI); //} if (dist(location.x, location.y, plan.location.x, pl…

---

## [How do you turn an ellipse into a button and when clicked it would show the data on the same screen?](https://discourse.processing.org/t/how-do-you-turn-an-ellipse-into-a-button-and-when-clicked-it-would-show-the-data-on-the-same-screen/19366)

<div class="topic-metadata">

**Author:** [@Stage1](https://discourse.processing.org/u/Stage1)\
**Replies:** 13\
**Last updated:** [April 5, 2020, 8:49pm UTC](https://discourse.processing.org/t/how-do-you-turn-an-ellipse-into-a-button-and-when-clicked-it-would-show-the-data-on-the-same-screen/19366 "2020-04-05T20:49:49Z")

</div>

Hello, im trying to figure out how i can turn my ellipse shapes to show some form of data but first it would need to be turned into a button. For example when you click the shape it should show the text next to it on the…

---

## [Building application that uses image files](https://discourse.processing.org/t/building-application-that-uses-image-files/19444)

<div class="topic-metadata">

**Author:** [@Nino](https://discourse.processing.org/u/Nino)\
**Replies:** 2\
**Last updated:** [April 5, 2020, 8:29pm UTC](https://discourse.processing.org/t/building-application-that-uses-image-files/19444 "2020-04-05T20:29:50Z")

</div>

So I’m making a small game that uses images located in the folder of the processing files. In the editor it runs without any issues. however when i build it for Windows the aplication starts but is blank. Nothing is show…

---

## [New to code, need help please!](https://discourse.processing.org/t/new-to-code-need-help-please/19202)

<div class="topic-metadata">

**Author:** [@cakiru](https://discourse.processing.org/u/cakiru)\
**Replies:** 3\
**Last updated:** [April 5, 2020, 7:37pm UTC](https://discourse.processing.org/t/new-to-code-need-help-please/19202 "2020-04-05T19:37:37Z")

</div>

if you could help me , im trying to make a loop rotate by clicking

---

## [Get array to loop images](https://discourse.processing.org/t/get-array-to-loop-images/19435)

<div class="topic-metadata">

**Author:** [@Banana132](https://discourse.processing.org/u/Banana132)\
**Replies:** 2\
**Last updated:** [April 5, 2020, 6:39pm UTC](https://discourse.processing.org/t/get-array-to-loop-images/19435 "2020-04-05T18:39:06Z")

</div>

Hi ther, So im trying to get an array of images to loop however, i have set up the array and loops correctly, however it only shows one image where as i need it to loop and then stop at the last image. //explosion imag…

---

## [Image processing based on mouse position and different window size](https://discourse.processing.org/t/image-processing-based-on-mouse-position-and-different-window-size/19201)

<div class="topic-metadata">

**Author:** [@alex119](https://discourse.processing.org/u/alex119)\
**Replies:** 1\
**Last updated:** [April 5, 2020, 6:05pm UTC](https://discourse.processing.org/t/image-processing-based-on-mouse-position-and-different-window-size/19201 "2020-04-05T18:05:56Z")

</div>

Hell everyone, I am completely new to processing and I’m following the tutorials series. I am at “Images and pixels” tutorial and I made the “Adjusting image brightness” exercise which is based on mouse position. My qu…

---

## [Program that runs in background but can be reopened](https://discourse.processing.org/t/program-that-runs-in-background-but-can-be-reopened/19180)

<div class="topic-metadata">

**Author:** [@FinleyOderSo](https://discourse.processing.org/u/FinleyOderSo)\
**Replies:** 1\
**Last updated:** [April 5, 2020, 5:57pm UTC](https://discourse.processing.org/t/program-that-runs-in-background-but-can-be-reopened/19180 "2020-04-05T17:57:52Z")

</div>

Hi, I want to create a program that runs in background but can be reopened (getting back the visual appearance) via this menu: I hope you understand what I mean. But I don’t even know how such programs are called so…

---

## [How to add multiple waves and different colours?](https://discourse.processing.org/t/how-to-add-multiple-waves-and-different-colours/19169)

<div class="topic-metadata">

**Author:** [@firetryer](https://discourse.processing.org/u/firetryer)\
**Replies:** 0\
**Last updated:** [March 30, 2020, 7:27am UTC](https://discourse.processing.org/t/how-to-add-multiple-waves-and-different-colours/19169 "2020-03-30T07:27:28Z")

</div>

import processing.sound.\*; SoundFile song; int n; Circle\[\] ellipse; float ty = 0; float noiseScale = 0.02; void setup() { size(400,400); song = new SoundFile(this, "kgf.mp3"); song.loop(); n =100; ellip…

---

## [Looking for tricks](https://discourse.processing.org/t/looking-for-tricks/19394)

<div class="topic-metadata">

**Author:** [@Helron](https://discourse.processing.org/u/Helron)\
**Replies:** 6\
**Last updated:** [April 5, 2020, 3:28pm UTC](https://discourse.processing.org/t/looking-for-tricks/19394 "2020-04-05T15:28:57Z")

</div>

Hello, I am looking for tips and tricks … more than exemples that i can find… does it exist a collection of solutions for common develloppement need ? Ex : Buttons : imgcoord + mouse click or P5 library or distance to…

---

## [Datatype for color](https://discourse.processing.org/t/datatype-for-color/19427)

<div class="topic-metadata">

**Author:** [@hartelius](https://discourse.processing.org/u/hartelius)\
**Replies:** 1\
**Last updated:** [April 5, 2020, 11:43am UTC](https://discourse.processing.org/t/datatype-for-color/19427 "2020-04-05T11:43:42Z")

</div>

Why does this print FF000000 and not 000000? color setC = color(0, 0, 0); println(hex(setC));

---

## [Print Ordered Numbers in Program](https://discourse.processing.org/t/print-ordered-numbers-in-program/19386)

<div class="topic-metadata">

**Author:** [@TeaTea](https://discourse.processing.org/u/TeaTea)\
**Replies:** 3\
**Last updated:** [April 5, 2020, 10:06am UTC](https://discourse.processing.org/t/print-ordered-numbers-in-program/19386 "2020-04-05T10:06:09Z")

</div>

hello anyone who reads this :smile: i’m new to coding, i am trying to create things to practice coding, so i went to this page : http://www.beginwithjava.com/java/loops/questions.html because i saw that in processing,…

---

## [How can I start filePlayer from a given second? - New and going bananas](https://discourse.processing.org/t/how-can-i-start-fileplayer-from-a-given-second-new-and-going-bananas/19403)

<div class="topic-metadata">

**Author:** [@goingbananas](https://discourse.processing.org/u/goingbananas)\
**Replies:** 13\
**Last updated:** [April 5, 2020, 12:26am UTC](https://discourse.processing.org/t/how-can-i-start-fileplayer-from-a-given-second-new-and-going-bananas/19403 "2020-04-05T00:26:19Z")

</div>

Hi, so I’m very very new to processing and minim and I’m trying to get a filePlayer to start playing from a given second/millisecond. This is the code part where I’m calling the file to play: void mousePressed(){ if(mou…

---

## [Sprites library pp\_collision()](https://discourse.processing.org/t/sprites-library-pp-collision/19411)

<div class="topic-metadata">

**Author:** [@Odermonicon](https://discourse.processing.org/u/Odermonicon)\
**Replies:** 0\
**Last updated:** [April 5, 2020, 12:14am UTC](https://discourse.processing.org/t/sprites-library-pp-collision/19411 "2020-04-05T00:14:24Z")

</div>

pixel perfect collision is acting up right now, plz help. Codeimport sprites.\*; import sprites.maths.\*; import sprites.utils.\*; final double gravity = 20; float scale; Sprite level; Sprite player; Vector2D center; int s…

---

## [Modifying a grid](https://discourse.processing.org/t/modifying-a-grid/19298)

<div class="topic-metadata">

**Author:** [@senior](https://discourse.processing.org/u/senior)\
**Replies:** 7\
**Last updated:** [April 4, 2020, 7:15pm UTC](https://discourse.processing.org/t/modifying-a-grid/19298 "2020-04-04T19:15:14Z")

</div>

I am using processing connected to an Arduino with a sensor sheet. The output is a in java mode showing a mapped grid as shown in the attached image. I am wondering how I can curve the corners of the grid so that is in 3…

---

## [Shader shows as white instead of the actual shader (Not applied correctly)](https://discourse.processing.org/t/shader-shows-as-white-instead-of-the-actual-shader-not-applied-correctly/19393)

<div class="topic-metadata">

**Author:** [@gbrochar](https://discourse.processing.org/u/gbrochar)\
**Replies:** 0\
**Last updated:** [April 4, 2020, 3:37pm UTC](https://discourse.processing.org/t/shader-shows-as-white-instead-of-the-actual-shader-not-applied-correctly/19393 "2020-04-04T15:37:22Z")

</div>

Hello, I programmed a little shader using C++ OpenGL to compile and run it today and I’m doing an numerical art exhibition using mainly processing, I want to use this shader in the show and thus have to make the shader w…

---

## [Rotating objects inside the canvas](https://discourse.processing.org/t/rotating-objects-inside-the-canvas/19387)

<div class="topic-metadata">

**Author:** [@eltrem](https://discourse.processing.org/u/eltrem)\
**Replies:** 3\
**Last updated:** [April 4, 2020, 3:44pm UTC](https://discourse.processing.org/t/rotating-objects-inside-the-canvas/19387 "2020-04-04T15:44:04Z")

</div>

I’m missuderstanding the combination of translate(), rotate(), pushmatrix() and popmatrix(); In the example, I’m trying to rotate the sinus functions after translating the matrix to its origin, but obviosuly there’s ma…

---

## [How could I make p5 work in a cartesian coordinate system?](https://discourse.processing.org/t/how-could-i-make-p5-work-in-a-cartesian-coordinate-system/19376)

<div class="topic-metadata">

**Author:** [@Night-11010](https://discourse.processing.org/u/Night-11010)\
**Replies:** 5\
**Last updated:** [April 4, 2020, 1:55pm UTC](https://discourse.processing.org/t/how-could-i-make-p5-work-in-a-cartesian-coordinate-system/19376 "2020-04-04T13:55:41Z")

</div>

I kind of get what I want but I still have problems using mouseX and mouseY, they don’t work propertly when I try to change it.

---

## [Green NullPointerExeption](https://discourse.processing.org/t/green-nullpointerexeption/19377)

<div class="topic-metadata">

**Author:** [@Odermonicon](https://discourse.processing.org/u/Odermonicon)\
**Replies:** 8\
**Last updated:** [April 4, 2020, 4:14am UTC](https://discourse.processing.org/t/green-nullpointerexeption/19377 "2020-04-04T04:14:32Z")

</div>

MCVEimport Green.\*; class ExampleActor extends Actor { public ExampleActor(float x, float y, int w, int h) { super(x, y, w, h); // Line causing error } public void act(float deltaTime) { } } ExampleActor …

---

## [Self made class, not returning when it a loop?](https://discourse.processing.org/t/self-made-class-not-returning-when-it-a-loop/19220)

<div class="topic-metadata">

**Author:** [@Aldiery](https://discourse.processing.org/u/Aldiery)\
**Replies:** 2\
**Last updated:** [April 4, 2020, 2:04am UTC](https://discourse.processing.org/t/self-made-class-not-returning-when-it-a-loop/19220 "2020-04-04T02:04:36Z")

</div>

Ship findShip(int\[\] coordinates){ for (int i = 0; i \< ships.size();i++){ Ship ship = ships.get(i); int shipX = ship.x; int shipY = ship.y; for (int tile = 0; tile \< ship.size; tile++){ if (ship.ro…

---

## [Trying Curve on a Sphere. Can't seem to get the rise and fall of the curve right](https://discourse.processing.org/t/trying-curve-on-a-sphere-cant-seem-to-get-the-rise-and-fall-of-the-curve-right/19355)

<div class="topic-metadata">

**Author:** [@Samizen](https://discourse.processing.org/u/Samizen)\
**Replies:** 5\
**Last updated:** [April 4, 2020, 1:19am UTC](https://discourse.processing.org/t/trying-curve-on-a-sphere-cant-seem-to-get-the-rise-and-fall-of-the-curve-right/19355 "2020-04-04T01:19:55Z")

</div>

Was trying something like this: But my curves were all wrong…And I ended up with something like this. The code is inserted below: float angle; float r = 200; Table table; PImage earth; PShape globe; int rowCoun…

---

## [Convert Latitude and Longitude from a Data sheet to points on canvas](https://discourse.processing.org/t/convert-latitude-and-longitude-from-a-data-sheet-to-points-on-canvas/19160)

<div class="topic-metadata">

**Author:** [@daileydrabble](https://discourse.processing.org/u/daileydrabble)\
**Replies:** 4\
**Last updated:** [April 3, 2020, 8:17pm UTC](https://discourse.processing.org/t/convert-latitude-and-longitude-from-a-data-sheet-to-points-on-canvas/19160 "2020-04-03T20:17:59Z")

</div>

Hi, I’m having an issue in my beginning coding class. I want to take the latitude and longitude for cave locations in Missouri and put them over an image of the state where they are. I have an excel sheet with the latitu…

---

## [My personal Processing trap](https://discourse.processing.org/t/my-personal-processing-trap/18985)

<div class="topic-metadata">

**Author:** [@eightohnine](https://discourse.processing.org/u/eightohnine)\
**Replies:** 6\
**Last updated:** [April 3, 2020, 12:57pm UTC](https://discourse.processing.org/t/my-personal-processing-trap/18985 "2020-04-03T12:57:43Z")

</div>

Soo… I’m writing this coming off of yet another frustrating experience trying to get a sketch to work. It’s wordy and somewhat meta, so bear with me. Also, I have yet no idea, if I’m actually looking for answers or just …

---

## [Circular coordinates](https://discourse.processing.org/t/circular-coordinates/19344)

<div class="topic-metadata">

**Author:** [@lumicon9](https://discourse.processing.org/u/lumicon9)\
**Replies:** 7\
**Last updated:** [April 3, 2020, 9:54am UTC](https://discourse.processing.org/t/circular-coordinates/19344 "2020-04-03T09:54:46Z")

</div>

how to make this circular coordinates more evenly distributed? …will say; the inner ring less dot frequency becoming more to the outer. maybe fibionacci like…? thank you! float px, py; float angle; float radius = width/…

---

## [Can't open an url with loadJSONObject but it works with HTTP Library](https://discourse.processing.org/t/cant-open-an-url-with-loadjsonobject-but-it-works-with-http-library/19293)

<div class="topic-metadata">

**Author:** [@fedpep](https://discourse.processing.org/u/fedpep)\
**Replies:** 4\
**Last updated:** [April 3, 2020, 10:55am UTC](https://discourse.processing.org/t/cant-open-an-url-with-loadjsonobject-but-it-works-with-http-library/19293 "2020-04-03T10:55:52Z")

</div>

Hello! I got a problem that I can’t understand. I need to load this url into a Processing sketch: https://www.colourlovers.com/api/palettes/top?format=json I used loadJSONArray without any problem in the past but now I …

---

## [Renderer Problems - Login System and Menu](https://discourse.processing.org/t/renderer-problems-login-system-and-menu/19331)

<div class="topic-metadata">

**Author:** [@DaysLoop](https://discourse.processing.org/u/DaysLoop)\
**Replies:** 8\
**Last updated:** [April 3, 2020, 9:58am UTC](https://discourse.processing.org/t/renderer-problems-login-system-and-menu/19331 "2020-04-03T09:58:06Z")

</div>

Sorry, but I’m inexperienced in Processing. I have um little test code where one menu open after login accepted. The two functions work individually, but when I put them together I have this error “translate(), or this…

---

## [What does add() do?](https://discourse.processing.org/t/what-does-add-do/19356)

<div class="topic-metadata">

**Author:** [@Cybernet](https://discourse.processing.org/u/Cybernet)\
**Replies:** 3\
**Last updated:** [April 3, 2020, 3:04am UTC](https://discourse.processing.org/t/what-does-add-do/19356 "2020-04-03T03:04:07Z")

</div>

So I have a code: class Projectile extends PVector { PVector velocity; Projectile(PVector loc, PVector vel) { super(loc.x, loc.y); velocity = vel; } void Display() { add(velocity); // what…

---

## [Else if not triggering with boolean's](https://discourse.processing.org/t/else-if-not-triggering-with-booleans/19320)

<div class="topic-metadata">

**Author:** [@trevmasterfunk](https://discourse.processing.org/u/trevmasterfunk)\
**Replies:** 2\
**Last updated:** [April 3, 2020, 1:07am UTC](https://discourse.processing.org/t/else-if-not-triggering-with-booleans/19320 "2020-04-03T01:07:27Z")

</div>

Hello! After watching the coding train for a while I decided to download processing and start learning how to create my own programs. I started last week. Currently I am working on a infection simulation. I am trying t…

---

## [Hi I need help please :(](https://discourse.processing.org/t/hi-i-need-help-please/19343)

<div class="topic-metadata">

**Author:** [@DTTTO](https://discourse.processing.org/u/DTTTO)\
**Replies:** 4\
**Last updated:** [April 2, 2020, 4:52pm UTC](https://discourse.processing.org/t/hi-i-need-help-please/19343 "2020-04-02T16:52:40Z")

</div>

for my processing project im trying to make 3 pandas holding green bamboo. The bamboo is supposed to be made with using a quad. And it also needs to be used with keypressed, everytime I press the key it should turn to a …

---

## [ArrayList of Arrays for Interactive Shapes](https://discourse.processing.org/t/arraylist-of-arrays-for-interactive-shapes/19336)

<div class="topic-metadata">

**Author:** [@jaschag](https://discourse.processing.org/u/jaschag)\
**Replies:** 6\
**Last updated:** [April 2, 2020, 4:46pm UTC](https://discourse.processing.org/t/arraylist-of-arrays-for-interactive-shapes/19336 "2020-04-02T16:46:18Z")

</div>

I have created an ArrayList of arrays. Each array in the ArrayList should contain the mouseX and mouseY positions for one drawing frame. The ArrayList is to be expanded by one element(array) each frame. However, when ac…

[Previous page](https://discourse.processing.org/c/processing/6.md?page=221)

[Next page](https://discourse.processing.org/c/processing/6.md?page=223)
