# Beginners

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

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

**Page:** 14

---

## [How can I translate this to javascript? I have tried several times but it confuses me](https://discourse.processing.org/t/how-can-i-translate-this-to-javascript-i-have-tried-several-times-but-it-confuses-me/35942)

<div class="topic-metadata">

**Author:** [@VassKenn](https://discourse.processing.org/u/VassKenn)\
**Replies:** 1\
**Last updated:** [March 26, 2022, 2:23am UTC](https://discourse.processing.org/t/how-can-i-translate-this-to-javascript-i-have-tried-several-times-but-it-confuses-me/35942 "2022-03-26T02:23:59Z")

</div>

Write a method that prompts the user for 3 different integers and display on the screen on a single line, separated by commas. If one of the values is repeated, show only the repeated value.

---

## [Getting null pointer exception error in class using PVector](https://discourse.processing.org/t/getting-null-pointer-exception-error-in-class-using-pvector/35932)

<div class="topic-metadata">

**Author:** [@animanoir](https://discourse.processing.org/u/animanoir)\
**Replies:** 3\
**Last updated:** [March 25, 2022, 5:49am UTC](https://discourse.processing.org/t/getting-null-pointer-exception-error-in-class-using-pvector/35932 "2022-03-25T05:49:29Z")

</div>

I don’t understand why I’m getting NPE error. Processing points me to: Walker(PVector \_location) { location.set(\_location); } Here is all my code: PVector location; PVector velocity; Walker walker1; void set…

---

## [Array Index Out of Bounds Exception when Inserting an image](https://discourse.processing.org/t/array-index-out-of-bounds-exception-when-inserting-an-image/35881)

<div class="topic-metadata">

**Author:** [@gameworn](https://discourse.processing.org/u/gameworn)\
**Replies:** 12\
**Last updated:** [March 23, 2022, 7:58am UTC](https://discourse.processing.org/t/array-index-out-of-bounds-exception-when-inserting-an-image/35881 "2022-03-23T07:58:59Z")

</div>

Hi to all So I messed up the first step being, trying to get my code in a readable format. I saw the link to Processing.js Template, but had no idea what to do with it once my code was in there. Then there was the oppor…

---

## [Draw a dotted line with the mouse using if statements](https://discourse.processing.org/t/draw-a-dotted-line-with-the-mouse-using-if-statements/35888)

<div class="topic-metadata">

**Author:** [@onyx88](https://discourse.processing.org/u/onyx88)\
**Replies:** 9\
**Last updated:** [March 23, 2022, 12:34am UTC](https://discourse.processing.org/t/draw-a-dotted-line-with-the-mouse-using-if-statements/35888 "2022-03-23T00:34:13Z")

</div>

Hi everyone im a beginner and im not sure how to approach this question. The hint part of the question is confusing me and everything ive tried hasn’t given me a dotted line. Does it want us to draw two different line…

---

## [How to manipulate the size of the ellipse when it is located toward the center of the screen?](https://discourse.processing.org/t/how-to-manipulate-the-size-of-the-ellipse-when-it-is-located-toward-the-center-of-the-screen/35852)

<div class="topic-metadata">

**Author:** [@hau4302](https://discourse.processing.org/u/hau4302)\
**Replies:** 1\
**Last updated:** [March 20, 2022, 7:55am UTC](https://discourse.processing.org/t/how-to-manipulate-the-size-of-the-ellipse-when-it-is-located-toward-the-center-of-the-screen/35852 "2022-03-20T07:55:09Z")

</div>

How to manipulate the size of the ellipse when it is located toward the center of the screen?

---

## [How to make the ellipse size change when the ellipse locates toward the center??](https://discourse.processing.org/t/how-to-make-the-ellipse-size-change-when-the-ellipse-locates-toward-the-center/35805)

<div class="topic-metadata">

**Author:** [@Anson565](https://discourse.processing.org/u/Anson565)\
**Replies:** 2\
**Last updated:** [March 18, 2022, 5:52am UTC](https://discourse.processing.org/t/how-to-make-the-ellipse-size-change-when-the-ellipse-locates-toward-the-center/35805 "2022-03-18T05:52:09Z")

</div>

How to make the ellipse size change when the ellipse locates toward the center??

---

## [Reading my excel data in Processing](https://discourse.processing.org/t/reading-my-excel-data-in-processing/35792)

<div class="topic-metadata">

**Author:** [@CharrR](https://discourse.processing.org/u/CharrR)\
**Replies:** 4\
**Last updated:** [March 17, 2022, 10:41am UTC](https://discourse.processing.org/t/reading-my-excel-data-in-processing/35792 "2022-03-17T10:41:55Z")

</div>

Hello, processing newbie here~ I’m just trying to open my excel data in processing, but have no idea what the code to do this is. I read a little about loadTable and String and printIn, but none of it is making sense to…

---

## [Speed question: 2D array vs. Table](https://discourse.processing.org/t/speed-question-2d-array-vs-table/35707)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 6\
**Last updated:** [March 13, 2022, 5:37pm UTC](https://discourse.processing.org/t/speed-question-2d-array-vs-table/35707 "2022-03-13T17:37:36Z")

</div>

Excuse my question. I need to fill an 2D array with Strings. Then I want to look up / search certain strings in a precise column. Would the access be faster using a table with 30 Columns instead of a 2D array?

---

## [String array loadStrings split](https://discourse.processing.org/t/string-array-loadstrings-split/35636)

<div class="topic-metadata">

**Author:** [@nina1](https://discourse.processing.org/u/nina1)\
**Replies:** 12\
**Last updated:** [March 12, 2022, 8:26pm UTC](https://discourse.processing.org/t/string-array-loadstrings-split/35636 "2022-03-12T20:26:46Z")

</div>

Please can anyone help me please? Iknow how to load Strings but idk how to Split them with “!,?,.” Write a program that reads a text file with a name of your choice and has the following content: Lorem ipsum dolor sit …

---

## [How can I get started with Internationalization improvements](https://discourse.processing.org/t/how-can-i-get-started-with-internationalization-improvements/35691)

<div class="topic-metadata">

**Author:** [@kunal](https://discourse.processing.org/u/kunal)\
**Replies:** 1\
**Last updated:** [March 12, 2022, 5:12pm UTC](https://discourse.processing.org/t/how-can-i-get-started-with-internationalization-improvements/35691 "2022-03-12T17:12:11Z")

</div>

How can i get started with Internationalization improvements

---

## [How can I delete a TableRow in processing?](https://discourse.processing.org/t/how-can-i-delete-a-tablerow-in-processing/35606)

<div class="topic-metadata">

**Author:** [@pas](https://discourse.processing.org/u/pas)\
**Replies:** 1\
**Last updated:** [March 7, 2022, 10:13am UTC](https://discourse.processing.org/t/how-can-i-delete-a-tablerow-in-processing/35606 "2022-03-07T10:13:24Z")

</div>

Hi, i’m new to coding, so hope for some help!! My code should save same variables in a table according to an given name. By searching for the name of this Variable-combination, i would like to delet the whole row. But h…

---

## [Calculator code](https://discourse.processing.org/t/calculator-code/35540)

<div class="topic-metadata">

**Author:** [@suarezl](https://discourse.processing.org/u/suarezl)\
**Replies:** 3\
**Last updated:** [March 4, 2022, 12:31am UTC](https://discourse.processing.org/t/calculator-code/35540 "2022-03-04T00:31:06Z")

</div>

Hello, I am starting in this world, I need help with the code of a calculator, the truth is that I still do not have the necessary knowledge to be able to carry it out, I wanted to see if someone could help me, thanks an…

---

## [Can anyone help explain the following use of "this" and "PApplet"?](https://discourse.processing.org/t/can-anyone-help-explain-the-following-use-of-this-and-papplet/35436)

<div class="topic-metadata">

**Author:** [@leatherbird](https://discourse.processing.org/u/leatherbird)\
**Replies:** 9\
**Last updated:** [March 3, 2022, 10:06am UTC](https://discourse.processing.org/t/can-anyone-help-explain-the-following-use-of-this-and-papplet/35436 "2022-03-03T10:06:18Z")

</div>

Hello, I’m stumbling around using Benedikt Groß’s ANI library for processing, and was getting really confused. I’m probably in over my head. I was trying to create what his library calls AniSequences inside a class I c…

---

## [Exported sketch from IOS much bigger than exported sketch from Windows 10](https://discourse.processing.org/t/exported-sketch-from-ios-much-bigger-than-exported-sketch-from-windows-10/35481)

<div class="topic-metadata">

**Author:** [@zerohstudio](https://discourse.processing.org/u/zerohstudio)\
**Replies:** 2\
**Last updated:** [March 1, 2022, 9:17pm UTC](https://discourse.processing.org/t/exported-sketch-from-ios-much-bigger-than-exported-sketch-from-windows-10/35481 "2022-03-01T21:17:56Z")

</div>

Hello, when I export from a mac my sketch is nearly 300 times bigger than the same sketch on Windows. Is this correct? If so, what is the reason for this?

---

## [How would you do this?](https://discourse.processing.org/t/how-would-you-do-this/35456)

<div class="topic-metadata">

**Author:** [@anonymous-54](https://discourse.processing.org/u/anonymous-54)\
**Replies:** 2\
**Last updated:** [February 26, 2022, 12:23pm UTC](https://discourse.processing.org/t/how-would-you-do-this/35456 "2022-02-26T12:23:16Z")

</div>

New to processing as I’ve just started it in uni and there’s a question I don’t really know how to do after doing the 8x8 grid in blue. Here is the question (Imgur: The magic of the Internet) thank you for any help.

---

## [Image() function with 4 points](https://discourse.processing.org/t/image-function-with-4-points/35182)

<div class="topic-metadata">

**Author:** [@Omri](https://discourse.processing.org/u/Omri)\
**Replies:** 21\
**Last updated:** [February 19, 2022, 4:06pm UTC](https://discourse.processing.org/t/image-function-with-4-points/35182 "2022-02-19T16:06:55Z")

</div>

Hey, Is there any option to display an image in processing with 4 points coordinates? (top left, top right, bottom left, bottom right). in the references, I see with top left, bottom right thanks :slight\_smile:

---

## [Fill() not working in program](https://discourse.processing.org/t/fill-not-working-in-program/35239)

<div class="topic-metadata">

**Author:** [@nbrugger](https://discourse.processing.org/u/nbrugger)\
**Replies:** 3\
**Last updated:** [February 17, 2022, 7:14pm UTC](https://discourse.processing.org/t/fill-not-working-in-program/35239 "2022-02-17T19:14:16Z")

</div>

I am doing this code for a project in school and the fill function is not working. No matter what I do the rectangle always shows up as black. Could someone tell me what I am doing wrong? void Show(){ for(int y = …

---

## [Sketch doesn't run on linux](https://discourse.processing.org/t/sketch-doesnt-run-on-linux/35226)

<div class="topic-metadata">

**Author:** [@Pietari](https://discourse.processing.org/u/Pietari)\
**Replies:** 1\
**Last updated:** [February 17, 2022, 3:02pm UTC](https://discourse.processing.org/t/sketch-doesnt-run-on-linux/35226 "2022-02-17T15:02:31Z")

</div>

Hi! I recently installed processing version 3.5.4-6 on my laptop which has a linux manjaro OS. First I couldn’t open the program at all, but I figured out that I needed to change the Java environment to java-8-openjdk/…

---

## [Processing window not turned on on Mac](https://discourse.processing.org/t/processing-window-not-turned-on-on-mac/35221)

<div class="topic-metadata">

**Author:** [@Celsius](https://discourse.processing.org/u/Celsius)\
**Replies:** 1\
**Last updated:** [February 17, 2022, 3:32am UTC](https://discourse.processing.org/t/processing-window-not-turned-on-on-mac/35221 "2022-02-17T03:32:32Z")

</div>

I just downloaded processing on Mac, following the instructions, but when I clicked on the icon, nothing happened. I rebooted my Mac and it is still the same. The instruction says “if the program didn’t start, visit the…

---

## [Problem running Processing project in VSCode](https://discourse.processing.org/t/problem-running-processing-project-in-vscode/35198)

<div class="topic-metadata">

**Author:** [@avina](https://discourse.processing.org/u/avina)\
**Replies:** 4\
**Last updated:** [February 17, 2022, 1:00am UTC](https://discourse.processing.org/t/problem-running-processing-project-in-vscode/35198 "2022-02-17T01:00:02Z")

</div>

Hello, I am trying to get set up with processing in VSCode, and I am encountering the following problem when attempting to run the processing project. I followed this tutorial to get started. I don’t believe that I miss…

---

## [Problems running processing on M1 Mac](https://discourse.processing.org/t/problems-running-processing-on-m1-mac/35218)

<div class="topic-metadata">

**Author:** [@barrysmyth](https://discourse.processing.org/u/barrysmyth)\
**Replies:** 0\
**Last updated:** [February 16, 2022, 10:42pm UTC](https://discourse.processing.org/t/problems-running-processing-on-m1-mac/35218 "2022-02-16T22:42:13Z")

</div>

Just installed processing on M1 Mac but the console shows endless “java.lang.NoSuchMethodError: accessibilityHitTest” error messages. I have Java installed but not sure what is going on and haven’t been able to locate he…

---

## [Arraylist not updated using arrays in object](https://discourse.processing.org/t/arraylist-not-updated-using-arrays-in-object/35200)

<div class="topic-metadata">

**Author:** [@Kylle](https://discourse.processing.org/u/Kylle)\
**Replies:** 2\
**Last updated:** [February 16, 2022, 11:04am UTC](https://discourse.processing.org/t/arraylist-not-updated-using-arrays-in-object/35200 "2022-02-16T11:04:11Z")

</div>

Hi I have been working quite a lot with Processing the last months. Now I am trying to add ArrayList of objects but I get such a strange result as though the List is not updated correctly. I guess I am making a stupid …

---

## [Opacity background](https://discourse.processing.org/t/opacity-background/35064)

<div class="topic-metadata">

**Author:** [@yalaniv](https://discourse.processing.org/u/yalaniv)\
**Replies:** 7\
**Last updated:** [February 12, 2022, 1:47am UTC](https://discourse.processing.org/t/opacity-background/35064 "2022-02-12T01:47:56Z")

</div>

How do I save a png file with no background (trasnaprent)? I need to fill the background with color, than draw something on it, than clear the background, and draw something again, and save it no background. Any idea…

---

## [If statements in array](https://discourse.processing.org/t/if-statements-in-array/34670)

<div class="topic-metadata">

**Author:** [@Jimma](https://discourse.processing.org/u/Jimma)\
**Replies:** 2\
**Last updated:** [February 8, 2022, 1:03pm UTC](https://discourse.processing.org/t/if-statements-in-array/34670 "2022-02-08T13:03:26Z")

</div>

Hi all, First of all I am very inexperienced with processing and this is a first attempt to create a simple set of rules. My goal is to transfer between various states (A,B,C,D) and finally make the program terminate it…

---

## [Needing help with coding an object following the player by turning towards him](https://discourse.processing.org/t/needing-help-with-coding-an-object-following-the-player-by-turning-towards-him/34997)

<div class="topic-metadata">

**Author:** [@SailorToei](https://discourse.processing.org/u/SailorToei)\
**Replies:** 4\
**Last updated:** [February 6, 2022, 12:19pm UTC](https://discourse.processing.org/t/needing-help-with-coding-an-object-following-the-player-by-turning-towards-him/34997 "2022-02-06T12:19:34Z")

</div>

Hello, originally this is a problem I found when doing 3D games. I got the formula xPos=sin(turn)\*speed+xPos and zPos=cos(turn)\*speed+zPos from here, it is a formula to move a playable figure. The turn is made from the c…

---

## [I have an error with divide (float issue)](https://discourse.processing.org/t/i-have-an-error-with-divide-float-issue/34762)

<div class="topic-metadata">

**Author:** [@yalaniv](https://discourse.processing.org/u/yalaniv)\
**Replies:** 3\
**Last updated:** [February 6, 2022, 11:48am UTC](https://discourse.processing.org/t/i-have-an-error-with-divide-float-issue/34762 "2022-02-06T11:48:46Z")

</div>

I had a problem with a code, so I wrote a small one, and when I run it, it print 0.0, instead 0.2 What am I missing? void setup(){ noLoop(); } void draw(){ float a = 2/10; println(a); }

---

## [New to class and need a project](https://discourse.processing.org/t/new-to-class-and-need-a-project/34972)

<div class="topic-metadata">

**Author:** [@SharkJulen](https://discourse.processing.org/u/SharkJulen)\
**Replies:** 5\
**Last updated:** [February 5, 2022, 2:47pm UTC](https://discourse.processing.org/t/new-to-class-and-need-a-project/34972 "2022-02-05T14:47:56Z")

</div>

Hello, I have come to a new institute because I have changed and I chose ICT. They ask me for processing but I have no idea and the work counts for 30% of the grade. Help :frowning: This I have to do: Draw on a light…

---

## [How to change the color of a png image to different colors](https://discourse.processing.org/t/how-to-change-the-color-of-a-png-image-to-different-colors/34963)

<div class="topic-metadata">

**Author:** [@joey1](https://discourse.processing.org/u/joey1)\
**Replies:** 2\
**Last updated:** [February 5, 2022, 4:59am UTC](https://discourse.processing.org/t/how-to-change-the-color-of-a-png-image-to-different-colors/34963 "2022-02-05T04:59:13Z")

</div>

I am hoping to know how to write a program that changes the pixels of an image to different colors (ideally it would loop through r,g,b for a variety of colors) tint is not giving the desired effect I want. say if the …

---

## [I need help with my project (IMAGES;Y-AXIS;RANDOM)](https://discourse.processing.org/t/i-need-help-with-my-project-images-y-axis-random/34980)

<div class="topic-metadata">

**Author:** [@studentinneed](https://discourse.processing.org/u/studentinneed)\
**Replies:** 1\
**Last updated:** [February 4, 2022, 10:55pm UTC](https://discourse.processing.org/t/i-need-help-with-my-project-images-y-axis-random/34980 "2022-02-04T22:55:23Z")

</div>

Hi, i am struggeling with an project i have to do for university. I am a beginner and havn’t worked with this program nor was i working on any other coding programs. I study design and have a visual in my head but not t…

---

## [Check if a point is inside of a triangle](https://discourse.processing.org/t/check-if-a-point-is-inside-of-a-triangle/34941)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 4\
**Last updated:** [February 2, 2022, 3:27pm UTC](https://discourse.processing.org/t/check-if-a-point-is-inside-of-a-triangle/34941 "2022-02-02T15:27:33Z")

</div>

Hi, how can I check if a point is inside of a triangle? Is there a mathematical formula for it? And what about any N sided shape? And assuming this is true: Thank you!

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

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