# Coding Questions

**URL:** https://discourse.processing.org/c/processing/processing-questions/15.md?page=113

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

**Page:** 114

---

## [Getting nested JSON float values](https://discourse.processing.org/t/getting-nested-json-float-values/16674)

<div class="topic-metadata">

**Author:** [@AndreasRef](https://discourse.processing.org/u/AndreasRef)\
**Replies:** 3\
**Last updated:** [December 28, 2019, 5:13pm UTC](https://discourse.processing.org/t/getting-nested-json-float-values/16674 "2019-12-28T17:13:01Z")

</div>

Given a JSON file formatted as shown in the screenshot below, how do I acces the individual float values using Processing JSONArray + JSONObject?

---

## [Eliminate red tint from image](https://discourse.processing.org/t/eliminate-red-tint-from-image/16666)

<div class="topic-metadata">

**Author:** [@costachemadalin](https://discourse.processing.org/u/costachemadalin)\
**Replies:** 4\
**Last updated:** [December 28, 2019, 2:07pm UTC](https://discourse.processing.org/t/eliminate-red-tint-from-image/16666 "2019-12-28T14:07:04Z")

</div>

Hi, is it possible to eliminate the red tint from this image using some filter? I need to find in this image the orange ball, but i cannot make the difference between ball and background.

---

## [Find number in a text and return string from the row below](https://discourse.processing.org/t/find-number-in-a-text-and-return-string-from-the-row-below/16670)

<div class="topic-metadata">

**Author:** [@molo32](https://discourse.processing.org/u/molo32)\
**Replies:** 4\
**Last updated:** [December 28, 2019, 1:03pm UTC](https://discourse.processing.org/t/find-number-in-a-text-and-return-string-from-the-row-below/16670 "2019-12-28T13:03:00Z")

</div>

for example I have a text that contains 2 lines 1- “1000”, “55”, “123” 2- “hello”, “bye”, “good” I want a function that does this foo (“55”) this would have to find me the string “55” and return what is in the row b…

---

## [Error handling for the clipboard](https://discourse.processing.org/t/error-handling-for-the-clipboard/16654)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 3\
**Last updated:** [December 28, 2019, 2:06am UTC](https://discourse.processing.org/t/error-handling-for-the-clipboard/16654 "2019-12-28T02:06:52Z")

</div>

I am using the following code to capture text from the clipboard, however if I use print screen the clipboard will be filled with image data and return an error. Object getFromClipboard (DataFlavor flavor) { Clipboar…

---

## [PImage - Array reverse](https://discourse.processing.org/t/pimage-array-reverse/16668)

<div class="topic-metadata">

**Author:** [@iheartart](https://discourse.processing.org/u/iheartart)\
**Replies:** 4\
**Last updated:** [December 28, 2019, 1:25am UTC](https://discourse.processing.org/t/pimage-array-reverse/16668 "2019-12-28T01:25:40Z")

</div>

Hi Guys, I have a little troubleshooting with a PImage… The code works but i really wonder how to change the direction of the pictures. Starting mouseY on top with numb 22 going down to 0. ( I just managed to start th…

---

## [How to create animated line graph in Processing?](https://discourse.processing.org/t/how-to-create-animated-line-graph-in-processing/16643)

<div class="topic-metadata">

**Author:** [@bluefern](https://discourse.processing.org/u/bluefern)\
**Replies:** 5\
**Last updated:** [December 28, 2019, 12:30am UTC](https://discourse.processing.org/t/how-to-create-animated-line-graph-in-processing/16643 "2019-12-28T00:30:14Z")

</div>

I´m trying to make an animated line graph using data from .csv I want to animate the lines and add the name of the series to the end of the line like this example: Household debt balances (excluding mortgages) pic.t…

---

## [I need your help please :/](https://discourse.processing.org/t/i-need-your-help-please/16658)

<div class="topic-metadata">

**Author:** [@MonteliaRO](https://discourse.processing.org/u/MonteliaRO)\
**Replies:** 3\
**Last updated:** [December 27, 2019, 7:11pm UTC](https://discourse.processing.org/t/i-need-your-help-please/16658 "2019-12-27T19:11:32Z")

</div>

if(mousePressed){ cursor(maus2, maus2.width/2, maus2.height/2); } else { cursor(maus, maus.width/2, maus.height/2);} why dont work? pls i need the help

---

## [Simple question: draw a gradient line by line](https://discourse.processing.org/t/simple-question-draw-a-gradient-line-by-line/16652)

<div class="topic-metadata">

**Author:** [@littlecat](https://discourse.processing.org/u/littlecat)\
**Replies:** 10\
**Last updated:** [December 27, 2019, 11:24am UTC](https://discourse.processing.org/t/simple-question-draw-a-gradient-line-by-line/16652 "2019-12-27T11:24:50Z")

</div>

Hey everyone I’m a newbie and don’t know how to find a solution for this question: I want to draw gradient where you can see the “loading” or refreshing of the gradient. Like when you see loading a image on a screen li…

---

## [Help with rotation in simple animation](https://discourse.processing.org/t/help-with-rotation-in-simple-animation/16620)

<div class="topic-metadata">

**Author:** [@srgochman](https://discourse.processing.org/u/srgochman)\
**Replies:** 2\
**Last updated:** [December 26, 2019, 6:04pm UTC](https://discourse.processing.org/t/help-with-rotation-in-simple-animation/16620 "2019-12-26T18:04:55Z")

</div>

Hi! I’m relatively new to Processing, and I’ve been practicing with some simple visualizations. I feel that I’m 90% of the way there but can use some help to get the last step(s). My goal is to draw a row of dots (Point…

---

## [Plot marker on a map in canvas created by processing](https://discourse.processing.org/t/plot-marker-on-a-map-in-canvas-created-by-processing/16149)

<div class="topic-metadata">

**Author:** [@iamgsshetty](https://discourse.processing.org/u/iamgsshetty)\
**Replies:** 4\
**Last updated:** [December 24, 2019, 2:16pm UTC](https://discourse.processing.org/t/plot-marker-on-a-map-in-canvas-created-by-processing/16149 "2019-12-24T14:16:13Z")

</div>

I am creating a GUI for my airplane which should look like the image So need to add a map showing live location of my airplane How would I do this using processing

---

## [Make balls bounce](https://discourse.processing.org/t/make-balls-bounce/16441)

<div class="topic-metadata">

**Author:** [@sahaa1](https://discourse.processing.org/u/sahaa1)\
**Replies:** 4\
**Last updated:** [December 24, 2019, 2:05pm UTC](https://discourse.processing.org/t/make-balls-bounce/16441 "2019-12-24T14:05:17Z")

</div>

I am trying to make a project in which when a ball bounces against the edge of the screen, another ball is produced, and I will loop it. However, due to an error which seems almost impossible to fix, the second ball is n…

---

## [HELP with Processing project (Post 1 of 2)](https://discourse.processing.org/t/help-with-processing-project-post-1-of-2/16434)

<div class="topic-metadata">

**Author:** [@ImConfused](https://discourse.processing.org/u/ImConfused)\
**Replies:** 4\
**Last updated:** [December 24, 2019, 1:56pm UTC](https://discourse.processing.org/t/help-with-processing-project-post-1-of-2/16434 "2019-12-24T13:56:59Z")

</div>

I need a ton of help with projects and one is this one I don’t know got to set it up

---

## [Live data into processing](https://discourse.processing.org/t/live-data-into-processing/16603)

<div class="topic-metadata">

**Author:** [@bayleft](https://discourse.processing.org/u/bayleft)\
**Replies:** 1\
**Last updated:** [December 24, 2019, 9:45am UTC](https://discourse.processing.org/t/live-data-into-processing/16603 "2019-12-24T09:45:35Z")

</div>

Hello! I am trying to pull live data from the website below and put it into processing. I am basically at a level below beginner… What is the best way for doing this? I am reading about APIs and such and getting lost. …

---

## [Problems with objects updating](https://discourse.processing.org/t/problems-with-objects-updating/16439)

<div class="topic-metadata">

**Author:** [@davidclue](https://discourse.processing.org/u/davidclue)\
**Replies:** 3\
**Last updated:** [December 24, 2019, 5:11am UTC](https://discourse.processing.org/t/problems-with-objects-updating/16439 "2019-12-24T05:11:49Z")

</div>

Hi, I was creating a game and so far everything was going well until I decided to change the way to make trails which I had in my game and ever since theirs been a problem with a few of them rendering at all. int level=…

---

## [Saving data to a .txt file](https://discourse.processing.org/t/saving-data-to-a-txt-file/16600)

<div class="topic-metadata">

**Author:** [@davidclue](https://discourse.processing.org/u/davidclue)\
**Replies:** 1\
**Last updated:** [December 24, 2019, 1:07am UTC](https://discourse.processing.org/t/saving-data-to-a-txt-file/16600 "2019-12-24T01:07:22Z")

</div>

Hi, I am making a level editor for a game and have an idea on how to load level packs into the main game. The idea is to save data in the form of arrays of numbers that builds a level in a text document and then people c…

---

## [Symmetric overlapping sine wave code](https://discourse.processing.org/t/symmetric-overlapping-sine-wave-code/16565)

<div class="topic-metadata">

**Author:** [@Ruchi](https://discourse.processing.org/u/Ruchi)\
**Replies:** 4\
**Last updated:** [December 23, 2019, 11:12pm UTC](https://discourse.processing.org/t/symmetric-overlapping-sine-wave-code/16565 "2019-12-23T23:12:03Z")

</div>

int n = 5; // NO. OF STRANDS float\[\] translate;//OFFSET OF INDIVIDUAL STRAND float\[\] amp;// AMPLITUDE OF INDIVIDUAL STRAND float\[\] period;// PERIOD OF INDIVIDUAL STRAND RELATIVE TO STANDARD PERIOD float frequency; float …

---

## [Making a queue manager](https://discourse.processing.org/t/making-a-queue-manager/16593)

<div class="topic-metadata">

**Author:** [@TechMaster04](https://discourse.processing.org/u/TechMaster04)\
**Replies:** 5\
**Last updated:** [December 23, 2019, 9:43pm UTC](https://discourse.processing.org/t/making-a-queue-manager/16593 "2019-12-23T21:43:51Z")

</div>

Hello all. With the help of this forum, I was able to create the first version of my queue manager, One small problem: After 11 names are entered, the names go off screen. I tried to fix it by making another array, makin…

---

## [Randomly distribute objects on grid](https://discourse.processing.org/t/randomly-distribute-objects-on-grid/16590)

<div class="topic-metadata">

**Author:** [@Reynaert98](https://discourse.processing.org/u/Reynaert98)\
**Replies:** 4\
**Last updated:** [December 23, 2019, 4:16pm UTC](https://discourse.processing.org/t/randomly-distribute-objects-on-grid/16590 "2019-12-23T16:16:16Z")

</div>

Hello, I’m working on a game/ assignment where I have to randomly place some objects into a grid. These objects are supposed to be hidden on the grid and pop up when a player clicks on it. I made an attempt by making 2 …

---

## [How to use text() command to print string array to screen](https://discourse.processing.org/t/how-to-use-text-command-to-print-string-array-to-screen/16574)

<div class="topic-metadata">

**Author:** [@TechMaster04](https://discourse.processing.org/u/TechMaster04)\
**Replies:** 4\
**Last updated:** [December 22, 2019, 5:16pm UTC](https://discourse.processing.org/t/how-to-use-text-command-to-print-string-array-to-screen/16574 "2019-12-22T17:16:18Z")

</div>

Hello Long story short: I’m porting my python program to processing to add a GUI. Here is my code so far: int i = 0; String currentName = ""; int z = i+1; String names\[\] = new String\[100\]; void setup(){ size(700…

---

## [Showing words at maxium of 12](https://discourse.processing.org/t/showing-words-at-maxium-of-12/16567)

<div class="topic-metadata">

**Author:** [@vanoevelenstef](https://discourse.processing.org/u/vanoevelenstef)\
**Replies:** 1\
**Last updated:** [December 22, 2019, 1:03pm UTC](https://discourse.processing.org/t/showing-words-at-maxium-of-12/16567 "2019-12-22T13:03:00Z")

</div>

I’ve created this code where every key is a pre formatted word and once it has been pressed it shows the word on screen and pressing another key changes the previous word. Now I’m wondering, can I show more than one word…

---

## [Changing row-size of dynamic grid](https://discourse.processing.org/t/changing-row-size-of-dynamic-grid/16510)

<div class="topic-metadata">

**Author:** [@Namrad](https://discourse.processing.org/u/Namrad)\
**Replies:** 9\
**Last updated:** [December 22, 2019, 7:11am UTC](https://discourse.processing.org/t/changing-row-size-of-dynamic-grid/16510 "2019-12-22T07:11:16Z")

</div>

Hello! I’m encountering a problem with a grid-sketch. The answer seems rather simple, yet I can’t wrap my head around it for several days now. The idea is simple: I wanted to make a grid of rectangles which alter in wi…

---

## [Mandelbrot/julia set display problem](https://discourse.processing.org/t/mandelbrot-julia-set-display-problem/16509)

<div class="topic-metadata">

**Author:** [@Zerichy](https://discourse.processing.org/u/Zerichy)\
**Replies:** 5\
**Last updated:** [December 22, 2019, 1:01am UTC](https://discourse.processing.org/t/mandelbrot-julia-set-display-problem/16509 "2019-12-22T01:01:24Z")

</div>

Hello, i am trying to code the mandelbrot/julia set challenge from codingtrain and now i am stuck. I wanted to split the screen into two sides. On the left side it should show the julia set and on the right side it shoul…

---

## [Determining the period of perlin noise](https://discourse.processing.org/t/determining-the-period-of-perlin-noise/16380)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 8\
**Last updated:** [December 21, 2019, 12:56am UTC](https://discourse.processing.org/t/determining-the-period-of-perlin-noise/16380 "2019-12-21T00:56:09Z")

</div>

I would like to create a grid and am unsure how to go about producing the result I want. I noticed that when creating a terrain using perlin noise, at some point if you keep travelling through the map you’ll notice that…

---

## [Changing game states (beginner)](https://discourse.processing.org/t/changing-game-states-beginner/16526)

<div class="topic-metadata">

**Author:** [@Salttt](https://discourse.processing.org/u/Salttt)\
**Replies:** 11\
**Last updated:** [December 20, 2019, 5:19pm UTC](https://discourse.processing.org/t/changing-game-states-beginner/16526 "2019-12-20T17:19:43Z")

</div>

Hello! I am a recent beginner (1 week), and just trying to make a simple game where you need to dodge a car. Currently I have 3 states; state 0: the beginning screen (fully light blue currently), state 1: The actual game…

---

## [Is there a way to make an interactive bar graph?](https://discourse.processing.org/t/is-there-a-way-to-make-an-interactive-bar-graph/16417)

<div class="topic-metadata">

**Author:** [@xikexa](https://discourse.processing.org/u/xikexa)\
**Replies:** 2\
**Last updated:** [December 19, 2019, 9:49pm UTC](https://discourse.processing.org/t/is-there-a-way-to-make-an-interactive-bar-graph/16417 "2019-12-19T21:49:37Z")

</div>

I want to make a interactive bar graph with clickable icons/buttons and instead of “bars” i want it to have corresponding icons that gather around the data that’s clicked on if that makes sense.

---

## [Kinect camera - MIRROR using Type!](https://discourse.processing.org/t/kinect-camera-mirror-using-type/16063)

<div class="topic-metadata">

**Author:** [@madiMcD](https://discourse.processing.org/u/madiMcD)\
**Replies:** 1\
**Last updated:** [December 19, 2019, 7:44pm UTC](https://discourse.processing.org/t/kinect-camera-mirror-using-type/16063 "2019-12-19T19:44:00Z")

</div>

Hello!! I am at a block with my code, and I don’t know where to go from here. I am creating a mirror out of type for a current project, and I managed to do so following the Coding Train’s point cloud tutorial and substi…

---

## [(Beginner) How do I make objects of different classes interact?](https://discourse.processing.org/t/beginner-how-do-i-make-objects-of-different-classes-interact/16497)

<div class="topic-metadata">

**Author:** [@Salttt](https://discourse.processing.org/u/Salttt)\
**Replies:** 2\
**Last updated:** [December 18, 2019, 10:28pm UTC](https://discourse.processing.org/t/beginner-how-do-i-make-objects-of-different-classes-interact/16497 "2019-12-18T22:28:22Z")

</div>

Hello, I started processing about one and a half weeks ago with the first goal being to make a really, really simple game. The goal is basically to jump over cars (so far only a car but that’s not the problem right now),…

---

## [Is there a way to use launch() without the entire system path?](https://discourse.processing.org/t/is-there-a-way-to-use-launch-without-the-entire-system-path/16495)

<div class="topic-metadata">

**Author:** [@sneugle](https://discourse.processing.org/u/sneugle)\
**Replies:** 1\
**Last updated:** [December 18, 2019, 7:31pm UTC](https://discourse.processing.org/t/is-there-a-way-to-use-launch-without-the-entire-system-path/16495 "2019-12-18T19:31:51Z")

</div>

Hello there! I am trying to run a .bat file with the processing function launch(), in the documentation (https://processing.org/reference/launch\_.html) it says you need to use the entire system path to the file you are …

---

## [How would I go on and create a slider? Without using any libraries?](https://discourse.processing.org/t/how-would-i-go-on-and-create-a-slider-without-using-any-libraries/16491)

<div class="topic-metadata">

**Author:** [@needhelpwithsliders](https://discourse.processing.org/u/needhelpwithsliders)\
**Replies:** 2\
**Last updated:** [December 18, 2019, 2:00pm UTC](https://discourse.processing.org/t/how-would-i-go-on-and-create-a-slider-without-using-any-libraries/16491 "2019-12-18T14:00:42Z")

</div>

I’m making a game, which also includes a settings tab where the end-user can adjust settings to their preference, the problem is however that I have no idea how to make a slider without making use of a library, the slide…

---

## [Color fill in rotation](https://discourse.processing.org/t/color-fill-in-rotation/16320)

<div class="topic-metadata">

**Author:** [@Eban](https://discourse.processing.org/u/Eban)\
**Replies:** 5\
**Last updated:** [December 18, 2019, 1:42pm UTC](https://discourse.processing.org/t/color-fill-in-rotation/16320 "2019-12-18T13:42:58Z")

</div>

Hi everyone, I am creating an incrementing circle that is drawn with rectangles ( see the code ), and every time the angle reaches HALF\_PI, the color is changed. My problem is, the drawn color (green) gets bigger as th…

[Previous page](https://discourse.processing.org/c/processing/processing-questions/15.md?page=112)

[Next page](https://discourse.processing.org/c/processing/processing-questions/15.md?page=114)
