# Processing

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

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

**Page:** 303

---

## [Conditional inside an IF](https://discourse.processing.org/t/conditional-inside-an-if/10790)

<div class="topic-metadata">

**Author:** [@chaps421](https://discourse.processing.org/u/chaps421)\
**Replies:** 4\
**Last updated:** [May 3, 2019, 2:15pm UTC](https://discourse.processing.org/t/conditional-inside-an-if/10790 "2019-05-03T14:15:49Z")

</div>

is there a way to put a conditional inside an of stament? for for (int i=0; i\<10; i++){ if(i==col(i).size ){//col1 or col2... col 9 depending on the i //whatever you want } } what i am currently using is t…

---

## [Problem using VideoExport in Eclipse](https://discourse.processing.org/t/problem-using-videoexport-in-eclipse/7374)

<div class="topic-metadata">

**Author:** [@vjjv](https://discourse.processing.org/u/vjjv)\
**Replies:** 8\
**Last updated:** [May 3, 2019, 11:19am UTC](https://discourse.processing.org/t/problem-using-videoexport-in-eclipse/7374 "2019-05-03T11:19:47Z")

</div>

hello @hamoid! im trying to use your librarie in Eclipse… but the console show me this error: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/sun/jna/platform/win32/Wincon at processing.opengl.PSurfaceJ…

---

## [Issue with using array after splitTokens()](https://discourse.processing.org/t/issue-with-using-array-after-splittokens/10826)

<div class="topic-metadata">

**Author:** [@eezJerome](https://discourse.processing.org/u/eezJerome)\
**Replies:** 5\
**Last updated:** [May 3, 2019, 10:46am UTC](https://discourse.processing.org/t/issue-with-using-array-after-splittokens/10826 "2019-05-03T10:46:52Z")

</div>

Hello. This can be considered an extension of my previous thread here Using two different readStringUntil "characters" Now, I am working on a basic Arduino project, but for understand Processing, I am now using a poten…

---

## [Simple arduino to processing serial not outputting anything](https://discourse.processing.org/t/simple-arduino-to-processing-serial-not-outputting-anything/10837)

<div class="topic-metadata">

**Author:** [@eezJerome](https://discourse.processing.org/u/eezJerome)\
**Replies:** 5\
**Last updated:** [May 3, 2019, 7:56am UTC](https://discourse.processing.org/t/simple-arduino-to-processing-serial-not-outputting-anything/10837 "2019-05-03T07:56:24Z")

</div>

I understand that it might be annoying that I am posting on a different thread for the same project, but it is a different code and approach, so I thought it was appropriate to do this. I have literally been at this thi…

---

## [Game Error (NullPointerException)](https://discourse.processing.org/t/game-error-nullpointerexception/10856)

<div class="topic-metadata">

**Author:** [@hannieways](https://discourse.processing.org/u/hannieways)\
**Replies:** 6\
**Last updated:** [May 3, 2019, 12:56am UTC](https://discourse.processing.org/t/game-error-nullpointerexception/10856 "2019-05-03T00:56:58Z")

</div>

I’m currently trying to create a game for my computer science class and I’m having a bit of a rocky start, to be honest. What I have below is the basis of the game but I’m running into a problem when I run the code. It d…

---

## [Why does Type inference not work in the Processing editor?](https://discourse.processing.org/t/why-does-type-inference-not-work-in-the-processing-editor/10467)

<div class="topic-metadata">

**Author:** [@LoliProcessor](https://discourse.processing.org/u/LoliProcessor)\
**Replies:** 24\
**Last updated:** [May 2, 2019, 9:41pm UTC](https://discourse.processing.org/t/why-does-type-inference-not-work-in-the-processing-editor/10467 "2019-05-02T21:41:25Z")

</div>

With Type inference I mean List\<Type\> list = new ArrayList\<\>(); unexpected token: \> Why is that? To provide “further research” (I can feel the toxicity of excessive StackOverflow usage flowing in my veins) I suspect…

---

## [Pixel distortion](https://discourse.processing.org/t/pixel-distortion/10783)

<div class="topic-metadata">

**Author:** [@Avishay](https://discourse.processing.org/u/Avishay)\
**Replies:** 4\
**Last updated:** [May 2, 2019, 9:33pm UTC](https://discourse.processing.org/t/pixel-distortion/10783 "2019-05-02T21:33:59Z")

</div>

Hey! I’m trying to understand which code was used on this work: Someone has an idea? :slight\_smile:

---

## [Why is the result fo the shader black?](https://discourse.processing.org/t/why-is-the-result-fo-the-shader-black/10850)

<div class="topic-metadata">

**Author:** [@clankill3r](https://discourse.processing.org/u/clankill3r)\
**Replies:** 1\
**Last updated:** [May 2, 2019, 8:41pm UTC](https://discourse.processing.org/t/why-is-the-result-fo-the-shader-black/10850 "2019-05-02T20:41:25Z")

</div>

I try to port: https://www.shadertoy.com/view/XssSzN Here is the sketch: PShader shader; void setup() { size(800, 600, P2D); shader = loadShader("metaballs.frag"); } void draw() { shader.set("iTime", (…

---

## [Using Minim to Play Sounds in States](https://discourse.processing.org/t/using-minim-to-play-sounds-in-states/10639)

<div class="topic-metadata">

**Author:** [@danikc8](https://discourse.processing.org/u/danikc8)\
**Replies:** 5\
**Last updated:** [May 2, 2019, 4:49pm UTC](https://discourse.processing.org/t/using-minim-to-play-sounds-in-states/10639 "2019-05-02T16:49:27Z")

</div>

Hi there! This is my first Processing project and I’m having some difficulty with the sounds playing when I want them to. I want the player1 clip to start looping in the stateMainScreen but I can’t figure out how to get …

---

## [Loop a sound by using minim](https://discourse.processing.org/t/loop-a-sound-by-using-minim/10802)

<div class="topic-metadata">

**Author:** [@jensemand](https://discourse.processing.org/u/jensemand)\
**Replies:** 2\
**Last updated:** [May 2, 2019, 3:03pm UTC](https://discourse.processing.org/t/loop-a-sound-by-using-minim/10802 "2019-05-02T15:03:53Z")

</div>

Hi, I am trying to play a sound by using the library: minim when a variable becomes true. The problem occurs when I want to loop the sound when it is done playing so it would be nice if I could get a simple example to s…

---

## [Help with data.csv code](https://discourse.processing.org/t/help-with-data-csv-code/10763)

<div class="topic-metadata">

**Author:** [@Seyfi](https://discourse.processing.org/u/Seyfi)\
**Replies:** 11\
**Last updated:** [May 2, 2019, 2:53pm UTC](https://discourse.processing.org/t/help-with-data-csv-code/10763 "2019-05-02T14:53:07Z")

</div>

Hello I am trying to run the code which is from processing.org and using data.csv file, but I am getting the following error: This tabel has no column named x. The code is as following Table table; Bubble\[\] bubbles; …

---

## [Arraylist full of functions?](https://discourse.processing.org/t/arraylist-full-of-functions/10786)

<div class="topic-metadata">

**Author:** [@DerekCresswell](https://discourse.processing.org/u/DerekCresswell)\
**Replies:** 6\
**Last updated:** [May 2, 2019, 2:14pm UTC](https://discourse.processing.org/t/arraylist-full-of-functions/10786 "2019-05-02T14:14:22Z")

</div>

I need to store a list of functions that I can execute from said array. I also need to be able to pass them as variables. Lambda doesn’t seem to work in processing. How can I do this? Thanks!

---

## [Trouble with the Serial port read](https://discourse.processing.org/t/trouble-with-the-serial-port-read/10724)

<div class="topic-metadata">

**Author:** [@laptophead](https://discourse.processing.org/u/laptophead)\
**Replies:** 5\
**Last updated:** [May 2, 2019, 12:29pm UTC](https://discourse.processing.org/t/trouble-with-the-serial-port-read/10724 "2019-05-02T12:29:11Z")

</div>

I am getting a periodic string from an Arduino Mega, about once a second. I parse it and get various values from it. About every 20 messages I get this weird error, and I dont know why. Here is my receiving code wh…

---

## [Can "return" be applied to a String?](https://discourse.processing.org/t/can-return-be-applied-to-a-string/10823)

<div class="topic-metadata">

**Author:** [@laptophead](https://discourse.processing.org/u/laptophead)\
**Replies:** 3\
**Last updated:** [May 2, 2019, 12:08pm UTC](https://discourse.processing.org/t/can-return-be-applied-to-a-string/10823 "2019-05-02T12:08:43Z")

</div>

I wrote this little function to convert miliseconds to Human readible time. I would like to use “return” to make life simple. So I tried: void MsConversion(int MS) { int totalSec= (MS / 1000); int seconds = (MS / 10…

---

## [How to ask a question and receive and answer](https://discourse.processing.org/t/how-to-ask-a-question-and-receive-and-answer/10814)

<div class="topic-metadata">

**Author:** [@MichaelGuillet](https://discourse.processing.org/u/MichaelGuillet)\
**Replies:** 2\
**Last updated:** [May 2, 2019, 10:59am UTC](https://discourse.processing.org/t/how-to-ask-a-question-and-receive-and-answer/10814 "2019-05-02T10:59:27Z")

</div>

I am coming from a background in coding in scratch i know how lame that sounds but i have a couple of questions on how to ask a question like you can in scratch and set the answer to a variable. Also how to make clickabl…

---

## [If hovering over? pic paste, rotate friendly (detects if over transparent parts of img)](https://discourse.processing.org/t/if-hovering-over-pic-paste-rotate-friendly-detects-if-over-transparent-parts-of-img/10662)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 4\
**Last updated:** [May 2, 2019, 2:43am UTC](https://discourse.processing.org/t/if-hovering-over-pic-paste-rotate-friendly-detects-if-over-transparent-parts-of-img/10662 "2019-05-02T02:43:57Z")

</div>

Hi, i’ve been wondering how to detect if mouse (or just X and Y cords) is hovering over an image, and if the image is transparent at x y it isnt hovering over. So if you r hovering over transparent part of img it returns…

---

## [Animation (Link Isn't Showing!)](https://discourse.processing.org/t/animation-link-isnt-showing/10824)

<div class="topic-metadata">

**Author:** [@leeke](https://discourse.processing.org/u/leeke)\
**Replies:** 1\
**Last updated:** [May 2, 2019, 12:19am UTC](https://discourse.processing.org/t/animation-link-isnt-showing/10824 "2019-05-02T00:19:49Z")

</div>

I’m a beginner in coding and I’m trying to make a game. I only have the very basics right now but I seem to be having a problem. Link (the character I’m using for the game) Isn’t showing up on the screen when I run the p…

---

## [Maze Game Simple Question](https://discourse.processing.org/t/maze-game-simple-question/10816)

<div class="topic-metadata">

**Author:** [@GuerillaGirl](https://discourse.processing.org/u/GuerillaGirl)\
**Replies:** 1\
**Last updated:** [May 1, 2019, 10:29pm UTC](https://discourse.processing.org/t/maze-game-simple-question/10816 "2019-05-01T22:29:52Z")

</div>

Here is the code that we have. We need to know how to make the dot go faster because when we start it moves slow. We just need to know how to increase the speed of the ellipse. We are beginners! PImage GreenMaze; int x …

---

## [Creating a brush texture](https://discourse.processing.org/t/creating-a-brush-texture/10701)

<div class="topic-metadata">

**Author:** [@saitam95](https://discourse.processing.org/u/saitam95)\
**Replies:** 5\
**Last updated:** [May 1, 2019, 10:12pm UTC](https://discourse.processing.org/t/creating-a-brush-texture/10701 "2019-05-01T22:12:26Z")

</div>

Hi, english isn’t my native language so I’m sorry in advance for any spelling mistakes/awkward writing. I’m in need for some help for a college project and I’d appreciate any kind of guidance you can give me. So, the pr…

---

## [Trouble with Array and Multiple Classes](https://discourse.processing.org/t/trouble-with-array-and-multiple-classes/10731)

<div class="topic-metadata">

**Author:** [@hemicyon](https://discourse.processing.org/u/hemicyon)\
**Replies:** 1\
**Last updated:** [May 1, 2019, 9:12pm UTC](https://discourse.processing.org/t/trouble-with-array-and-multiple-classes/10731 "2019-05-01T21:12:35Z")

</div>

Goal: I am trying to create an array of amoebae (Amies) drawn with beginShape() inside their class (Amy). I am also trying to feed only one Amy within the array. Problem 1: I can create an array of Amies with food funct…

---

## [Using Processing Core Library like a console application, no window](https://discourse.processing.org/t/using-processing-core-library-like-a-console-application-no-window/10800)

<div class="topic-metadata">

**Author:** [@TheFoxarmy](https://discourse.processing.org/u/TheFoxarmy)\
**Replies:** 2\
**Last updated:** [May 1, 2019, 9:02pm UTC](https://discourse.processing.org/t/using-processing-core-library-like-a-console-application-no-window/10800 "2019-05-01T21:02:39Z")

</div>

Hello, I’d like to use the processing core library, however, I don’t actually want to use the processing window or draw function at all. I’m using processing because the PImage class and some other utilities are very use…

---

## [Help with bezier for clock hand with teardrop shape](https://discourse.processing.org/t/help-with-bezier-for-clock-hand-with-teardrop-shape/10797)

<div class="topic-metadata">

**Author:** [@ottenm](https://discourse.processing.org/u/ottenm)\
**Replies:** 3\
**Last updated:** [May 1, 2019, 12:04pm UTC](https://discourse.processing.org/t/help-with-bezier-for-clock-hand-with-teardrop-shape/10797 "2019-05-01T12:04:17Z")

</div>

I’m hoping to draw a shape matching the hour hand on the clock below. I’ve made a few runs at the teardrop part with bezier(), but nothing clicking yet. Thanks for any help!

---

## [Intersection between point and plane in 3D or more](https://discourse.processing.org/t/intersection-between-point-and-plane-in-3d-or-more/10780)

<div class="topic-metadata">

**Author:** [@Stanlepunk](https://discourse.processing.org/u/Stanlepunk)\
**Replies:** 15\
**Last updated:** [May 1, 2019, 9:23am UTC](https://discourse.processing.org/t/intersection-between-point-and-plane-in-3d-or-more/10780 "2019-05-01T09:23:14Z")

</div>

I try to find a way to know if a 3D point is in a 3D plane or not, but I don’t find a clear topic to do that in Java or in Processing. If any body have a topic or code to do that I’m very interesting. Topics about 3D in…

---

## [Minim — getLineIn](https://discourse.processing.org/t/minim-getlinein/10801)

<div class="topic-metadata">

**Author:** [@lnp](https://discourse.processing.org/u/lnp)\
**Replies:** 2\
**Last updated:** [May 1, 2019, 9:22am UTC](https://discourse.processing.org/t/minim-getlinein/10801 "2019-05-01T09:22:41Z")

</div>

Hello Preeps! Loving Minim. What a great library! I have no problem reading an mp3 or getting a simple getLineIn() input from the microphone on my mac. All those tests work and my sketch reacts accordingly. My issue now…

---

## [Sprites animation that use a lot of memory](https://discourse.processing.org/t/sprites-animation-that-use-a-lot-of-memory/10695)

<div class="topic-metadata">

**Author:** [@Summer](https://discourse.processing.org/u/Summer)\
**Replies:** 9\
**Last updated:** [May 1, 2019, 5:35am UTC](https://discourse.processing.org/t/sprites-animation-that-use-a-lot-of-memory/10695 "2019-05-01T05:35:01Z")

</div>

I made a program that animate sprites but it use a huge amount of memory (~ 3000 MB). I increased the memorry alowed in preference and the program run but it still laggy. Can someone help me to resolve this problem. Than…

---

## [Trying to get webcam feed to affect Pvector Array](https://discourse.processing.org/t/trying-to-get-webcam-feed-to-affect-pvector-array/10675)

<div class="topic-metadata">

**Author:** [@a\_primate](https://discourse.processing.org/u/a_primate)\
**Replies:** 2\
**Last updated:** [May 1, 2019, 1:53am UTC](https://discourse.processing.org/t/trying-to-get-webcam-feed-to-affect-pvector-array/10675 "2019-05-01T01:53:07Z")

</div>

Hello there Processing community! I hope you’re all doing well! :smiley: As the title says, I’m attempting to feed the brightness input from my webcam to a vector array that has certain curves and variations applied to …

---

## [Moving Balls & Shape Intersection](https://discourse.processing.org/t/moving-balls-shape-intersection/10792)

<div class="topic-metadata">

**Author:** [@Process321](https://discourse.processing.org/u/Process321)\
**Replies:** 1\
**Last updated:** [April 30, 2019, 6:29pm UTC](https://discourse.processing.org/t/moving-balls-shape-intersection/10792 "2019-04-30T18:29:08Z")

</div>

Hi! I am trying to find a way to bounce balls off a shape, but I am struggling to do so. I have included an expression at the end of the ‘void move()’ component, but with no success. Any help would be greatly appreciate…

---

## [Changing the size of a rectangle](https://discourse.processing.org/t/changing-the-size-of-a-rectangle/10592)

<div class="topic-metadata">

**Author:** [@S.L.C.S](https://discourse.processing.org/u/S.L.C.S)\
**Replies:** 19\
**Last updated:** [April 30, 2019, 4:01pm UTC](https://discourse.processing.org/t/changing-the-size-of-a-rectangle/10592 "2019-04-30T16:01:33Z")

</div>

I was asked to Write a program which allows the user to change the size of a rectangle with the arrow keys. The ‘R’ key should reset the size of the rectangle to 50 x 50. this is what i have so far. I believe the progra…

---

## [Interactive Mosaic with Processing](https://discourse.processing.org/t/interactive-mosaic-with-processing/10630)

<div class="topic-metadata">

**Author:** [@campbell](https://discourse.processing.org/u/campbell)\
**Replies:** 2\
**Last updated:** [April 30, 2019, 2:54pm UTC](https://discourse.processing.org/t/interactive-mosaic-with-processing/10630 "2019-04-30T14:54:49Z")

</div>

I am currently working on creating a live mosaic mirror in processing with the kinect4WinSDK (Kinect X-box camera). Does anybody have experience working with the kinect or creating mosaic images in processing using a liv…

---

## [Very simple k-NN algorithm does not work](https://discourse.processing.org/t/very-simple-k-nn-algorithm-does-not-work/10305)

<div class="topic-metadata">

**Author:** [@anna\_mei](https://discourse.processing.org/u/anna_mei)\
**Replies:** 7\
**Last updated:** [April 30, 2019, 2:07pm UTC](https://discourse.processing.org/t/very-simple-k-nn-algorithm-does-not-work/10305 "2019-04-30T14:07:21Z")

</div>

hi everybody, today I tried to write a very simple k-NN algorithm for class. unfortunetally I did not succeed so far. can someone see where the code is erroneous? my best guess is that the error occurs in the colour ass…

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

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