# Beginners

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

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

**Page:** 24

---

## [Wrapping classes - overlapping method](https://discourse.processing.org/t/wrapping-classes-overlapping-method/25733)

<div class="topic-metadata">

**Author:** [@Ellie98](https://discourse.processing.org/u/Ellie98)\
**Replies:** 1\
**Last updated:** [November 26, 2020, 6:21pm UTC](https://discourse.processing.org/t/wrapping-classes-overlapping-method/25733 "2020-11-26T18:21:29Z")

</div>

Hello, i’m stuck with my assignment. I’m not getting the result. I’m getting “Infinity” instead and the point numbers are turning in whole numbers. But I used float though. Am I doing the overlapping wrongly? Thanks in…

---

## [Beginning (3D) superprogrammer (57 years)](https://discourse.processing.org/t/beginning-3d-superprogrammer-57-years/24565)

<div class="topic-metadata">

**Author:** [@flounder](https://discourse.processing.org/u/flounder)\
**Replies:** 2\
**Last updated:** [November 26, 2020, 11:34am UTC](https://discourse.processing.org/t/beginning-3d-superprogrammer-57-years/24565 "2020-11-26T11:34:30Z")

</div>

I have been a programmer for 57 years. Therefore, I find the introductory tutorials uninteresting. I have a very focused set of questions. I need to draw lines in 3D space. Just lines. No extrusions. Practically …

---

## [Why can't we pass PVector to translate?](https://discourse.processing.org/t/why-cant-we-pass-pvector-to-translate/7888)

<div class="topic-metadata">

**Author:** [@Geeky](https://discourse.processing.org/u/Geeky)\
**Replies:** 6\
**Last updated:** [November 25, 2020, 11:07pm UTC](https://discourse.processing.org/t/why-cant-we-pass-pvector-to-translate/7888 "2020-11-25T23:07:15Z")

</div>

I’ve just started using P3D and while translating a cube I wonder that why can’t we pass a variable of type PVector to translate method. I think that functionality wise it should work. Correct me if I am wrong.

---

## [How does the red() function work](https://discourse.processing.org/t/how-does-the-red-function-work/25687)

<div class="topic-metadata">

**Author:** [@PyroDeathAdder](https://discourse.processing.org/u/PyroDeathAdder)\
**Replies:** 2\
**Last updated:** [November 25, 2020, 2:05pm UTC](https://discourse.processing.org/t/how-does-the-red-function-work/25687 "2020-11-25T14:05:05Z")

</div>

i was just wondering what processing does so it can do red(colorObject) and return the red value of that color

---

## [Blending two PGraphics - how would this work? - what is the syntax?](https://discourse.processing.org/t/blending-two-pgraphics-how-would-this-work-what-is-the-syntax/25630)

<div class="topic-metadata">

**Author:** [@MuddyGardener](https://discourse.processing.org/u/MuddyGardener)\
**Replies:** 6\
**Last updated:** [November 24, 2020, 12:16pm UTC](https://discourse.processing.org/t/blending-two-pgraphics-how-would-this-work-what-is-the-syntax/25630 "2020-11-24T12:16:00Z")

</div>

The Processing reference for blend suggests there is flexibility of specifying the destination image as well as the source image. \> Blends a region of pixels from one image into another (or in itself again) with full al…

---

## [Printing all PVector coordinates stored in an ArrayList](https://discourse.processing.org/t/printing-all-pvector-coordinates-stored-in-an-arraylist/25485)

<div class="topic-metadata">

**Author:** [@papaboo](https://discourse.processing.org/u/papaboo)\
**Replies:** 7\
**Last updated:** [November 24, 2020, 6:55am UTC](https://discourse.processing.org/t/printing-all-pvector-coordinates-stored-in-an-arraylist/25485 "2020-11-24T06:55:50Z")

</div>

I’m trying to get the whole set of x, y coordinates that are stored in an array. ArrayList\<Points\> recorded = new ArrayList(); void store (float x, float y) { int ArrayListSize = recorded.size()-1; if (Arra…

---

## [Unexpected void error](https://discourse.processing.org/t/unexpected-void-error/25640)

<div class="topic-metadata">

**Author:** [@type.gaurav](https://discourse.processing.org/u/type.gaurav)\
**Replies:** 8\
**Last updated:** [November 23, 2020, 6:47pm UTC](https://discourse.processing.org/t/unexpected-void-error/25640 "2020-11-23T18:47:19Z")

</div>

void setup(){ size(900,900); background(255); } void draw(){ for(int x = 0; x \< height; x = x+90){ for (int y = 0; ABy \< width; y = y+90){ shapeX(x, y, 90, 90, random(255)); } } void shapeX(float x, float y, fl…

---

## [Void settings() not working](https://discourse.processing.org/t/void-settings-not-working/25542)

<div class="topic-metadata">

**Author:** [@Ellie98](https://discourse.processing.org/u/Ellie98)\
**Replies:** 2\
**Last updated:** [November 19, 2020, 8:03pm UTC](https://discourse.processing.org/t/void-settings-not-working/25542 "2020-11-19T20:03:41Z")

</div>

Hello, I just typed this code from our script to processing. And the size is staying small, why isn’t it changing? public void setup() { // Fenstertitel mit aktueller Fenstergröße setzen surface.setTitle("Schach "…

---

## [Trails not fading completely WHY?](https://discourse.processing.org/t/trails-not-fading-completely-why/25514)

<div class="topic-metadata">

**Author:** [@Eyetoof](https://discourse.processing.org/u/Eyetoof)\
**Replies:** 2\
**Last updated:** [November 18, 2020, 5:21pm UTC](https://discourse.processing.org/t/trails-not-fading-completely-why/25514 "2020-11-18T17:21:52Z")

</div>

I learned a technique from the Ben Fry books for doing trails. Its very simple and effective but I have come across an issue that I don’t understand and wonder if someone can explain. The technique is to, at the top of…

---

## [Processing.js with java and html things](https://discourse.processing.org/t/processing-js-with-java-and-html-things/25409)

<div class="topic-metadata">

**Author:** [@candydope](https://discourse.processing.org/u/candydope)\
**Replies:** 1\
**Last updated:** [November 14, 2020, 7:05am UTC](https://discourse.processing.org/t/processing-js-with-java-and-html-things/25409 "2020-11-14T07:05:31Z")

</div>

referencing this page, (https://forum.processing.org/two/discussion/6179/why-does-not-it-run-clipboard) I made a project which can create short text(string) and copy the text to clipboard. I’m trying to post this sketch…

---

## [Drawing a line in processing after a region of the screen has been pressed and the mouse is being clicked](https://discourse.processing.org/t/drawing-a-line-in-processing-after-a-region-of-the-screen-has-been-pressed-and-the-mouse-is-being-clicked/25278)

<div class="topic-metadata">

**Author:** [@crimpqwe](https://discourse.processing.org/u/crimpqwe)\
**Replies:** 1\
**Last updated:** [November 8, 2020, 4:06pm UTC](https://discourse.processing.org/t/drawing-a-line-in-processing-after-a-region-of-the-screen-has-been-pressed-and-the-mouse-is-being-clicked/25278 "2020-11-08T16:06:38Z")

</div>

when i click the region it continually draws instead of when im holding the mouse. also ill figure out how to toggle the pencil when clicked later on. i am very new. ive tried some stuff with mouseclicked and mousebutton…

---

## [mousePressed() and MouseDragged() pressed key in println](https://discourse.processing.org/t/mousepressed-and-mousedragged-pressed-key-in-println/25241)

<div class="topic-metadata">

**Author:** [@Ellie98](https://discourse.processing.org/u/Ellie98)\
**Replies:** 6\
**Last updated:** [November 6, 2020, 6:29pm UTC](https://discourse.processing.org/t/mousepressed-and-mousedragged-pressed-key-in-println/25241 "2020-11-06T18:29:08Z")

</div>

Hello, I have to show the keys with println that I pressed if I use the functions keyPressed(), mousePressed() and mouseDragged(). I used println and key. It’s showing up the keys I clicked on my keyboard for keyPressed…

---

## [Random Name Generator](https://discourse.processing.org/t/random-name-generator/25008)

<div class="topic-metadata">

**Author:** [@HumanoidX](https://discourse.processing.org/u/HumanoidX)\
**Replies:** 20\
**Last updated:** [October 30, 2020, 1:02pm UTC](https://discourse.processing.org/t/random-name-generator/25008 "2020-10-30T13:02:17Z")

</div>

How should I properly initialize char variables? My code: String randomPlanetName(){ String name = ""; int dimension = int(random(3,12)); int repetitions = 0; boolean lastType; for(int i = 0;i == dimension…

---

## [Flip the image HORIZONTALLY](https://discourse.processing.org/t/flip-the-image-horizontally/25165)

<div class="topic-metadata">

**Author:** [@BettyBai](https://discourse.processing.org/u/BettyBai)\
**Replies:** 3\
**Last updated:** [November 4, 2020, 6:02pm UTC](https://discourse.processing.org/t/flip-the-image-horizontally/25165 "2020-11-04T18:02:42Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hi, I’m new to processing, and I’m trying to flip the image horizontally. However, I am facing the problem of only flipping half of the image, c…

---

## [I feel like this is bad practice but I'm not sure why](https://discourse.processing.org/t/i-feel-like-this-is-bad-practice-but-im-not-sure-why/24937)

<div class="topic-metadata">

**Author:** [@wyattsworlddd](https://discourse.processing.org/u/wyattsworlddd)\
**Replies:** 9\
**Last updated:** [October 30, 2020, 9:36am UTC](https://discourse.processing.org/t/i-feel-like-this-is-bad-practice-but-im-not-sure-why/24937 "2020-10-30T09:36:04Z")

</div>

So this code below works, but I feel like maybe I should be doing something else to be more proper. if (s\<=9){ secs = "0" + s; } else { secs = "" + s; } Really simply, all I’m doing is adding a 0 to the f…

---

## [.lenght function](https://discourse.processing.org/t/lenght-function/25015)

<div class="topic-metadata">

**Author:** [@moms\_spaghetti](https://discourse.processing.org/u/moms_spaghetti)\
**Replies:** 1\
**Last updated:** [October 29, 2020, 3:56pm UTC](https://discourse.processing.org/t/lenght-function/25015 "2020-10-29T15:56:40Z")

</div>

Hello Am I the only one where the .lenght doesnt work?? String name = “test”; int lenght = name.lenght(); this gives me the error “The function “.lenght()” does not exist” while here https://processing.org/reference…

---

## [Saving images from the window](https://discourse.processing.org/t/saving-images-from-the-window/24964)

<div class="topic-metadata">

**Author:** [@HumanoidX](https://discourse.processing.org/u/HumanoidX)\
**Replies:** 3\
**Last updated:** [October 29, 2020, 1:38am UTC](https://discourse.processing.org/t/saving-images-from-the-window/24964 "2020-10-29T01:38:10Z")

</div>

My question is, what is the difference between save() and saveFrame()? Which one must I use if I want to save, only the drawings inside the windows, not savijng mouse.

---

## [Help with this Processing / Java syntax](https://discourse.processing.org/t/help-with-this-processing-java-syntax/24922)

<div class="topic-metadata">

**Author:** [@aaronm](https://discourse.processing.org/u/aaronm)\
**Replies:** 6\
**Last updated:** [October 26, 2020, 8:15pm UTC](https://discourse.processing.org/t/help-with-this-processing-java-syntax/24922 "2020-10-26T20:15:00Z")

</div>

Hello, I’m new to Processing and Java. I’m following along with the “Generative Design” book (first edition / Java / Processing version of the book) and I’ve come across some syntax which I’m unsure about. I’m not sure i…

---

## [How to get full float number expression?](https://discourse.processing.org/t/how-to-get-full-float-number-expression/24859)

<div class="topic-metadata">

**Author:** [@Duhovny](https://discourse.processing.org/u/Duhovny)\
**Replies:** 1\
**Last updated:** [October 24, 2020, 4:50pm UTC](https://discourse.processing.org/t/how-to-get-full-float-number-expression/24859 "2020-10-24T16:50:07Z")

</div>

Hello, first post here from me! I am a beginner in real programming, had some visual scripting experience as a hobby. I have a general question about floating point representation. I tested some things and found that a…

---

## [Explosion in on impact](https://discourse.processing.org/t/explosion-in-on-impact/24800)

<div class="topic-metadata">

**Author:** [@kasper1](https://discourse.processing.org/u/kasper1)\
**Replies:** 7\
**Last updated:** [October 21, 2020, 9:05pm UTC](https://discourse.processing.org/t/explosion-in-on-impact/24800 "2020-10-21T21:05:08Z")

</div>

I am trying to implement a code where when the bird hits something it will explode but I am having trouble with displaying it. It gives me the error “NullPointerException” at code \<explosions\[a\].display(); explosions\[a\]…

---

## [Fill() in if statement not working](https://discourse.processing.org/t/fill-in-if-statement-not-working/24623)

<div class="topic-metadata">

**Author:** [@Khun](https://discourse.processing.org/u/Khun)\
**Replies:** 5\
**Last updated:** [October 17, 2020, 10:54am UTC](https://discourse.processing.org/t/fill-in-if-statement-not-working/24623 "2020-10-17T10:54:31Z")

</div>

Hello, I am a recent beginner towards processing api and I have an issue with fill(). (editted) int numRows; int rowLength; int startX; int startY; int rectWidth; int rectHeight; int takeaway; boolean isColour; boolea…

---

## [For statement to while statement](https://discourse.processing.org/t/for-statement-to-while-statement/24648)

<div class="topic-metadata">

**Author:** [@Ellie98](https://discourse.processing.org/u/Ellie98)\
**Replies:** 2\
**Last updated:** [October 16, 2020, 5:40pm UTC](https://discourse.processing.org/t/for-statement-to-while-statement/24648 "2020-10-16T17:40:23Z")

</div>

I have to change the for statement into a while statement. But i’m getting a different output. Where is my mistake? for (int k = 3; k \> 0; k--) { if (k%2 == 0) continue; println(k); } int k = 3; while (k \> 0) …

---

## [Toggle rulers in sketch processing 3.53](https://discourse.processing.org/t/toggle-rulers-in-sketch-processing-3-53/9474)

<div class="topic-metadata">

**Author:** [@Erico](https://discourse.processing.org/u/Erico)\
**Replies:** 13\
**Last updated:** [October 15, 2020, 5:13pm UTC](https://discourse.processing.org/t/toggle-rulers-in-sketch-processing-3-53/9474 "2020-10-15T17:13:59Z")

</div>

I was watching the video by Dan Schiffman where he describes toggling rulers for the run box. I have not found a means of doing that. Does that function not exist in Sketch 3.53?

---

## [Create a image with hyperlink](https://discourse.processing.org/t/create-a-image-with-hyperlink/24582)

<div class="topic-metadata">

**Author:** [@robocopper](https://discourse.processing.org/u/robocopper)\
**Replies:** 2\
**Last updated:** [October 14, 2020, 2:41am UTC](https://discourse.processing.org/t/create-a-image-with-hyperlink/24582 "2020-10-14T02:41:46Z")

</div>

Hello everyone! I would like to know if it is possible to create an image (as in loadImage() function) that is a link to an URL. I looked at the reference section, other questions, googled it, and found nothing about it.…

---

## [Calculating with fractions](https://discourse.processing.org/t/calculating-with-fractions/24546)

<div class="topic-metadata">

**Author:** [@Superkid](https://discourse.processing.org/u/Superkid)\
**Replies:** 2\
**Last updated:** [October 12, 2020, 3:02pm UTC](https://discourse.processing.org/t/calculating-with-fractions/24546 "2020-10-12T15:02:56Z")

</div>

Hey! I got a problem in Processing. i want to define a variable to be 1/60. But if I look in the Console it always says, that the variable is 0. Last time I tried this (about one year ago) it worked perfectly. How do i …

---

## [Declare a 3x3 empty array](https://discourse.processing.org/t/declare-a-3x3-empty-array/24515)

<div class="topic-metadata">

**Author:** [@learningL](https://discourse.processing.org/u/learningL)\
**Replies:** 3\
**Last updated:** [October 11, 2020, 11:54am UTC](https://discourse.processing.org/t/declare-a-3x3-empty-array/24515 "2020-10-11T11:54:27Z")

</div>

Hello I would like to know how to declare a 3x3 empty array which data type is char. Thanks in advance.

---

## [Add method to float\[\]\[\]](https://discourse.processing.org/t/add-method-to-float/24502)

<div class="topic-metadata">

**Author:** [@NumericPrime](https://discourse.processing.org/u/NumericPrime)\
**Replies:** 1\
**Last updated:** [October 11, 2020, 9:44am UTC](https://discourse.processing.org/t/add-method-to-float/24502 "2020-10-11T09:44:19Z")

</div>

I’m currently writing a Mathlibrary. And it is kind of annoying to always have to use new Matrix(m) it would be better if I could use something like m.toMatrix() Is there a possibility to do that?

---

## [Can't get the balls to move correctly](https://discourse.processing.org/t/cant-get-the-balls-to-move-correctly/18518)

<div class="topic-metadata">

**Author:** [@GKBeginner](https://discourse.processing.org/u/GKBeginner)\
**Replies:** 6\
**Last updated:** [October 11, 2020, 12:14am UTC](https://discourse.processing.org/t/cant-get-the-balls-to-move-correctly/18518 "2020-10-11T00:14:09Z")

</div>

One ball should be randomly moving and the other is controlled by the arrow keys on the keyboard. They are not working correctly and I can’t figure out why. int x1=30; int y1; int x2; int y2=30; int r=255; int g=255; i…

---

## [Petit question sur processing](https://discourse.processing.org/t/petit-question-sur-processing/24487)

<div class="topic-metadata">

**Author:** [@nina](https://discourse.processing.org/u/nina)\
**Replies:** 10\
**Last updated:** [October 10, 2020, 8:27pm UTC](https://discourse.processing.org/t/petit-question-sur-processing/24487 "2020-10-10T20:27:12Z")

</div>

Bonsoir, j’ai une petit question je ne comprends pas à quoi elle sert l’instruction return? Voulez-vous bien m’aider, s’il vous plait. Je vous remercie d’avance . cordialement , Nina

---

## [Very basic traffic light](https://discourse.processing.org/t/very-basic-traffic-light/24451)

<div class="topic-metadata">

**Author:** [@rk0945](https://discourse.processing.org/u/rk0945)\
**Replies:** 7\
**Last updated:** [October 10, 2020, 7:51pm UTC](https://discourse.processing.org/t/very-basic-traffic-light/24451 "2020-10-10T19:51:00Z")

</div>

Thanks - problem solved!!!

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

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