# Processing

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

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

**Page:** 130

---

## [How do i pass a class type into a function](https://discourse.processing.org/t/how-do-i-pass-a-class-type-into-a-function/30337)

<div class="topic-metadata">

**Author:** [@canslp](https://discourse.processing.org/u/canslp)\
**Replies:** 10\
**Last updated:** [May 30, 2021, 2:19pm UTC](https://discourse.processing.org/t/how-do-i-pass-a-class-type-into-a-function/30337 "2021-05-30T14:19:10Z")

</div>

maybe i’m going about this wrong, but i have a base class with a run function, and i want each child class to be able to pass a different class type into it when they use it. the base class is called ‘spawner’, and each…

---

## [Processing.sound: Target VM failed](https://discourse.processing.org/t/processing-sound-target-vm-failed/30186)

<div class="topic-metadata">

**Author:** [@pokelan](https://discourse.processing.org/u/pokelan)\
**Replies:** 1\
**Last updated:** [May 30, 2021, 11:11am UTC](https://discourse.processing.org/t/processing-sound-target-vm-failed/30186 "2021-05-30T11:11:59Z")

</div>

Hi all I am using Processing 3.5.4 on linux. According to the Contribution Manager the sound library from The Processing Foundation is installed. I tried to run this code from the Sound tutorial (Sound \\ Processing.org)…

---

## ["Offline" Rendering?](https://discourse.processing.org/t/offline-rendering/5239)

<div class="topic-metadata">

**Author:** [@namke](https://discourse.processing.org/u/namke)\
**Replies:** 4\
**Last updated:** [May 29, 2021, 5:11am UTC](https://discourse.processing.org/t/offline-rendering/5239 "2021-05-29T05:11:06Z")

</div>

I have a sketch which responds to some audio, and I am happy with how it works. If I feed it a soundfile, that also works as expected. My problem occurs when I want to capture the resultant images to disc, so that I can …

---

## [Difference between typography and strings?](https://discourse.processing.org/t/difference-between-typography-and-strings/30332)

<div class="topic-metadata">

**Author:** [@Dun](https://discourse.processing.org/u/Dun)\
**Replies:** 3\
**Last updated:** [May 28, 2021, 1:43pm UTC](https://discourse.processing.org/t/difference-between-typography-and-strings/30332 "2021-05-28T13:43:43Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hi, I’m new to Processing and coding in general. What is the difference between strings generated class of text versus the typography text() fea…

---

## [SpriteSheet Loader Nullpointer Why?](https://discourse.processing.org/t/spritesheet-loader-nullpointer-why/30334)

<div class="topic-metadata">

**Author:** [@Tanghe](https://discourse.processing.org/u/Tanghe)\
**Replies:** 1\
**Last updated:** [May 28, 2021, 11:06am UTC](https://discourse.processing.org/t/spritesheet-loader-nullpointer-why/30334 "2021-05-28T11:06:58Z")

</div>

Hello so when i try using the code below i get a nullpointer on line 36 and i dont c why. Anny help is welcomed. class Sprite { int numRows, numCols; int posX, posY; int counter; PImage img; int partW, partH;…

---

## [\[Help\] Add random flicker to pixel sorting](https://discourse.processing.org/t/help-add-random-flicker-to-pixel-sorting/30299)

<div class="topic-metadata">

**Author:** [@cwe2000](https://discourse.processing.org/u/cwe2000)\
**Replies:** 3\
**Last updated:** [May 28, 2021, 9:20am UTC](https://discourse.processing.org/t/help-add-random-flicker-to-pixel-sorting/30299 "2021-05-28T09:20:27Z")

</div>

Hey so I’m attempting to add a random flicker to the rendered image having the script select two random values for the pixel sort and have it flick between them. Potentially saving as a GIF or video. Here is the scri…

---

## [BoofCV camera calibration error](https://discourse.processing.org/t/boofcv-camera-calibration-error/30286)

<div class="topic-metadata">

**Author:** [@samuset](https://discourse.processing.org/u/samuset)\
**Replies:** 1\
**Last updated:** [May 26, 2021, 8:29pm UTC](https://discourse.processing.org/t/boofcv-camera-calibration-error/30286 "2021-05-26T20:29:03Z")

</div>

Hi, I’m trying to use the camera calibration tool provided by the BoofCV library here, following the tutorial here. My command is as follows: java -jar applications.jar CameraCalibration --Camera=0 --Resolution=640:360…

---

## [Trying to create a billiard game](https://discourse.processing.org/t/trying-to-create-a-billiard-game/30318)

<div class="topic-metadata">

**Author:** [@iox007](https://discourse.processing.org/u/iox007)\
**Replies:** 5\
**Last updated:** [May 26, 2021, 8:21pm UTC](https://discourse.processing.org/t/trying-to-create-a-billiard-game/30318 "2021-05-26T20:21:58Z")

</div>

Hey everyone, So my teacher gave me a task to create a billiard game which in all honesty is very very challenging. So far i have managed to create something but im stuggling with two issues: How can i aim the white ba…

---

## [P3D running extremely slow](https://discourse.processing.org/t/p3d-running-extremely-slow/30302)

<div class="topic-metadata">

**Author:** [@123](https://discourse.processing.org/u/123)\
**Replies:** 3\
**Last updated:** [May 26, 2021, 3:58pm UTC](https://discourse.processing.org/t/p3d-running-extremely-slow/30302 "2021-05-26T15:58:40Z")

</div>

Guys pls help I don’t know why this code runs really slow. //SEQUENCES OF MOVING CIRCLES float xPosition = 0; float yPosition; float aPosition = 0; float bPosition; float onePosition = 0; float twoPosition; float…

---

## [Collision of Circles and Lines](https://discourse.processing.org/t/collision-of-circles-and-lines/30296)

<div class="topic-metadata">

**Author:** [@SodaPopPop](https://discourse.processing.org/u/SodaPopPop)\
**Replies:** 1\
**Last updated:** [May 26, 2021, 3:28am UTC](https://discourse.processing.org/t/collision-of-circles-and-lines/30296 "2021-05-26T03:28:45Z")

</div>

Update: oh silly me, it seems like the code is working after all. I just wasn’t proficient at the game enough at first. Hello! I want to keep track of scores every time the “tail end” of a line touches a bouncing circle…

---

## [Processing Golf Game](https://discourse.processing.org/t/processing-golf-game/30293)

<div class="topic-metadata">

**Author:** [@alexpapacosta](https://discourse.processing.org/u/alexpapacosta)\
**Replies:** 1\
**Last updated:** [May 26, 2021, 12:08am UTC](https://discourse.processing.org/t/processing-golf-game/30293 "2021-05-26T00:08:16Z")

</div>

Hi all, I have exported my file from Processing and I am trying to upload it for a uni assignment. The file is too large and it won’t allow me too. How can I make this smaller?

---

## [Movie Maker using incorrect image order](https://discourse.processing.org/t/movie-maker-using-incorrect-image-order/30281)

<div class="topic-metadata">

**Author:** [@RFullum](https://discourse.processing.org/u/RFullum)\
**Replies:** 2\
**Last updated:** [May 25, 2021, 10:06pm UTC](https://discourse.processing.org/t/movie-maker-using-incorrect-image-order/30281 "2021-05-25T22:06:04Z")

</div>

I have a sketch that is a grid of squares, 10 down, 15 across. Among other animations, what it does is start on the top left square and spin it around. Then it goes across the first row, spinning each square one by one. …

---

## [Animated colors on a moving object](https://discourse.processing.org/t/animated-colors-on-a-moving-object/30278)

<div class="topic-metadata">

**Author:** [@int](https://discourse.processing.org/u/int)\
**Replies:** 1\
**Last updated:** [May 25, 2021, 3:08pm UTC](https://discourse.processing.org/t/animated-colors-on-a-moving-object/30278 "2021-05-25T15:08:02Z")

</div>

Hi! I’m trying to add animated colors to this ellipse that is moving back and forth when a key is pressed, but I can’t figure out what’s the problem in my code, as the color changes immediately from yellow to red when th…

---

## [Servo turn opposite direction](https://discourse.processing.org/t/servo-turn-opposite-direction/30166)

<div class="topic-metadata">

**Author:** [@doni](https://discourse.processing.org/u/doni)\
**Replies:** 5\
**Last updated:** [May 25, 2021, 2:36pm UTC](https://discourse.processing.org/t/servo-turn-opposite-direction/30166 "2021-05-25T14:36:35Z")

</div>

hi forum. i was able to track the object coordinate in the screen/lcd based on color and plan to direct the middle camera attached to pantilt arm every time the object moves. but the result is the horizontal servo always…

---

## [Loops with different colors](https://discourse.processing.org/t/loops-with-different-colors/30257)

<div class="topic-metadata">

**Author:** [@Kenga123456](https://discourse.processing.org/u/Kenga123456)\
**Replies:** 2\
**Last updated:** [May 25, 2021, 1:52pm UTC](https://discourse.processing.org/t/loops-with-different-colors/30257 "2021-05-25T13:52:28Z")

</div>

why doesn’t this code work? color\[\] c = new color \[6\]; int x; int l; void setup(){ size(900, 550); c\[0\]=color(8,100, 0); c\[1\]=color(12); c\[2\]=color(16); c\[3\]=color(4); c\[4\]=color(4); c\[5\]=color(4)…

---

## [Activate webcam at certain time while playing video](https://discourse.processing.org/t/activate-webcam-at-certain-time-while-playing-video/30215)

<div class="topic-metadata">

**Author:** [@saskia\_NL](https://discourse.processing.org/u/saskia_NL)\
**Replies:** 6\
**Last updated:** [May 25, 2021, 4:09am UTC](https://discourse.processing.org/t/activate-webcam-at-certain-time-while-playing-video/30215 "2021-05-25T04:09:11Z")

</div>

Hi all, I want to play a video in processing and 1 minute and 34 seconds into the video I want to implement live video footage from the webcam. This is how far I’ve come. How can I activate the webcam 1 minute and 34 …

---

## [Eyeball moving effect](https://discourse.processing.org/t/eyeball-moving-effect/30261)

<div class="topic-metadata">

**Author:** [@isaf12](https://discourse.processing.org/u/isaf12)\
**Replies:** 1\
**Last updated:** [May 24, 2021, 9:50pm UTC](https://discourse.processing.org/t/eyeball-moving-effect/30261 "2021-05-24T21:50:59Z")

</div>

Hi, I’m new to this. I wanted to created one simple eyeball with two ellipses. One being bigger for the white part of the eye and the other ellipse a little smaller which is the iris, the black part of the eye. I can get…

---

## [An undo and redo button for my drawing program](https://discourse.processing.org/t/an-undo-and-redo-button-for-my-drawing-program/30194)

<div class="topic-metadata">

**Author:** [@Kenga123456](https://discourse.processing.org/u/Kenga123456)\
**Replies:** 17\
**Last updated:** [May 24, 2021, 9:07pm UTC](https://discourse.processing.org/t/an-undo-and-redo-button-for-my-drawing-program/30194 "2021-05-24T21:07:18Z")

</div>

I have seen other peoples code of how to do it but I can’t seem to fully understand how it works. Especially when they have arrays and stuff. Someone please explain to me.

---

## [Animation layers](https://discourse.processing.org/t/animation-layers/30247)

<div class="topic-metadata">

**Author:** [@WUW](https://discourse.processing.org/u/WUW)\
**Replies:** 6\
**Last updated:** [May 24, 2021, 5:24pm UTC](https://discourse.processing.org/t/animation-layers/30247 "2021-05-24T17:24:39Z")

</div>

Hi, I have this very simple animation. Rects drawing one by one on the sketch window. I want at the sametine a line to animate from left to right. Without leaving its trail. I tried animate translate, pop and push, backg…

---

## [Connecting Points with a Line](https://discourse.processing.org/t/connecting-points-with-a-line/30243)

<div class="topic-metadata">

**Author:** [@SodaPopPop](https://discourse.processing.org/u/SodaPopPop)\
**Replies:** 5\
**Last updated:** [May 24, 2021, 1:05pm UTC](https://discourse.processing.org/t/connecting-points-with-a-line/30243 "2021-05-24T13:05:22Z")

</div>

Hello all! This is a continuation of my project from here! It is a bouncing ball that starts in random location with a random gravity acting on it. If you press with a mouse the velocity increases. There’s a chance the …

---

## [Infrared remote control](https://discourse.processing.org/t/infrared-remote-control/29301)

<div class="topic-metadata">

**Author:** [@jafal](https://discourse.processing.org/u/jafal)\
**Replies:** 9\
**Last updated:** [May 23, 2021, 8:36pm UTC](https://discourse.processing.org/t/infrared-remote-control/29301 "2021-05-23T20:36:50Z")

</div>

I found this sketch on a Japanese site and it has several errors i fix some of them but still not working any help thanks everyone import processing.serial.\*; Serial myPort ; int \[\] recv\_data = new int \[ 20…

---

## [Using scale() to rotate a moving gif](https://discourse.processing.org/t/using-scale-to-rotate-a-moving-gif/30230)

<div class="topic-metadata">

**Author:** [@Blomer478](https://discourse.processing.org/u/Blomer478)\
**Replies:** 4\
**Last updated:** [May 23, 2021, 7:55pm UTC](https://discourse.processing.org/t/using-scale-to-rotate-a-moving-gif/30230 "2021-05-23T19:55:51Z")

</div>

I’ve been trying to make this work for a good couple of hours but I really can’t see what is wrong. I have an animated gif that goes from left to right and once it get out of the screen it goes back to the left, that wo…

---

## [It's a question about how to use the code of ''Clear''](https://discourse.processing.org/t/its-a-question-about-how-to-use-the-code-of-clear/30236)

<div class="topic-metadata">

**Author:** [@yun](https://discourse.processing.org/u/yun)\
**Replies:** 6\
**Last updated:** [May 23, 2021, 12:54pm UTC](https://discourse.processing.org/t/its-a-question-about-how-to-use-the-code-of-clear/30236 "2021-05-23T12:54:15Z")

</div>

I have some problems when I write code. I try to design a game like a gold miner, and I want to use the left and right keys to move my hook. But when I write codes like this: function setup() { createCanvas(windowWidth…

---

## [ArrayOutOfBoundException for pixels](https://discourse.processing.org/t/arrayoutofboundexception-for-pixels/30214)

<div class="topic-metadata">

**Author:** [@res56](https://discourse.processing.org/u/res56)\
**Replies:** 3\
**Last updated:** [May 23, 2021, 10:00am UTC](https://discourse.processing.org/t/arrayoutofboundexception-for-pixels/30214 "2021-05-23T10:00:36Z")

</div>

Why do I get an ArrayOutOfBoundException for this code? void setup(){ size(400,400); } void draw(){ background(44); loadPixels(); for(int x=0; x \< width; x++){ for(int y=0; y \< height; y++){ int index=(x+y\*width…

---

## [Debugging ArrayIndexOutOfBoundsException](https://discourse.processing.org/t/debugging-arrayindexoutofboundsexception/29988)

<div class="topic-metadata">

**Author:** [@elenanito](https://discourse.processing.org/u/elenanito)\
**Replies:** 5\
**Last updated:** [May 9, 2021, 10:01pm UTC](https://discourse.processing.org/t/debugging-arrayindexoutofboundsexception/29988 "2021-05-09T22:01:40Z")

</div>

I got this exception and the console says: java.lang.ArrayIndexOutOfBoundsException: 8 at programName.function(projectName.java:84) But there is nothing but comments on line 84 . my program has over 2000 lines so…

---

## [Resizing a PGraphics](https://discourse.processing.org/t/resizing-a-pgraphics/30227)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 3\
**Last updated:** [May 23, 2021, 10:29am UTC](https://discourse.processing.org/t/resizing-a-pgraphics/30227 "2021-05-23T10:29:34Z")

</div>

I’ve seen there’s been a previous post about this and thats great as the answer has technically already been posted, however I wanted to know what limitations this might have if i’m planning on making use of resize every…

---

## [MacOS microphone access](https://discourse.processing.org/t/macos-microphone-access/30096)

<div class="topic-metadata">

**Author:** [@Christian](https://discourse.processing.org/u/Christian)\
**Replies:** 1\
**Last updated:** [May 22, 2021, 4:10pm UTC](https://discourse.processing.org/t/macos-microphone-access/30096 "2021-05-22T16:10:53Z")

</div>

I have troubles giving my Processing application the necessary microphone access as MacOS (Big Sur in my case) doesn’t open the permission window. I know the issue was discussed here and I did find a workaround opening …

---

## [If (int(geschlecht.charAt(0)) == 119) works, but if (geschlecht == "m") not](https://discourse.processing.org/t/if-int-geschlecht-charat-0-119-works-but-if-geschlecht-m-not/30212)

<div class="topic-metadata">

**Author:** [@Joghurt](https://discourse.processing.org/u/Joghurt)\
**Replies:** 7\
**Last updated:** [May 22, 2021, 1:16pm UTC](https://discourse.processing.org/t/if-int-geschlecht-charat-0-119-works-but-if-geschlecht-m-not/30212 "2021-05-22T13:16:52Z")

</div>

Hi I have a comprehension problem right now. I have a csv table which has, among other things, the column “GESCHLECHT\_HUND” with the possible entries “w” and “m” of type String. When I program it like this it doesn’t w…

---

## [Overlap multiple PGraphics with copy() function](https://discourse.processing.org/t/overlap-multiple-pgraphics-with-copy-function/30177)

<div class="topic-metadata">

**Author:** [@afkqs](https://discourse.processing.org/u/afkqs)\
**Replies:** 1\
**Last updated:** [May 22, 2021, 10:20am UTC](https://discourse.processing.org/t/overlap-multiple-pgraphics-with-copy-function/30177 "2021-05-22T10:20:42Z")

</div>

Hi there, I’m trying to overlap multiple fades using the copy() function that was suggested to me in a previous topic. My issue is that, as the top layer is fading away, because the shape is copied to the top of the ca…

---

## [How to use Processing 3d in IntelliJ using core library?](https://discourse.processing.org/t/how-to-use-processing-3d-in-intellij-using-core-library/30207)

<div class="topic-metadata">

**Author:** [@Eliott](https://discourse.processing.org/u/Eliott)\
**Replies:** 2\
**Last updated:** [May 22, 2021, 9:00am UTC](https://discourse.processing.org/t/how-to-use-processing-3d-in-intellij-using-core-library/30207 "2021-05-22T09:00:23Z")

</div>

i have this code: import processing.core.PApplet; public class Main extends PApplet { public void settings() { size(800,600, P3D); } public void setup() { } public void draw() { b…

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

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