# Beginners

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

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

**Page:** 17

---

## [PImage Draw transparent .jpg keeps overwriting the newest mouseY, don't know how to fix](https://discourse.processing.org/t/pimage-draw-transparent-jpg-keeps-overwriting-the-newest-mousey-dont-know-how-to-fix/33092)

<div class="topic-metadata">

**Author:** [@Lott](https://discourse.processing.org/u/Lott)\
**Replies:** 3\
**Last updated:** [October 26, 2021, 9:49pm UTC](https://discourse.processing.org/t/pimage-draw-transparent-jpg-keeps-overwriting-the-newest-mousey-dont-know-how-to-fix/33092 "2021-10-26T21:49:28Z")

</div>

Hi!! Just started using Processing and I’m having a hard time with my transparent jpg… I have a code for interactive mouseY but because the background is transparant you can see the previous mouse movement (what I don’t…

---

## [Processing throw syntax error when I define a function](https://discourse.processing.org/t/processing-throw-syntax-error-when-i-define-a-function/33041)

<div class="topic-metadata">

**Author:** [@isikoromochi](https://discourse.processing.org/u/isikoromochi)\
**Replies:** 3\
**Last updated:** [October 26, 2021, 11:08am UTC](https://discourse.processing.org/t/processing-throw-syntax-error-when-i-define-a-function/33041 "2021-10-26T11:08:19Z")

</div>

Hi all, I can’t define any function because of syntax error. void setup(){ size(1000,1000); } line(100,100,200,300); This code throws “Syntax Error - Missing operator, semicolon, or ‘}’ near ‘100’?” at line 5. I t…

---

## [Triangle using angles](https://discourse.processing.org/t/triangle-using-angles/32994)

<div class="topic-metadata">

**Author:** [@Tay](https://discourse.processing.org/u/Tay)\
**Replies:** 9\
**Last updated:** [October 23, 2021, 11:21pm UTC](https://discourse.processing.org/t/triangle-using-angles/32994 "2021-10-23T23:21:06Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Please if anyone can help me, i only know how to draw a triangle using triangle(x1, y1, x2, y2, x3, y3); how would one draw a triangle using a…

---

## [What does the 'sqrt' equation mean?](https://discourse.processing.org/t/what-does-the-sqrt-equation-mean/32875)

<div class="topic-metadata">

**Author:** [@blopplop](https://discourse.processing.org/u/blopplop)\
**Replies:** 5\
**Last updated:** [October 17, 2021, 11:13am UTC](https://discourse.processing.org/t/what-does-the-sqrt-equation-mean/32875 "2021-10-17T11:13:47Z")

</div>

What does the sqrt equation mean?

---

## [keyPressed(event) usage](https://discourse.processing.org/t/keypressed-event-usage/32847)

<div class="topic-metadata">

**Author:** [@mhamilt](https://discourse.processing.org/u/mhamilt)\
**Replies:** 6\
**Last updated:** [October 15, 2021, 6:20pm UTC](https://discourse.processing.org/t/keypressed-event-usage/32847 "2021-10-15T18:20:46Z")

</div>

In the keyPressed documentation one of the usages listed under Syntax is keyPressed(event). My expectation is that you could write the function as keyPressed(Event event), but that doesn’t seem to be correct. I anyone …

---

## [Help with if statements](https://discourse.processing.org/t/help-with-if-statements/32839)

<div class="topic-metadata">

**Author:** [@Onipunch777](https://discourse.processing.org/u/Onipunch777)\
**Replies:** 2\
**Last updated:** [October 15, 2021, 7:20am UTC](https://discourse.processing.org/t/help-with-if-statements/32839 "2021-10-15T07:20:29Z")

</div>

Hello, I was hoping to get step-by-step help to get this homework assignment done. My teacher is asking the class to have the processing code print out odds numbers between 100 to 200 that can not be divided by 3. From w…

---

## [Color changing flower screen saver](https://discourse.processing.org/t/color-changing-flower-screen-saver/32824)

<div class="topic-metadata">

**Author:** [@williammannisto](https://discourse.processing.org/u/williammannisto)\
**Replies:** 4\
**Last updated:** [October 14, 2021, 3:11pm UTC](https://discourse.processing.org/t/color-changing-flower-screen-saver/32824 "2021-10-14T15:11:46Z")

</div>

im trying to make a color changing flower screen saver for my mom as a assignment i have to do but im using ellipses and cant figure out how to make the ellipse rotate more than once in the exact same spot it was in last…

---

## [Guys any Solution how to save the work?](https://discourse.processing.org/t/guys-any-solution-how-to-save-the-work/32812)

<div class="topic-metadata">

**Author:** [@desciato](https://discourse.processing.org/u/desciato)\
**Replies:** 2\
**Last updated:** [October 13, 2021, 10:19pm UTC](https://discourse.processing.org/t/guys-any-solution-how-to-save-the-work/32812 "2021-10-13T22:19:20Z")

</div>

float g = random(256); float b = random(256); float cChange = 2; float distanceChange = .001; for (float angle = 0; angle \< 360\*100; angle += .07) { float x = width/5 + cos(radians(angle))\*distance; float y = heigh…

---

## [How create a filled ArrayList](https://discourse.processing.org/t/how-create-a-filled-arraylist/32721)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 2\
**Last updated:** [October 10, 2021, 10:21am UTC](https://discourse.processing.org/t/how-create-a-filled-arraylist/32721 "2021-10-10T10:21:12Z")

</div>

Hi! I am trying to make a game for fun. It is about exploring rooms and fighting enemies (similar to ‘enter the gungeon’, but completely 2D, rooms require teleportation to switch and way less mechanics) What I am tryin…

---

## [Using ArrayList -- Only One Object Being Displayed](https://discourse.processing.org/t/using-arraylist-only-one-object-being-displayed/32659)

<div class="topic-metadata">

**Author:** [@endymion](https://discourse.processing.org/u/endymion)\
**Replies:** 8\
**Last updated:** [October 8, 2021, 12:09am UTC](https://discourse.processing.org/t/using-arraylist-only-one-object-being-displayed/32659 "2021-10-08T00:09:36Z")

</div>

I want to have a variable number of objects in an ArrayList and display them all at a time, but my code only displays 1 regardless of the number of objects I have in the list. I think the problem is in my draw function… …

---

## [Let syntax error](https://discourse.processing.org/t/let-syntax-error/32662)

<div class="topic-metadata">

**Author:** [@Arche](https://discourse.processing.org/u/Arche)\
**Replies:** 1\
**Last updated:** [October 7, 2021, 3:34am UTC](https://discourse.processing.org/t/let-syntax-error/32662 "2021-10-07T03:34:35Z")

</div>

I am new to processing and java and was trying to use let but when I compile it says syntax error. Do I have to add a plugin for that and how do I do it?

---

## [Cannot use array variable defined in setup()](https://discourse.processing.org/t/cannot-use-array-variable-defined-in-setup/32578)

<div class="topic-metadata">

**Author:** [@dirknbr](https://discourse.processing.org/u/dirknbr)\
**Replies:** 2\
**Last updated:** [October 3, 2021, 12:04pm UTC](https://discourse.processing.org/t/cannot-use-array-variable-defined-in-setup/32578 "2021-10-03T12:04:10Z")

</div>

I want each of 30 lines to have a distinct random colour, but I get a ‘cols cannnot be resolved’ error in the draw() part. //https://funprogramming.org/76-Slowly-morphing-bezier-curves.html void setup() { size(500, 40…

---

## [How to lock a variable?](https://discourse.processing.org/t/how-to-lock-a-variable/32515)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 5\
**Last updated:** [September 29, 2021, 8:57pm UTC](https://discourse.processing.org/t/how-to-lock-a-variable/32515 "2021-09-29T20:57:33Z")

</div>

how to make a variable unchangeable so it can’t be changed anymore?

---

## [Char, lower/upper case](https://discourse.processing.org/t/char-lower-upper-case/32505)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 4\
**Last updated:** [September 29, 2021, 10:19am UTC](https://discourse.processing.org/t/char-lower-upper-case/32505 "2021-09-29T10:19:00Z")

</div>

Hi! Is there a way to check if a char is uppercase / lowercase other than: (char+"").toLowerCase().charAt(0) == char ? I saw this method but it didn’t seem to work. I tried using: println(a.isUpperCase(), isUpper…

---

## [randomSeed() reuse](https://discourse.processing.org/t/randomseed-reuse/32154)

<div class="topic-metadata">

**Author:** [@Hermes](https://discourse.processing.org/u/Hermes)\
**Replies:** 15\
**Last updated:** [September 26, 2021, 8:36am UTC](https://discourse.processing.org/t/randomseed-reuse/32154 "2021-09-26T08:36:03Z")

</div>

hello I’m a noob to Processing, I’ve figured out how to generate a seed for each image output but I can’t figure out how to reuse the same seed to generate the same image… I just need to know the format and where to put …

---

## [Can't call simple function - missing semicolon syntax error](https://discourse.processing.org/t/cant-call-simple-function-missing-semicolon-syntax-error/32420)

<div class="topic-metadata">

**Author:** [@Chadmeistr](https://discourse.processing.org/u/Chadmeistr)\
**Replies:** 1\
**Last updated:** [September 26, 2021, 5:23am UTC](https://discourse.processing.org/t/cant-call-simple-function-missing-semicolon-syntax-error/32420 "2021-09-26T05:23:52Z")

</div>

Here is some code I am playing with, but it keeps giving me an error 'Syntax error - missin operator, semicolon or"}" near 2 void setup() { size(200, 200); } void sum(int a, int b, int c) { int total = a + b + c; …

---

## [noLoop not working as expected in v3.5.4](https://discourse.processing.org/t/noloop-not-working-as-expected-in-v3-5-4/32342)

<div class="topic-metadata">

**Author:** [@RosesAreBlue](https://discourse.processing.org/u/RosesAreBlue)\
**Replies:** 5\
**Last updated:** [September 22, 2021, 2:17am UTC](https://discourse.processing.org/t/noloop-not-working-as-expected-in-v3-5-4/32342 "2021-09-22T02:17:19Z")

</div>

void setup() { // Set the size of the window and background color size(1024, 1024); background(0, 0, 0); noLoop(); } float plotFromNormalized(float x, float y) { // Takes inputs in range \[-1, 1\] where it must al…

---

## [Access sub classes static final variable from superclass](https://discourse.processing.org/t/access-sub-classes-static-final-variable-from-superclass/32297)

<div class="topic-metadata">

**Author:** [@gitanerie](https://discourse.processing.org/u/gitanerie)\
**Replies:** 5\
**Last updated:** [September 19, 2021, 12:16pm UTC](https://discourse.processing.org/t/access-sub-classes-static-final-variable-from-superclass/32297 "2021-09-19T12:16:46Z")

</div>

Hi everyone, I’m currently working on a project in which I have different types of “bullets”. I have a superclass called Projectile to handle all the needed functions that are common to all types of bullets. In fact, th…

---

## [Check if object is inbetween 2 points](https://discourse.processing.org/t/check-if-object-is-inbetween-2-points/32288)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 10\
**Last updated:** [September 17, 2021, 8:04pm UTC](https://discourse.processing.org/t/check-if-object-is-inbetween-2-points/32288 "2021-09-17T20:04:00Z")

</div>

how to check if an object is anywhere inbetween the two x values, width-(width/4) and eight-(height/4)

---

## [What is the traditional sign for square root?](https://discourse.processing.org/t/what-is-the-traditional-sign-for-square-root/32148)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 5\
**Last updated:** [September 8, 2021, 8:09am UTC](https://discourse.processing.org/t/what-is-the-traditional-sign-for-square-root/32148 "2021-09-08T08:09:45Z")

</div>

This is not necessarily a processing question, but I understand that in coding we can make use of operands such as / for divide, \* for multiply, ^ for power, is there a predefined operand for squareroot, or is it just t…

---

## [How to save an animated moving image in processing](https://discourse.processing.org/t/how-to-save-an-animated-moving-image-in-processing/32075)

<div class="topic-metadata">

**Author:** [@Stella9](https://discourse.processing.org/u/Stella9)\
**Replies:** 1\
**Last updated:** [September 3, 2021, 6:39pm UTC](https://discourse.processing.org/t/how-to-save-an-animated-moving-image-in-processing/32075 "2021-09-03T18:39:36Z")

</div>

Hello, I would to know how to save a animation as a gif files or png on processing. I created a an animation into two tab on processing : Excuse me for my mistake, English is not my mother language.

---

## [Posterization filter explained?](https://discourse.processing.org/t/posterization-filter-explained/32001)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 5\
**Last updated:** [September 1, 2021, 7:35pm UTC](https://discourse.processing.org/t/posterization-filter-explained/32001 "2021-09-01T19:35:14Z")

</div>

Hi! I saw an interesting filter recently, its called posterization. In short terms, it sets the maximum number of colors in an image. You set the maximum of n-colors and only use them. So I have a few questions: H…

---

## [Is there a better way to write this piece of code?](https://discourse.processing.org/t/is-there-a-better-way-to-write-this-piece-of-code/31961)

<div class="topic-metadata">

**Author:** [@jhsa](https://discourse.processing.org/u/jhsa)\
**Replies:** 8\
**Last updated:** [August 30, 2021, 1:49am UTC](https://discourse.processing.org/t/is-there-a-better-way-to-write-this-piece-of-code/31961 "2021-08-30T01:49:48Z")

</div>

Is there a better way to write this piece of code? These belong to my DropDownList code. These lines are needed to bring the clicked list to front. Thank You. if (d1.isMousePressed()) { d1.bringToFront(); } i…

---

## [Access and delete a file in a specific path](https://discourse.processing.org/t/access-and-delete-a-file-in-a-specific-path/31988)

<div class="topic-metadata">

**Author:** [@Fofana](https://discourse.processing.org/u/Fofana)\
**Replies:** 4\
**Last updated:** [August 28, 2021, 9:37pm UTC](https://discourse.processing.org/t/access-and-delete-a-file-in-a-specific-path/31988 "2021-08-28T21:37:48Z")

</div>

I want’t to access a file in a specific path. I tried this but its not working. File copyFile = dataFile(dataPath("C:\\\\wamp64\\\\www\\\\VD\\\\tempCopy.txt")); if(copyFile.isFile()){ copyFile.delete(); }

---

## [Passing an Argument to a Function](https://discourse.processing.org/t/passing-an-argument-to-a-function/31933)

<div class="topic-metadata">

**Author:** [@bcabc](https://discourse.processing.org/u/bcabc)\
**Replies:** 7\
**Last updated:** [August 28, 2021, 2:39pm UTC](https://discourse.processing.org/t/passing-an-argument-to-a-function/31933 "2021-08-28T14:39:12Z")

</div>

Hi - I’m new to Processing and I’m trying to make a simple function that allows me to make grids out of a variably-input shapes. I am not exactly sure how this would work - I still don’t understand a lot of the termino…

---

## [What is the target field in fromAngle() in PVector?](https://discourse.processing.org/t/what-is-the-target-field-in-fromangle-in-pvector/31982)

<div class="topic-metadata">

**Author:** [@whhyyy123](https://discourse.processing.org/u/whhyyy123)\
**Replies:** 4\
**Last updated:** [August 28, 2021, 7:30am UTC](https://discourse.processing.org/t/what-is-the-target-field-in-fromangle-in-pvector/31982 "2021-08-28T07:30:43Z")

</div>

Hi! I was looking at the fromAngle documentation and saw this: .fromAngle(angle, target) What is target here? Does that mean I can do this PVector p; PVector.fromAngle(90, p); Will this mean the new vector is in p? I…

---

## [No loadPixels() for PGraphicsPDF](https://discourse.processing.org/t/no-loadpixels-for-pgraphicspdf/31746)

<div class="topic-metadata">

**Author:** [@yalaniv](https://discourse.processing.org/u/yalaniv)\
**Replies:** 4\
**Last updated:** [August 18, 2021, 11:27am UTC](https://discourse.processing.org/t/no-loadpixels-for-pgraphicspdf/31746 "2021-08-18T11:27:47Z")

</div>

i found this code Pointillism | Learning Processing 2nd Edition but instead of run it on the screen, I wanted to run in 5 times on backend and save it as a pdf file, and got this error RuntimeException: No loadPixels(…

---

## [Javax.crypto not resolving](https://discourse.processing.org/t/javax-crypto-not-resolving/8708)

<div class="topic-metadata">

**Author:** [@Carlosmarcab](https://discourse.processing.org/u/Carlosmarcab)\
**Replies:** 9\
**Last updated:** [August 19, 2021, 4:30pm UTC](https://discourse.processing.org/t/javax-crypto-not-resolving/8708 "2021-08-19T16:30:24Z")

</div>

Hi! So I’m trying to import javax.crypto.\* but it keeps saying that the import cannot be resolved. I’ve tried everything i’ve been able to think about. I’ve tried the other packages in javax and all seem fine, ive tried…

---

## [Question about \>\< and !=](https://discourse.processing.org/t/question-about-and/31419)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 6\
**Last updated:** [August 18, 2021, 3:50am UTC](https://discourse.processing.org/t/question-about-and/31419 "2021-08-18T03:50:00Z")

</div>

Is If(x \>\< 16){print(“yes”)} The same as If (x != 16){print(“yes”)} ?

---

## [Is there a way to paint a filled triangle?](https://discourse.processing.org/t/is-there-a-way-to-paint-a-filled-triangle/31647)

<div class="topic-metadata">

**Author:** [@yalaniv](https://discourse.processing.org/u/yalaniv)\
**Replies:** 6\
**Last updated:** [August 16, 2021, 2:22pm UTC](https://discourse.processing.org/t/is-there-a-way-to-paint-a-filled-triangle/31647 "2021-08-16T14:22:04Z")

</div>

I would like to know

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

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