# Beginners

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

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

**Page:** 39

---

## [Change the datatype returned from pow() function](https://discourse.processing.org/t/change-the-datatype-returned-from-pow-function/4771)

<div class="topic-metadata">

**Author:** [@Cowhead](https://discourse.processing.org/u/Cowhead)\
**Replies:** 1\
**Last updated:** [October 23, 2018, 11:35am UTC](https://discourse.processing.org/t/change-the-datatype-returned-from-pow-function/4771 "2018-10-23T11:35:11Z")

</div>

I was wondering if it was possible to change the datatype returned from the pow() function and how to possibly do this. or if i have to make my own function. i need the pow() function to return a double instead of a floa…

---

## [Save variable in a loop](https://discourse.processing.org/t/save-variable-in-a-loop/4654)

<div class="topic-metadata">

**Author:** [@hugo](https://discourse.processing.org/u/hugo)\
**Replies:** 7\
**Last updated:** [October 22, 2018, 6:59am UTC](https://discourse.processing.org/t/save-variable-in-a-loop/4654 "2018-10-22T06:59:41Z")

</div>

Hello, I am a beginner in programming. I created a simple program that shows my problem : int A=0; void setup () { size(400,400); } void draw () { background(0); if(mousePressed) { A=A+1; } text(A,200,…

---

## [Creating ellipses with text in it](https://discourse.processing.org/t/creating-ellipses-with-text-in-it/4452)

<div class="topic-metadata">

**Author:** [@xarax](https://discourse.processing.org/u/xarax)\
**Replies:** 2\
**Last updated:** [October 14, 2018, 9:51am UTC](https://discourse.processing.org/t/creating-ellipses-with-text-in-it/4452 "2018-10-14T09:51:48Z")

</div>

I would like to create a Ellipse with text in it, at a specificed Position. Is that possible?

---

## [Largest digit in an integer!](https://discourse.processing.org/t/largest-digit-in-an-integer/4381)

<div class="topic-metadata">

**Author:** [@Who](https://discourse.processing.org/u/Who)\
**Replies:** 3\
**Last updated:** [October 12, 2018, 8:46pm UTC](https://discourse.processing.org/t/largest-digit-in-an-integer/4381 "2018-10-12T20:46:50Z")

</div>

I have the following question that I am stuck at :frowning: Define a function that when passed an integer, returns the highest digit in the integer. Call the function in setup() by passing an integer of your choice and …

---

## ["^" operator What does it mean?](https://discourse.processing.org/t/operator-what-does-it-mean/4290)

<div class="topic-metadata">

**Author:** [@Aquakitty](https://discourse.processing.org/u/Aquakitty)\
**Replies:** 3\
**Last updated:** [October 9, 2018, 10:44pm UTC](https://discourse.processing.org/t/operator-what-does-it-mean/4290 "2018-10-09T22:44:42Z")

</div>

Hi, I’m pretty new to processing and I came across something like this: buttonClicked ^= true; inside a mousePressed() function. What does this “^” do/mean? I did try searching and Googling but I think this character …

---

## [Understanding the return](https://discourse.processing.org/t/understanding-the-return/4274)

<div class="topic-metadata">

**Author:** [@losferatos](https://discourse.processing.org/u/losferatos)\
**Replies:** 1\
**Last updated:** [October 9, 2018, 1:22pm UTC](https://discourse.processing.org/t/understanding-the-return/4274 "2018-10-09T13:22:24Z")

</div>

Hi guys! I’m just playing around processing to learn and understand it. But I stumbled upon a really basic problem: Where does the return function return to? After the function has done their job it should return the …

---

## [How can you store floats in an array?](https://discourse.processing.org/t/how-can-you-store-floats-in-an-array/4184)

<div class="topic-metadata">

**Author:** [@ProsExplorer](https://discourse.processing.org/u/ProsExplorer)\
**Replies:** 4\
**Last updated:** [October 6, 2018, 6:06pm UTC](https://discourse.processing.org/t/how-can-you-store-floats-in-an-array/4184 "2018-10-06T18:06:06Z")

</div>

I’m trying to store float values in an array but it’s insisting that they must be stored as ‘int’. I need to have the fractional parts utilized so even though I could convert the floats with int(float) it’s not what I’m…

---

## [Excecute multiple arrays in one line?](https://discourse.processing.org/t/excecute-multiple-arrays-in-one-line/4137)

<div class="topic-metadata">

**Author:** [@Schred](https://discourse.processing.org/u/Schred)\
**Replies:** 10\
**Last updated:** [October 5, 2018, 2:35pm UTC](https://discourse.processing.org/t/excecute-multiple-arrays-in-one-line/4137 "2018-10-05T14:35:11Z")

</div>

Okay I know this probably sounds confusing and it’s most likely impossible, but I want to know if theres a way to tell Processing to do an action with all the different variables in one array. Like that: example\[0 to 4\] …

---

## [ArrayIndexOutOfBoundsException: 230400](https://discourse.processing.org/t/arrayindexoutofboundsexception-230400/4086)

<div class="topic-metadata">

**Author:** [@mdeepak](https://discourse.processing.org/u/mdeepak)\
**Replies:** 8\
**Last updated:** [October 4, 2018, 5:44pm UTC](https://discourse.processing.org/t/arrayindexoutofboundsexception-230400/4086 "2018-10-04T17:44:31Z")

</div>

Was trying to do metaballs in processing and got this error on line 3 pixels\[index\] = color(x,0,y). Don’t know what caused it or how to fix it. The code doesn’t look any different from Shiffman’s coding challenge #28.

---

## [Function restricted variables](https://discourse.processing.org/t/function-restricted-variables/4104)

<div class="topic-metadata">

**Author:** [@blosh](https://discourse.processing.org/u/blosh)\
**Replies:** 3\
**Last updated:** [October 4, 2018, 6:08am UTC](https://discourse.processing.org/t/function-restricted-variables/4104 "2018-10-04T06:08:15Z")

</div>

I want some variables to only exist in a certain function as I need very similar variables across multiple functions. However, I don’t want them to be reset every single time. The only other solution I can think of is to…

---

## [Add another shape with each mouse click! Help!](https://discourse.processing.org/t/add-another-shape-with-each-mouse-click-help/4033)

<div class="topic-metadata">

**Author:** [@madiMcD](https://discourse.processing.org/u/madiMcD)\
**Replies:** 1\
**Last updated:** [October 2, 2018, 5:57am UTC](https://discourse.processing.org/t/add-another-shape-with-each-mouse-click-help/4033 "2018-10-02T05:57:21Z")

</div>

Hi! I am just starting out with coding and I have to create a simple program in code that accomplishes the following guidelines: “Count the number of mouse presses in the canvas and use that to change the number of sh…

---

## [Strange float behaviors (integer division)](https://discourse.processing.org/t/strange-float-behaviors-integer-division/3867)

<div class="topic-metadata">

**Author:** [@mloiz](https://discourse.processing.org/u/mloiz)\
**Replies:** 2\
**Last updated:** [September 27, 2018, 1:43am UTC](https://discourse.processing.org/t/strange-float-behaviors-integer-division/3867 "2018-09-27T01:43:09Z")

</div>

i dont get this : and if I said oi = PI/2 it does work … thank you

---

## [\[RESOLVED\] Unable to build for mac](https://discourse.processing.org/t/resolved-unable-to-build-for-mac/3756)

<div class="topic-metadata">

**Author:** [@Bunnygamers](https://discourse.processing.org/u/Bunnygamers)\
**Replies:** 4\
**Last updated:** [September 25, 2018, 5:55pm UTC](https://discourse.processing.org/t/resolved-unable-to-build-for-mac/3756 "2018-09-25T17:55:40Z")

</div>

I made a small thing using processing 3.3.7 on Windows 10 (32bit) but I can't seem to build for mac (checkbox for mac is grey), can someone help

---

## [Quiz game - need help](https://discourse.processing.org/t/quiz-game-need-help/3166)

<div class="topic-metadata">

**Author:** [@Pedro](https://discourse.processing.org/u/Pedro)\
**Replies:** 30\
**Last updated:** [September 22, 2018, 12:42pm UTC](https://discourse.processing.org/t/quiz-game-need-help/3166 "2018-09-22T12:42:24Z")

</div>

I’m doing a Quiz game, so I want to put the questions in a different order automatically. I would have to number each question and use random (), but I do not know how it is numbered. I have not done anything yet.

---

## [Debugger - symbols next to variables](https://discourse.processing.org/t/debugger-symbols-next-to-variables/3688)

<div class="topic-metadata">

**Author:** [@buc](https://discourse.processing.org/u/buc)\
**Replies:** 2\
**Last updated:** [September 20, 2018, 11:58am UTC](https://discourse.processing.org/t/debugger-symbols-next-to-variables/3688 "2018-09-20T11:58:29Z")

</div>

Hi, can anybody tell me what the symbols next to the variables mean when using the debugger? Thanks a lot!

---

## [Save a color variable](https://discourse.processing.org/t/save-a-color-variable/3556)

<div class="topic-metadata">

**Author:** [@hugo](https://discourse.processing.org/u/hugo)\
**Replies:** 12\
**Last updated:** [September 19, 2018, 5:26pm UTC](https://discourse.processing.org/t/save-a-color-variable/3556 "2018-09-19T17:26:08Z")

</div>

hello , My question is simple, is it possible to save a color variable ? thank you.

---

## [Simplify object creation](https://discourse.processing.org/t/simplify-object-creation/3649)

<div class="topic-metadata">

**Author:** [@hugo](https://discourse.processing.org/u/hugo)\
**Replies:** 2\
**Last updated:** [September 18, 2018, 5:04pm UTC](https://discourse.processing.org/t/simplify-object-creation/3649 "2018-09-18T17:04:13Z")

</div>

Hello, My question is, can we simplify the following lines of code : objet av1 = new objet (100,100); objet av2 = new objet (200, 100); objet av3 = new objet (300, 100); objet av4 = new objet (400, 100); obje…

---

## [Incorrect results when doing division with variables](https://discourse.processing.org/t/incorrect-results-when-doing-division-with-variables/3606)

<div class="topic-metadata">

**Author:** [@Cam](https://discourse.processing.org/u/Cam)\
**Replies:** 1\
**Last updated:** [September 17, 2018, 4:39pm UTC](https://discourse.processing.org/t/incorrect-results-when-doing-division-with-variables/3606 "2018-09-17T16:39:26Z")

</div>

This code ^^ Returns this vv width = 1000 selImg.width = 255 height = 1000 selImg.height = 255 ((width / selImg.width) \* selImg.height) = 900 ((height / selImg.height) \* selImg.width) = 900 Obviously somethings…

---

## [Need help; String\[\] and Methods](https://discourse.processing.org/t/need-help-string-and-methods/3564)

<div class="topic-metadata">

**Author:** [@SolDrakibane](https://discourse.processing.org/u/SolDrakibane)\
**Replies:** 2\
**Last updated:** [September 16, 2018, 12:01pm UTC](https://discourse.processing.org/t/need-help-string-and-methods/3564 "2018-09-16T12:01:38Z")

</div>

Hi, for my study i had a task which i have already completed (code below) i needed to draw four different names using a method. What i’ve made below works however how can i improve the method? Code below doesn’t work it…

---

## [How to integrate a .css file into a p5.js sketch into Processing IDE?](https://discourse.processing.org/t/how-to-integrate-a-css-file-into-a-p5-js-sketch-into-processing-ide/2804)

<div class="topic-metadata">

**Author:** [@Laurent](https://discourse.processing.org/u/Laurent)\
**Replies:** 6\
**Last updated:** [September 16, 2018, 1:21am UTC](https://discourse.processing.org/t/how-to-integrate-a-css-file-into-a-p5-js-sketch-into-processing-ide/2804 "2018-09-16T01:21:43Z")

</div>

Hi everyone. I’d like to format the index.html page of a p5.js sketch into Processng IDE with CSS external file. I’ve add a new tab in the IDE and I’ve named it ‘styles.css’. This file was created by Processing into root…

---

## [KinectPV2: get and import obj files](https://discourse.processing.org/t/kinectpv2-get-and-import-obj-files/3424)

<div class="topic-metadata">

**Author:** [@elyon](https://discourse.processing.org/u/elyon)\
**Replies:** 20\
**Last updated:** [September 13, 2018, 9:56am UTC](https://discourse.processing.org/t/kinectpv2-get-and-import-obj-files/3424 "2018-09-13T09:56:02Z")

</div>

Hi all! I’m a beginner in Processing and my boss asked me to interface Kinect for XBOX ONE (or Kinect V2) to PC for record pointclouds’ videos (nothing easier…) and to record some coloured frames of a moving arm of a pe…

---

## [Making multiple lines move](https://discourse.processing.org/t/making-multiple-lines-move/3447)

<div class="topic-metadata">

**Author:** [@klutchie](https://discourse.processing.org/u/klutchie)\
**Replies:** 4\
**Last updated:** [September 12, 2018, 5:02pm UTC](https://discourse.processing.org/t/making-multiple-lines-move/3447 "2018-09-12T17:02:03Z")

</div>

Hello there! (First time poster) Im currently on my second week of a programming course and as one of our first assignment we were supposed to write our name/gamertag on Processing with different lines and shapes. Easy …

---

## [Can't run P5.js code in Processing IDE (even in P5.js mode)](https://discourse.processing.org/t/cant-run-p5-js-code-in-processing-ide-even-in-p5-js-mode/3001)

<div class="topic-metadata">

**Author:** [@Sdespr](https://discourse.processing.org/u/Sdespr)\
**Replies:** 11\
**Last updated:** [September 10, 2018, 5:04pm UTC](https://discourse.processing.org/t/cant-run-p5-js-code-in-processing-ide-even-in-p5-js-mode/3001 "2018-09-10T17:04:06Z")

</div>

Hi, pretty new to Processing. I’m trying to run some P5.js code (in P5.js mode in the Processing IDE) that I found on OpenProcessing. When I run the code, it opens up a new web page, and I see that’s loading… but nothing…

---

## [How to sort an array and keep track of the index](https://discourse.processing.org/t/how-to-sort-an-array-and-keep-track-of-the-index/3427)

<div class="topic-metadata">

**Author:** [@tefa](https://discourse.processing.org/u/tefa)\
**Replies:** 15\
**Last updated:** [September 10, 2018, 7:33pm UTC](https://discourse.processing.org/t/how-to-sort-an-array-and-keep-track-of-the-index/3427 "2018-09-10T19:33:39Z")

</div>

Hello, please someone teach me how to keep track of an item in an array and then the delete item when clicked, without using an arrayList.

---

## [Balls fall then loop and restart at random position](https://discourse.processing.org/t/balls-fall-then-loop-and-restart-at-random-position/3403)

<div class="topic-metadata">

**Author:** [@amelia](https://discourse.processing.org/u/amelia)\
**Replies:** 2\
**Last updated:** [September 10, 2018, 5:31pm UTC](https://discourse.processing.org/t/balls-fall-then-loop-and-restart-at-random-position/3403 "2018-09-10T17:31:21Z")

</div>

Hi, For my assignment we have to program a agame and I am strugglung, it would be really helpful if you could help me with a code for when my balls fall down for them to loop and restart at a random position Thanks.

---

## [Help with pixel permutation?](https://discourse.processing.org/t/help-with-pixel-permutation/3333)

<div class="topic-metadata">

**Author:** [@molo32](https://discourse.processing.org/u/molo32)\
**Replies:** 4\
**Last updated:** [September 8, 2018, 8:52pm UTC](https://discourse.processing.org/t/help-with-pixel-permutation/3333 "2018-09-08T20:52:24Z")

</div>

I want you to press a key the pixels of an image are disordered I thought of using pixels.\[i\] = img.pixels\[random(img.width \* img.height)\] but some pixels can be repeated eg if random () returns 2 and the next pixel…

---

## [Make a "world" bigger than the screen and a following camera](https://discourse.processing.org/t/make-a-world-bigger-than-the-screen-and-a-following-camera/3311)

<div class="topic-metadata">

**Author:** [@vincentstrebelle](https://discourse.processing.org/u/vincentstrebelle)\
**Replies:** 10\
**Last updated:** [September 9, 2018, 10:30am UTC](https://discourse.processing.org/t/make-a-world-bigger-than-the-screen-and-a-following-camera/3311 "2018-09-09T10:30:49Z")

</div>

Hi everyone i tried to make an ecosystem and for now its working great, mostly because i receive a lot of help from here. ( see topic : A pathfinding solution). But now my world gonna be too small for my ecosystem, so i…

---

## [How do I allow two players to play at once using only one keyboard?](https://discourse.processing.org/t/how-do-i-allow-two-players-to-play-at-once-using-only-one-keyboard/3320)

<div class="topic-metadata">

**Author:** [@domjanabi](https://discourse.processing.org/u/domjanabi)\
**Replies:** 4\
**Last updated:** [September 6, 2018, 6:38pm UTC](https://discourse.processing.org/t/how-do-i-allow-two-players-to-play-at-once-using-only-one-keyboard/3320 "2018-09-06T18:38:11Z")

</div>

I tried recreating pong and it went pretty well … except the part where you actually play the game. It doesn’t work with keyPressed() because I would need at least two instances of the key variable running at the same t…

---

## [Reference and Help Tabs greyed out](https://discourse.processing.org/t/reference-and-help-tabs-greyed-out/1340)

<div class="topic-metadata">

**Author:** [@Livi](https://discourse.processing.org/u/Livi)\
**Replies:** 10\
**Last updated:** [September 5, 2018, 12:44pm UTC](https://discourse.processing.org/t/reference-and-help-tabs-greyed-out/1340 "2018-09-05T12:44:49Z")

</div>

Hi there, I’m new to Processing, and computer stuff in general. I have the most recent version of Processing, I have all my processing sketch files and the application file stored in the same folder on my mac. When I fi…

---

## [\[SOLVED\] Having a visual problem with overlapping ellipses](https://discourse.processing.org/t/solved-having-a-visual-problem-with-overlapping-ellipses/3253)

<div class="topic-metadata">

**Author:** [@VimHax](https://discourse.processing.org/u/VimHax)\
**Replies:** 18\
**Last updated:** [September 4, 2018, 7:08pm UTC](https://discourse.processing.org/t/solved-having-a-visual-problem-with-overlapping-ellipses/3253 "2018-09-04T19:08:30Z")

</div>

I’m having a issue where I’m trying to cover a circle which is fully white (255) with a circle which is not fully white (100) but I can’t seem to get it covered… New Sketch - size(1000,1000); noStroke(); fill(255,255…

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

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