# Beginners

**URL:** https://discourse.processing.org/c/processing/processing-beginners/14.md?page=20

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

**Page:** 21

---

## [How to erase an object inside of an array?](https://discourse.processing.org/t/how-to-erase-an-object-inside-of-an-array/28499)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 1\
**Last updated:** [March 13, 2021, 2:46pm UTC](https://discourse.processing.org/t/how-to-erase-an-object-inside-of-an-array/28499 "2021-03-13T14:46:47Z")

</div>

Lets say I have an ArrayList of a class of objects. How would I be able to do erase it from within the class. Something like ArrayList\<newClass\> newClassList = new ArrayList\<newClass\>(); newClassList.add(newClass()); cl…

---

## [Having trouble with code](https://discourse.processing.org/t/having-trouble-with-code/28446)

<div class="topic-metadata">

**Author:** [@Lolman223](https://discourse.processing.org/u/Lolman223)\
**Replies:** 5\
**Last updated:** [March 11, 2021, 6:23pm UTC](https://discourse.processing.org/t/having-trouble-with-code/28446 "2021-03-11T18:23:37Z")

</div>

I’m having trouble figuring out why line 19 (t+=0.5;) is unreachable. Can somebody have a look, please? static final int NUM\_LINES = 10; float t; void setup() { background(20); size(500,500); } void draw() { b…

---

## [Display objects stored in an ArrayList one after the other (Animation)](https://discourse.processing.org/t/display-objects-stored-in-an-arraylist-one-after-the-other-animation/28348)

<div class="topic-metadata">

**Author:** [@Alesk1969](https://discourse.processing.org/u/Alesk1969)\
**Replies:** 4\
**Last updated:** [March 9, 2021, 1:08pm UTC](https://discourse.processing.org/t/display-objects-stored-in-an-arraylist-one-after-the-other-animation/28348 "2021-03-09T13:08:16Z")

</div>

Hello everyone, What are the different solutions (or the easiest one for a beginner to master) to display some objects stored in an array (or in the case of my sketch in an ArrayList) one after the other and rather than…

---

## [How to get x and y value of a shape?](https://discourse.processing.org/t/how-to-get-x-and-y-value-of-a-shape/28367)

<div class="topic-metadata">

**Author:** [@HolaCola](https://discourse.processing.org/u/HolaCola)\
**Replies:** 4\
**Last updated:** [March 9, 2021, 10:47am UTC](https://discourse.processing.org/t/how-to-get-x-and-y-value-of-a-shape/28367 "2021-03-09T10:47:40Z")

</div>

Is there any method to get x and y axis value of a 2D shape (i.e. a circle or rectangle)? I haven’t found any related reference.

---

## [Transformation matrix artifacts](https://discourse.processing.org/t/transformation-matrix-artifacts/28337)

<div class="topic-metadata">

**Author:** [@krigga](https://discourse.processing.org/u/krigga)\
**Replies:** 2\
**Last updated:** [March 8, 2021, 2:26pm UTC](https://discourse.processing.org/t/transformation-matrix-artifacts/28337 "2021-03-08T14:26:19Z")

</div>

I was generating a linear gradient using code I found online and then tried adding rotation using transformation matrix. The gradient did rotate, however artifacts appeared: the gradient was no longer perfect, dark lines…

---

## [How to add multiple values to array within class?](https://discourse.processing.org/t/how-to-add-multiple-values-to-array-within-class/28294)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 4\
**Last updated:** [March 8, 2021, 2:07pm UTC](https://discourse.processing.org/t/how-to-add-multiple-values-to-array-within-class/28294 "2021-03-08T14:07:44Z")

</div>

I have the following array: class Foo { int\[\] myArray; int val1; int val2; int val3; int val4; Foo(int val1, int val2, int val3, int val4) { this.myArray = new int\[4\]; myArray = val1, val2, val3, va…

---

## [How to extract values from custom class?](https://discourse.processing.org/t/how-to-extract-values-from-custom-class/28268)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 3\
**Last updated:** [March 5, 2021, 9:50am UTC](https://discourse.processing.org/t/how-to-extract-values-from-custom-class/28268 "2021-03-05T09:50:44Z")

</div>

I have a class with some variables like so class Foo { // Instance Variables String myString; int myNums1; int myNums2; // Constructor Declaration of Class Flow(String myString, int myNums){ this.myStri…

---

## [How to store random coordinates?](https://discourse.processing.org/t/how-to-store-random-coordinates/28235)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 15\
**Last updated:** [March 4, 2021, 8:09pm UTC](https://discourse.processing.org/t/how-to-store-random-coordinates/28235 "2021-03-04T20:09:25Z")

</div>

I would like to arrange some spheres randomly in space. To do that I run the following: import peasy.\*; PeasyCam cam; void setup(){ size(1300, 1300, P3D); cam = new PeasyCam(this, 200); randomSeed(0); float…

---

## [Code Organisation](https://discourse.processing.org/t/code-organisation/28215)

<div class="topic-metadata">

**Author:** [@s31](https://discourse.processing.org/u/s31)\
**Replies:** 5\
**Last updated:** [March 3, 2021, 10:53am UTC](https://discourse.processing.org/t/code-organisation/28215 "2021-03-03T10:53:16Z")

</div>

hey all, I’ve been using processing for a while now, but have only just started using this forum. As my projects become larger and larger in scale, the code becomes harder and harder to navigate. All of the text seems t…

---

## [Bug with color variable type (lerpColor)](https://discourse.processing.org/t/bug-with-color-variable-type-lerpcolor/27705)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 17\
**Last updated:** [March 2, 2021, 8:00pm UTC](https://discourse.processing.org/t/bug-with-color-variable-type-lerpcolor/27705 "2021-03-02T20:00:53Z")

</div>

size(400,200); color clr = 255, clr2 = color(255,255,255); noStroke(); fill(red(clr),green(clr),blue(clr)); rect(0,0,200,200); fill(red(clr2),green(clr2),blue(clr2)); rect(200,0,200,200); I know color is stored as a w…

---

## [How to divide a sketch - Beginner math question (rows of graphic)](https://discourse.processing.org/t/how-to-divide-a-sketch-beginner-math-question-rows-of-graphic/28144)

<div class="topic-metadata">

**Author:** [@leatherbird](https://discourse.processing.org/u/leatherbird)\
**Replies:** 8\
**Last updated:** [March 1, 2021, 8:09am UTC](https://discourse.processing.org/t/how-to-divide-a-sketch-beginner-math-question-rows-of-graphic/28144 "2021-03-01T08:09:36Z")

</div>

My efforts to learn Processing always seem to get tripped up by my poor math skills. I am also not sure if I’m using the correct terminology, so I’m hoping someone can either help me, or at least point me toward the corr…

---

## [Answers for Learning Processing](https://discourse.processing.org/t/answers-for-learning-processing/11284)

<div class="topic-metadata">

**Author:** [@r8th](https://discourse.processing.org/u/r8th)\
**Replies:** 5\
**Last updated:** [April 24, 2020, 11:14am UTC](https://discourse.processing.org/t/answers-for-learning-processing/11284 "2020-04-24T11:14:55Z")

</div>

Hi, I am an artist new to code. I am using Shiffman’s Learning Processing (2nd Ed.) to teach myself. Throughout the book there are “test” your knowledge and “fill-in-the-blank” exercises. Does anyone know if there is a…

---

## [Slow simulation](https://discourse.processing.org/t/slow-simulation/28061)

<div class="topic-metadata">

**Author:** [@Belengaz](https://discourse.processing.org/u/Belengaz)\
**Replies:** 1\
**Last updated:** [February 24, 2021, 6:47pm UTC](https://discourse.processing.org/t/slow-simulation/28061 "2021-02-24T18:47:55Z")

</div>

Hey guys! new on processing. The question is the simulation does not run fluently. When i work with a few object things are very good but when create many piece of solids everything screws. So is there anything that i ca…

---

## [Random() limit : high values required](https://discourse.processing.org/t/random-limit-high-values-required/27927)

<div class="topic-metadata">

**Author:** [@IRIGIMA](https://discourse.processing.org/u/IRIGIMA)\
**Replies:** 9\
**Last updated:** [February 24, 2021, 12:10am UTC](https://discourse.processing.org/t/random-limit-high-values-required/27927 "2021-02-24T00:10:24Z")

</div>

Does anyone know the upper limit for the random() function ?? I’m needing 400,000,000 + Solution would be: A=random(20000) B=random(20000) If (A & B)=X (Or any upper limit required) But this is messy. Any thought…

---

## [Drawbot image to gcode](https://discourse.processing.org/t/drawbot-image-to-gcode/28029)

<div class="topic-metadata">

**Author:** [@Marek1](https://discourse.processing.org/u/Marek1)\
**Replies:** 3\
**Last updated:** [February 23, 2021, 9:44pm UTC](https://discourse.processing.org/t/drawbot-image-to-gcode/28029 "2021-02-23T21:44:17Z")

</div>

I like drawing pictures with this code. I have my own buids of drawbot, Im trying create gcode with this one. Downloaded Processing, open all pdes files in one folder… I dont know, how load adress of any pictures from we…

---

## [Is there big differences between Repl.it and the Processing IDE?](https://discourse.processing.org/t/is-there-big-differences-between-repl-it-and-the-processing-ide/27943)

<div class="topic-metadata">

**Author:** [@spamelim](https://discourse.processing.org/u/spamelim)\
**Replies:** 5\
**Last updated:** [February 20, 2021, 2:16am UTC](https://discourse.processing.org/t/is-there-big-differences-between-repl-it-and-the-processing-ide/27943 "2021-02-20T02:16:55Z")

</div>

For class, I use the website repl.it and code fully in processing on it. It’s not meant to use processing but my professor uses some sort of plugin that makes it work. Anyways, for any complex projects, usually, one with…

---

## [Blue border/margin around rectangle](https://discourse.processing.org/t/blue-border-margin-around-rectangle/27896)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 2\
**Last updated:** [February 19, 2021, 10:53am UTC](https://discourse.processing.org/t/blue-border-margin-around-rectangle/27896 "2021-02-19T10:53:43Z")

</div>

I’m facing a weird problem. When I draw a rectangle as part of my HUD, it is drawn with a blue border even though I don’t actually ever specify this color in my code anywhere. Do you have any idea why this is and how to …

---

## [Vectors? (The "dynamic array" type of vectors, not the "value and direction" type)](https://discourse.processing.org/t/vectors-the-dynamic-array-type-of-vectors-not-the-value-and-direction-type/27919)

<div class="topic-metadata">

**Author:** [@ProgrammingN00b](https://discourse.processing.org/u/ProgrammingN00b)\
**Replies:** 4\
**Last updated:** [February 18, 2021, 7:57pm UTC](https://discourse.processing.org/t/vectors-the-dynamic-array-type-of-vectors-not-the-value-and-direction-type/27919 "2021-02-18T19:57:19Z")

</div>

Hello everybody! I have had a bit of programming experience with C++ but found it very hard to make anything else then simple “command line applications” with it. So looking for some “beginner friendly GUI stuff”, I ca…

---

## [How to create textbox on mouseover?](https://discourse.processing.org/t/how-to-create-textbox-on-mouseover/27867)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 3\
**Last updated:** [February 18, 2021, 4:55am UTC](https://discourse.processing.org/t/how-to-create-textbox-on-mouseover/27867 "2021-02-18T04:55:28Z")

</div>

I’m plotting some datapoints in 3D, I would like to display a textbox (with text in it) on mouseover. Do you have any suggestions on how to start? Do you know of any examples, libraries, or code I could use as a template…

---

## [Help needed on loading table and creating search box to search filter data (Bible)](https://discourse.processing.org/t/help-needed-on-loading-table-and-creating-search-box-to-search-filter-data-bible/27870)

<div class="topic-metadata">

**Author:** [@ghost1](https://discourse.processing.org/u/ghost1)\
**Replies:** 12\
**Last updated:** [February 16, 2021, 11:04pm UTC](https://discourse.processing.org/t/help-needed-on-loading-table-and-creating-search-box-to-search-filter-data-bible/27870 "2021-02-16T23:04:20Z")

</div>

Can someone help me figure out how to put the code in to load my data table? Attached is a snapshot of some data, it is just simply two columns, one being verse, and the other being reference. The idea here is I want to…

---

## [Help in writing a stock management code](https://discourse.processing.org/t/help-in-writing-a-stock-management-code/27875)

<div class="topic-metadata">

**Author:** [@zvodca](https://discourse.processing.org/u/zvodca)\
**Replies:** 4\
**Last updated:** [February 17, 2021, 6:44pm UTC](https://discourse.processing.org/t/help-in-writing-a-stock-management-code/27875 "2021-02-17T18:44:41Z")

</div>

Is it possible to write a code for stock managing in processing? If so can i get a code for that purpose?

---

## [Need help with code](https://discourse.processing.org/t/need-help-with-code/27845)

<div class="topic-metadata">

**Author:** [@zvodca](https://discourse.processing.org/u/zvodca)\
**Replies:** 2\
**Last updated:** [February 17, 2021, 4:18am UTC](https://discourse.processing.org/t/need-help-with-code/27845 "2021-02-17T04:18:22Z")

</div>

need help to make the ellipse go reverse and start all over again. want the ellipse to go back and forth on the same route. so far i have managed to move it forward. here is the code i already have; int x = 30; int y…

---

## [Where is the directory to save your .csv data?](https://discourse.processing.org/t/where-is-the-directory-to-save-your-csv-data/27846)

<div class="topic-metadata">

**Author:** [@ghost1](https://discourse.processing.org/u/ghost1)\
**Replies:** 2\
**Last updated:** [February 16, 2021, 2:23pm UTC](https://discourse.processing.org/t/where-is-the-directory-to-save-your-csv-data/27846 "2021-02-16T14:23:27Z")

</div>

where is the directory to save your .csv data?

---

## [Basic search box query results](https://discourse.processing.org/t/basic-search-box-query-results/27851)

<div class="topic-metadata">

**Author:** [@ghost1](https://discourse.processing.org/u/ghost1)\
**Replies:** 4\
**Last updated:** [February 15, 2021, 10:26pm UTC](https://discourse.processing.org/t/basic-search-box-query-results/27851 "2021-02-15T22:26:21Z")

</div>

Where can I find code to create a simple search box, and it queries, and returns the results below the search box?

---

## [Help needed on which tutorials and examples I need to look at to create something like this](https://discourse.processing.org/t/help-needed-on-which-tutorials-and-examples-i-need-to-look-at-to-create-something-like-this/27841)

<div class="topic-metadata">

**Author:** [@ghost1](https://discourse.processing.org/u/ghost1)\
**Replies:** 15\
**Last updated:** [February 15, 2021, 5:48pm UTC](https://discourse.processing.org/t/help-needed-on-which-tutorials-and-examples-i-need-to-look-at-to-create-something-like-this/27841 "2021-02-15T17:48:47Z")

</div>

Can someone please advise me in the direction of which tutorial and examples I need to read in order to produce something like this… https://scimaps.org/mapdetail/visualizing\_bible\_cr\_125

---

## [Someone help me putting an image in the sketch files](https://discourse.processing.org/t/someone-help-me-putting-an-image-in-the-sketch-files/27807)

<div class="topic-metadata">

**Author:** [@Pie](https://discourse.processing.org/u/Pie)\
**Replies:** 2\
**Last updated:** [February 14, 2021, 11:25am UTC](https://discourse.processing.org/t/someone-help-me-putting-an-image-in-the-sketch-files/27807 "2021-02-14T11:25:50Z")

</div>

i tried to create an image and load it but it didn’t work, someone explain to me how i can put an image and load it in my project?

---

## [What java libaries are default in processing?](https://discourse.processing.org/t/what-java-libaries-are-default-in-processing/27737)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 3\
**Last updated:** [February 12, 2021, 7:13pm UTC](https://discourse.processing.org/t/what-java-libaries-are-default-in-processing/27737 "2021-02-12T19:13:14Z")

</div>

Hi! I recently started looking into java libraries. I tried a few libraries and saw that the java.event.KeyListener looks and works exactly like void keyPressed() keyReleased() keyTyped() Which other libraries are in …

---

## [Examples of 3D Alluvial Plots?](https://discourse.processing.org/t/examples-of-3d-alluvial-plots/27739)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 3\
**Last updated:** [February 11, 2021, 11:02pm UTC](https://discourse.processing.org/t/examples-of-3d-alluvial-plots/27739 "2021-02-11T23:02:36Z")

</div>

Do you know of any libraries or projects that use some sort of 3-D alluvial plot to plot data with processing (obviously)?

---

## [2d array expand()](https://discourse.processing.org/t/2d-array-expand/27732)

<div class="topic-metadata">

**Author:** [@HeyHo](https://discourse.processing.org/u/HeyHo)\
**Replies:** 1\
**Last updated:** [February 11, 2021, 11:20am UTC](https://discourse.processing.org/t/2d-array-expand/27732 "2021-02-11T11:20:39Z")

</div>

Hey! I just coded this little program: int path \[\]\[\] = new int\[1\]\[4\]; //path = {{0,0,0,0}} path \[0\]\[0\] = -1; //path = {{-1,0,0,0}} path = (int\[\]\[\])expand(path, path.length + 1); //path = {{-1,0,0,0}, //…

---

## [Missing semicolon](https://discourse.processing.org/t/missing-semicolon/27721)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 3\
**Last updated:** [February 11, 2021, 5:08am UTC](https://discourse.processing.org/t/missing-semicolon/27721 "2021-02-11T05:08:18Z")

</div>

My code throws an error (“missing ;”) and I don’t know why… int i =0; while (i \< books.size()){ for(i\<books.size(); i++){ } }

[Previous page](https://discourse.processing.org/c/processing/processing-beginners/14.md?page=19)

[Next page](https://discourse.processing.org/c/processing/processing-beginners/14.md?page=21)
