# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=115

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

**Page:** 116

---

## [Why is built-in bezier function more smooth than my custom bezier function?](https://discourse.processing.org/t/why-is-built-in-bezier-function-more-smooth-than-my-custom-bezier-function/31833)

<div class="topic-metadata">

**Author:** [@ibrahimak](https://discourse.processing.org/u/ibrahimak)\
**Replies:** 6\
**Last updated:** [August 25, 2021, 10:39am UTC](https://discourse.processing.org/t/why-is-built-in-bezier-function-more-smooth-than-my-custom-bezier-function/31833 "2021-08-25T10:39:28Z")

</div>

I’ve a linear interpolate function: Vector2 linearInterpolate(Vector2 p1, Vector2 p2, float value) { return p1.add(p2.sub(p1).mult(value)); } I’ve quadratic bezier curve function: Vector2 quadraticBezier(Vector2 p1,…

---

## [I want to change the Flocking](https://discourse.processing.org/t/i-want-to-change-the-flocking/32005)

<div class="topic-metadata">

**Author:** [@aug](https://discourse.processing.org/u/aug)\
**Replies:** 5\
**Last updated:** [September 2, 2021, 8:15am UTC](https://discourse.processing.org/t/i-want-to-change-the-flocking/32005 "2021-09-02T08:15:37Z")

</div>

I want to change the weight of cohesion only for the agent added by clicking in the sample code of Flocking. How do I change the code?

---

## [How get a sketch to run on startup of a Mac](https://discourse.processing.org/t/how-get-a-sketch-to-run-on-startup-of-a-mac/32052)

<div class="topic-metadata">

**Author:** [@GeorgeRoland](https://discourse.processing.org/u/GeorgeRoland)\
**Replies:** 3\
**Last updated:** [September 1, 2021, 11:08pm UTC](https://discourse.processing.org/t/how-get-a-sketch-to-run-on-startup-of-a-mac/32052 "2021-09-01T23:08:54Z")

</div>

I used Export Application in Processing to create an app. No errors were generated when it was created. This app runs fine if you click on it. However, if I put it in Login Items in an account set to auto login, the syst…

---

## [Writing to CSV, new set of rows each day, is it possible?](https://discourse.processing.org/t/writing-to-csv-new-set-of-rows-each-day-is-it-possible/32018)

<div class="topic-metadata">

**Author:** [@laptophead](https://discourse.processing.org/u/laptophead)\
**Replies:** 5\
**Last updated:** [September 1, 2021, 8:35pm UTC](https://discourse.processing.org/t/writing-to-csv-new-set-of-rows-each-day-is-it-possible/32018 "2021-09-01T20:35:02Z")

</div>

I have this recording function that updates every 5 sec and records data as such: void SaveToFile () { //table.clearRows(); //newRow.setInt("MACH ID", table.getRowCount() - 1); for (int i=1; i\<=10; i++) {Tabl…

---

## [Can't load images before setup()](https://discourse.processing.org/t/cant-load-images-before-setup/31998)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 4\
**Last updated:** [September 1, 2021, 8:16pm UTC](https://discourse.processing.org/t/cant-load-images-before-setup/31998 "2021-09-01T20:16:07Z")

</div>

Hi, I am not sure if this is a bug or a feature. Basically, you cannot load files before setup(). Example code PImage img = loadImage("clrPic.jpg"); int p\[\]\[\]; int v\[\]\[\]; void setup() { size(600, 800); p = new int\[…

---

## [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 compare multiple Strings?](https://discourse.processing.org/t/is-there-a-better-way-to-compare-multiple-strings/32024)

<div class="topic-metadata">

**Author:** [@chaotic](https://discourse.processing.org/u/chaotic)\
**Replies:** 4\
**Last updated:** [September 1, 2021, 7:17pm UTC](https://discourse.processing.org/t/is-there-a-better-way-to-compare-multiple-strings/32024 "2021-09-01T19:17:46Z")

</div>

I’m trying to write a code that will only allow you to enter certain numbers. I found a way but I feel like there should be a more efficient way. String text=""; String saved=""; String degree90="90"; String degree89="8…

---

## [How to improve movement with keys?](https://discourse.processing.org/t/how-to-improve-movement-with-keys/31856)

<div class="topic-metadata">

**Author:** [@Braunstein](https://discourse.processing.org/u/Braunstein)\
**Replies:** 9\
**Last updated:** [September 1, 2021, 2:44pm UTC](https://discourse.processing.org/t/how-to-improve-movement-with-keys/31856 "2021-09-01T14:44:52Z")

</div>

Heya, i picked up a project again that i dropped a while ago, and it includes a playable figure that is steered with w, a, s and d. But i noticed how the player would first kinda spazz out and then change direction with …

---

## [Text Input How To?](https://discourse.processing.org/t/text-input-how-to/32031)

<div class="topic-metadata">

**Author:** [@jhsa](https://discourse.processing.org/u/jhsa)\
**Replies:** 4\
**Last updated:** [September 1, 2021, 11:09am UTC](https://discourse.processing.org/t/text-input-how-to/32031 "2021-09-01T11:09:26Z")

</div>

Hi guys, I am stuck with something here. I am making an Eeprom editor for my for my DIY guitar effect switcher and I have implemented an eeprom emulation for it. That is working great. The emulated eeprom bytes are st…

---

## [Select one button from button object array](https://discourse.processing.org/t/select-one-button-from-button-object-array/32034)

<div class="topic-metadata">

**Author:** [@Naison](https://discourse.processing.org/u/Naison)\
**Replies:** 2\
**Last updated:** [September 1, 2021, 8:47am UTC](https://discourse.processing.org/t/select-one-button-from-button-object-array/32034 "2021-09-01T08:47:25Z")

</div>

Hey guys! I’m just experimenting with how to code a system that selects one from multiple buttons in your sketch if clicked on one button and deselects it when clicked on another button so that always just one or none bu…

---

## [How to check if all elements in an array are the same?](https://discourse.processing.org/t/how-to-check-if-all-elements-in-an-array-are-the-same/32044)

<div class="topic-metadata">

**Author:** [@lucaswoah](https://discourse.processing.org/u/lucaswoah)\
**Replies:** 2\
**Last updated:** [September 1, 2021, 5:59am UTC](https://discourse.processing.org/t/how-to-check-if-all-elements-in-an-array-are-the-same/32044 "2021-09-01T05:59:50Z")

</div>

I made this game for my exam where I have this two dimensional (int \[\] \[\] M = new int \[30\]\[30\]) array that has 3 possible values: 0 (black tile), 1 (white tile) and 2 (fruits). The player can click with the left mouse bu…

---

## [How to add score and ending to my game](https://discourse.processing.org/t/how-to-add-score-and-ending-to-my-game/13235)

<div class="topic-metadata">

**Author:** [@Mike92](https://discourse.processing.org/u/Mike92)\
**Replies:** 12\
**Last updated:** [November 3, 2020, 12:22am UTC](https://discourse.processing.org/t/how-to-add-score-and-ending-to-my-game/13235 "2020-11-03T00:22:38Z")

</div>

Hi all, I’m new on this forum. I’ve writing my first game to processing and I’m trying to add score and ending to my game. I’ve just add some lines of code but don’t work. Someone can help me? Here the code: float x = …

---

## [Error Downloading Examples](https://discourse.processing.org/t/error-downloading-examples/32033)

<div class="topic-metadata">

**Author:** [@minami](https://discourse.processing.org/u/minami)\
**Replies:** 1\
**Last updated:** [August 31, 2021, 10:07pm UTC](https://discourse.processing.org/t/error-downloading-examples/32033 "2021-08-31T22:07:37Z")

</div>

Trying to download the Getting Started with Processing, 2nd Edition example and getting the error message “Error during download and install of Getting Started with Processing, 2nd Edition.”, but I’m able to download oth…

---

## [Instantiate class from string](https://discourse.processing.org/t/instantiate-class-from-string/32006)

<div class="topic-metadata">

**Author:** [@molo32](https://discourse.processing.org/u/molo32)\
**Replies:** 2\
**Last updated:** [August 31, 2021, 3:02pm UTC](https://discourse.processing.org/t/instantiate-class-from-string/32006 "2021-08-31T15:02:25Z")

</div>

I googled methods but couldn’t get it to work in processing. what I’m looking for is something like. String s="foo"; void setup(){ parent new\_instance= new s; } class parent{ } class foo extends parent{ }

---

## [Problem with keyPressed() and SPACE](https://discourse.processing.org/t/problem-with-keypressed-and-space/7468)

<div class="topic-metadata">

**Author:** [@JoLi](https://discourse.processing.org/u/JoLi)\
**Replies:** 2\
**Last updated:** [October 27, 2020, 3:52pm UTC](https://discourse.processing.org/t/problem-with-keypressed-and-space/7468 "2020-10-27T15:52:32Z")

</div>

I am new here and with Processing. My Problem is: void keyPressed() { if(key == SPACE) { ellipse(10, 10, 20, 20); } } Processing “says” that “SPACE” is an invalid character constant. I also tried these: void key…

---

## [Slow down an animation](https://discourse.processing.org/t/slow-down-an-animation/10381)

<div class="topic-metadata">

**Author:** [@vincentstrebelle](https://discourse.processing.org/u/vincentstrebelle)\
**Replies:** 16\
**Last updated:** [March 5, 2021, 12:24pm UTC](https://discourse.processing.org/t/slow-down-an-animation/10381 "2021-03-05T12:24:49Z")

</div>

Hi, i found the sequential example to make an animation and i wonder how can i slow down the animation without change the framerate. Is that possible ? here is the example: (https://processing.org/examples/sequential.ht…

---

## [Can't install modes](https://discourse.processing.org/t/cant-install-modes/31859)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 4\
**Last updated:** [August 30, 2021, 9:55pm UTC](https://discourse.processing.org/t/cant-install-modes/31859 "2021-08-30T21:55:32Z")

</div>

the install button doesn’t do anything

---

## [Sketching - "Processing" using Racket as the base language](https://discourse.processing.org/t/sketching-processing-using-racket-as-the-base-language/32010)

<div class="topic-metadata">

**Author:** [@soegaard](https://discourse.processing.org/u/soegaard)\
**Replies:** 6\
**Last updated:** [August 30, 2021, 8:01pm UTC](https://discourse.processing.org/t/sketching-processing-using-racket-as-the-base-language/32010 "2021-08-30T20:01:47Z")

</div>

Hi All, My summer project this year was to make a version of Processing that uses Racket as its base language. Comments are welcome. Check the documentation here: https://soegaard.github.io/sketching/ The Github rep…

---

## [Processing interaction imperfections on Windows](https://discourse.processing.org/t/processing-interaction-imperfections-on-windows/18686)

<div class="topic-metadata">

**Author:** [@RichardDL](https://discourse.processing.org/u/RichardDL)\
**Replies:** 7\
**Last updated:** [August 30, 2021, 5:14pm UTC](https://discourse.processing.org/t/processing-interaction-imperfections-on-windows/18686 "2021-08-30T17:14:33Z")

</div>

Hi These 3 annoy me frequently using Processing on Windows (W10 today). I’m thinking of logging them as issues, but want to see what anyone else thinks first. Keypress doesn’t work until Clicked When the sketch is ru…

---

## [Create 8 clickable circles](https://discourse.processing.org/t/create-8-clickable-circles/32002)

<div class="topic-metadata">

**Author:** [@jhsa](https://discourse.processing.org/u/jhsa)\
**Replies:** 13\
**Last updated:** [August 30, 2021, 2:33am UTC](https://discourse.processing.org/t/create-8-clickable-circles/32002 "2021-08-30T02:33:21Z")

</div>

I have been looking for examples on how to draw 8 clickable circles. The idea is to emulate 8 LEDs, and turn them ON/OFF when clicking on them with the mouse. I have been playing with the example I found (that one with …

---

## [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…

---

## [\[YOLO\] Error msg : RuntimeException: java.lang.Error: Invalid memory access](https://discourse.processing.org/t/yolo-error-msg-runtimeexception-java-lang-error-invalid-memory-access/31822)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 7\
**Last updated:** [August 29, 2021, 11:01pm UTC](https://discourse.processing.org/t/yolo-error-msg-runtimeexception-java-lang-error-invalid-memory-access/31822 "2021-08-29T23:01:17Z")

</div>

library : GitHub - cansik/deep-vision-processing: Deep computer-vision algorithms for the Processing framewo import ch.bildspur.vision.\*; import ch.bildspur.vision.result.\*; DeepVision deepVision = new DeepVision(thi…

---

## [Upload processing file and be able to run it online](https://discourse.processing.org/t/upload-processing-file-and-be-able-to-run-it-online/31816)

<div class="topic-metadata">

**Author:** [@kylu](https://discourse.processing.org/u/kylu)\
**Replies:** 5\
**Last updated:** [August 29, 2021, 8:53pm UTC](https://discourse.processing.org/t/upload-processing-file-and-be-able-to-run-it-online/31816 "2021-08-29T20:53:11Z")

</div>

hi, I need to know a way to upload my files to a server so that they can be executed online, without having to download

---

## [Why am I having the NullPointerException error?](https://discourse.processing.org/t/why-am-i-having-the-nullpointerexception-error/31876)

<div class="topic-metadata">

**Author:** [@jhsa](https://discourse.processing.org/u/jhsa)\
**Replies:** 4\
**Last updated:** [August 27, 2021, 7:00pm UTC](https://discourse.processing.org/t/why-am-i-having-the-nullpointerexception-error/31876 "2021-08-27T19:00:23Z")

</div>

Hi guys. I can’t understand why I am getting this NullPointerException error, and the line “text(FileName, width/2, 146);” is highlighted. Thanks for your help once again. João import controlP5.\*; ControlP5 cp5; Dr…

---

## [Tabs, Set font and position with controlP5](https://discourse.processing.org/t/tabs-set-font-and-position-with-controlp5/31925)

<div class="topic-metadata">

**Author:** [@jhsa](https://discourse.processing.org/u/jhsa)\
**Replies:** 9\
**Last updated:** [August 29, 2021, 12:54pm UTC](https://discourse.processing.org/t/tabs-set-font-and-position-with-controlp5/31925 "2021-08-29T12:54:06Z")

</div>

Guys, I am trying to set the position of the tabs in “Processing” but that doesn’t work. Also using “.setFont(font1)” throws a “NullPointerException” error. :frowning: This also doesn’t do anything " setPosition(float,…

---

## [I'm trying to repeat schultzschultzgrafik](https://discourse.processing.org/t/im-trying-to-repeat-schultzschultzgrafik/23872)

<div class="topic-metadata">

**Author:** [@perelacha](https://discourse.processing.org/u/perelacha)\
**Replies:** 5\
**Last updated:** [August 29, 2021, 11:42am UTC](https://discourse.processing.org/t/im-trying-to-repeat-schultzschultzgrafik/23872 "2021-08-29T11:42:43Z")

</div>

Hello. I am new to coding. I’m trying to repeat schultzschultzgrafik https://www.instagram.com/p/CD4h9QCirXH/ That’s what I did. PImage img; float xStep, yStep; int xCount = 100; int yCount = 100; int m = 10, s = 5, …

---

## [Copy image from clipboard processing 3.x](https://discourse.processing.org/t/copy-image-from-clipboard-processing-3-x/31994)

<div class="topic-metadata">

**Author:** [@robottini](https://discourse.processing.org/u/robottini)\
**Replies:** 1\
**Last updated:** [August 29, 2021, 9:59am UTC](https://discourse.processing.org/t/copy-image-from-clipboard-processing-3-x/31994 "2021-08-29T09:59:20Z")

</div>

Hi I have this code for clipboard image copy to processing. It works well for processing 2.x but not for processing 3.x. I know that java.awt.Applet is no longer the base class used by PApplet, but I can’t identify an al…

---

## [Loops with diagonal queues](https://discourse.processing.org/t/loops-with-diagonal-queues/31850)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 18\
**Last updated:** [August 26, 2021, 4:01pm UTC](https://discourse.processing.org/t/loops-with-diagonal-queues/31850 "2021-08-26T16:01:53Z")

</div>

Hi there! I am learning about loops with “for” with a useful tutorial. I have made a pattern with few lines of code (amazing!). But the pattern that I really want to do has diagonal lines of points, as you can see on the…

---

## [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…

[Previous page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=114)

[Next page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=116)
