# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?page=341

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

**Page:** 342

---

## [Help needed with Leap Motion and live capture](https://discourse.processing.org/t/help-needed-with-leap-motion-and-live-capture/6323)

<div class="topic-metadata">

**Author:** [@saskia\_NL](https://discourse.processing.org/u/saskia_NL)\
**Replies:** 0\
**Last updated:** [December 5, 2018, 11:30am UTC](https://discourse.processing.org/t/help-needed-with-leap-motion-and-live-capture/6323 "2018-12-05T11:30:21Z")

</div>

Hi all! Can someone help me with this code? I’m trying to use the Leap Motion control the movement of the “scan beam” on the screen. It works when I use the mouseX as a input, but now I want it to use te X position from…

---

## [Trying to get animation to stop](https://discourse.processing.org/t/trying-to-get-animation-to-stop/6282)

<div class="topic-metadata">

**Author:** [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Replies:** 11\
**Last updated:** [December 5, 2018, 12:21pm UTC](https://discourse.processing.org/t/trying-to-get-animation-to-stop/6282 "2018-12-05T12:21:48Z")

</div>

have two tabs here, one is the sketch and the other is Star. I’m trying to have the starfield in the background to only be there half way into the song. After the songs are played halfway, I want to have a different anim…

---

## [How to distribuite a value unequally?](https://discourse.processing.org/t/how-to-distribuite-a-value-unequally/6104)

<div class="topic-metadata">

**Author:** [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Replies:** 18\
**Last updated:** [December 5, 2018, 12:08pm UTC](https://discourse.processing.org/t/how-to-distribuite-a-value-unequally/6104 "2018-12-05T12:08:01Z")

</div>

Hey, so distributing a value equally is just 50/5 = 5 Times a 10 value, But i Would Need a result of something like {15, 5, 20, 7, 3}. Now, i technically know how to do this in Code, But it‘s not very efficient, so i was…

---

## [Last click and keeping the image](https://discourse.processing.org/t/last-click-and-keeping-the-image/6317)

<div class="topic-metadata">

**Author:** [@Missmew72](https://discourse.processing.org/u/Missmew72)\
**Replies:** 6\
**Last updated:** [December 5, 2018, 11:27am UTC](https://discourse.processing.org/t/last-click-and-keeping-the-image/6317 "2018-12-05T11:27:49Z")

</div>

So I have a series of clicks setup, each click replaces the last image with the next one. When I get to the last image, I want it to stay even if there is an accidental click afterwards. Is there a way to do this?

---

## [How to have my image move horizontally?](https://discourse.processing.org/t/how-to-have-my-image-move-horizontally/6321)

<div class="topic-metadata">

**Author:** [@CyanNi](https://discourse.processing.org/u/CyanNi)\
**Replies:** 3\
**Last updated:** [December 5, 2018, 10:00am UTC](https://discourse.processing.org/t/how-to-have-my-image-move-horizontally/6321 "2018-12-05T10:00:16Z")

</div>

I’m working on my game that’s based on the chrome dino run game that plays whenever you’re offline. However, I’m facing a problem, I can’t get my image to move the way the dino does in the game. I’m sorry for bothering…

---

## [How to insert colourMode()s into stroke and fill](https://discourse.processing.org/t/how-to-insert-colourmode-s-into-stroke-and-fill/6049)

<div class="topic-metadata">

**Author:** [@CowPieForever](https://discourse.processing.org/u/CowPieForever)\
**Replies:** 3\
**Last updated:** [December 5, 2018, 5:43am UTC](https://discourse.processing.org/t/how-to-insert-colourmode-s-into-stroke-and-fill/6049 "2018-12-05T05:43:06Z")

</div>

Sorry if this is a dumb question, I’m pretty new at this. I would like to insert different colourMode()s into the actual stroke and fill command of a specific shape. How can I do this? Following the instructions on the p…

---

## [Can Video and Text Co-exist?](https://discourse.processing.org/t/can-video-and-text-co-exist/5335)

<div class="topic-metadata">

**Author:** [@laptophead](https://discourse.processing.org/u/laptophead)\
**Replies:** 21\
**Last updated:** [December 5, 2018, 4:23am UTC](https://discourse.processing.org/t/can-video-and-text-co-exist/5335 "2018-12-05T04:23:01Z")

</div>

I have been using Daniel Example “sketch\_11\_5\_AveragePixelColorTracking” for blob tracking. I thought I could get myself a couple of text lines under the video in the sketch to show XY etc… The text displays but does n…

---

## [How to create the code of the following video effect?](https://discourse.processing.org/t/how-to-create-the-code-of-the-following-video-effect/5999)

<div class="topic-metadata">

**Author:** [@Malvan](https://discourse.processing.org/u/Malvan)\
**Replies:** 2\
**Last updated:** [December 5, 2018, 3:07am UTC](https://discourse.processing.org/t/how-to-create-the-code-of-the-following-video-effect/5999 "2018-12-05T03:07:50Z")

</div>

Hello there! I was searching through the internet to find anything useful regarding to one of my school projects. I want to create something like this: https://vimeo.com/8218843 The problem is, I don’t really know wher…

---

## [If mousePressed, each click results in different event](https://discourse.processing.org/t/if-mousepressed-each-click-results-in-different-event/6285)

<div class="topic-metadata">

**Author:** [@Missmew72](https://discourse.processing.org/u/Missmew72)\
**Replies:** 3\
**Last updated:** [December 5, 2018, 2:53am UTC](https://discourse.processing.org/t/if-mousepressed-each-click-results-in-different-event/6285 "2018-12-05T02:53:58Z")

</div>

Hi, so I’m new to processing and I have to create a school project. What I want to do is when I click the first time, an image appears. When I click a second time, the first image is replaces with the second image. I nee…

---

## [How to go about scaling a set of objects all together?](https://discourse.processing.org/t/how-to-go-about-scaling-a-set-of-objects-all-together/6231)

<div class="topic-metadata">

**Author:** [@francium401](https://discourse.processing.org/u/francium401)\
**Replies:** 3\
**Last updated:** [December 4, 2018, 4:26am UTC](https://discourse.processing.org/t/how-to-go-about-scaling-a-set-of-objects-all-together/6231 "2018-12-04T04:26:41Z")

</div>

I have drawn four triangles to form a tree-looking object. I want to scale all the triangles it to a bigger size so that the tree looks bigger, say for example 200%. What do I need to do to achieve this? void setup(){ …

---

## [IntelliJ & Open Kinect for Processing](https://discourse.processing.org/t/intellij-open-kinect-for-processing/6303)

<div class="topic-metadata">

**Author:** [@ZZlm0Q](https://discourse.processing.org/u/ZZlm0Q)\
**Replies:** 0\
**Last updated:** [December 4, 2018, 9:08pm UTC](https://discourse.processing.org/t/intellij-open-kinect-for-processing/6303 "2018-12-04T21:08:04Z")

</div>

Hi all, I’m using Processing and IntelliJ due to the availability of Gradle (I’m not programming for Android, though) and because Processing’s IDE lacks some features that other development environments have. I’ve impo…

---

## [Trying to get the button to show up](https://discourse.processing.org/t/trying-to-get-the-button-to-show-up/6281)

<div class="topic-metadata">

**Author:** [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Replies:** 3\
**Last updated:** [December 4, 2018, 7:51pm UTC](https://discourse.processing.org/t/trying-to-get-the-button-to-show-up/6281 "2018-12-04T19:51:19Z")

</div>

\*\* I have this code below and I am trying to get the button to show up but it wont run. I’m getting an error that says expecting EOF, found “last\_sum”. I’m not sure how to fix this. The error is talking about this line:…

---

## [Using digital Scale in processing](https://discourse.processing.org/t/using-digital-scale-in-processing/6261)

<div class="topic-metadata">

**Author:** [@b5003354](https://discourse.processing.org/u/b5003354)\
**Replies:** 1\
**Last updated:** [December 4, 2018, 6:43pm UTC](https://discourse.processing.org/t/using-digital-scale-in-processing/6261 "2018-12-04T18:43:35Z")

</div>

Hi, I’m trying to find away to use a digital scale with processing. is there a Library that i need to download or just using code? I’m at a loss i tried using Arduino but i would have to build the scale, using a digita…

---

## [Trap events with getHat in game control plus](https://discourse.processing.org/t/trap-events-with-gethat-in-game-control-plus/6138)

<div class="topic-metadata">

**Author:** [@bryan](https://discourse.processing.org/u/bryan)\
**Replies:** 5\
**Last updated:** [December 4, 2018, 2:07pm UTC](https://discourse.processing.org/t/trap-events-with-gethat-in-game-control-plus/6138 "2018-12-04T14:07:15Z")

</div>

Hi, i want to know if there’s a way to trap events with the dpad button in the game control plus library. i can trap events with buttons, for example the key A of the xbox controller might look like this: xbox.getButton(…

---

## [mousePressed to change image multiple times](https://discourse.processing.org/t/mousepressed-to-change-image-multiple-times/6275)

<div class="topic-metadata">

**Author:** [@Missmew72](https://discourse.processing.org/u/Missmew72)\
**Replies:** 1\
**Last updated:** [December 4, 2018, 4:06am UTC](https://discourse.processing.org/t/mousepressed-to-change-image-multiple-times/6275 "2018-12-04T04:06:23Z")

</div>

Hi, so I am making a code for a school project. It’s nothing too fancy but I’m very new to the program and have been trying to find a way around the issue but ave had no luck. Basically I have an image that is there when…

---

## [Why doesn't curveVertex work in this PShape](https://discourse.processing.org/t/why-doesnt-curvevertex-work-in-this-pshape/6263)

<div class="topic-metadata">

**Author:** [@ddownn](https://discourse.processing.org/u/ddownn)\
**Replies:** 2\
**Last updated:** [December 4, 2018, 3:28am UTC](https://discourse.processing.org/t/why-doesnt-curvevertex-work-in-this-pshape/6263 "2018-12-04T03:28:11Z")

</div>

I was looking at an example of creating a spiral on the old Processing forum, drawing a spiral size(800,800); smooth(); translate(width/2,height/2); strokeWeight(2); beginShape(); for(int i=0;i\<350;i++) { curveVertex(…

---

## [How do I program the arrow keys to move object instead of mouseX and mouseY?](https://discourse.processing.org/t/how-do-i-program-the-arrow-keys-to-move-object-instead-of-mousex-and-mousey/6267)

<div class="topic-metadata">

**Author:** [@alxsnol](https://discourse.processing.org/u/alxsnol)\
**Replies:** 3\
**Last updated:** [December 4, 2018, 12:40am UTC](https://discourse.processing.org/t/how-do-i-program-the-arrow-keys-to-move-object-instead-of-mousex-and-mousey/6267 "2018-12-04T00:40:00Z")

</div>

import processing.video.\*; Capture cam; void setup() { size(560, 360); cam = new Capture(this, 560, 360, 30); cam.start(); } void draw() { if (cam.available()) { cam.read(); loadPixels(); cam.load…

---

## [How do I draw shapes over an image?](https://discourse.processing.org/t/how-do-i-draw-shapes-over-an-image/6228)

<div class="topic-metadata">

**Author:** [@JennyMcCreadie](https://discourse.processing.org/u/JennyMcCreadie)\
**Replies:** 2\
**Last updated:** [December 4, 2018, 12:31am UTC](https://discourse.processing.org/t/how-do-i-draw-shapes-over-an-image/6228 "2018-12-04T00:31:56Z")

</div>

Hello It’s super simple but I’m trying to write a code where I have a background image and when you click on it or run the mouse over it, squares appear and stay on the page. I know it’s most likely to do with the order…

---

## [AppData Recovery](https://discourse.processing.org/t/appdata-recovery/6041)

<div class="topic-metadata">

**Author:** [@Aleksi](https://discourse.processing.org/u/Aleksi)\
**Replies:** 4\
**Last updated:** [December 3, 2018, 10:27pm UTC](https://discourse.processing.org/t/appdata-recovery/6041 "2018-12-03T22:27:49Z")

</div>

Some time ago I discovered that whenever I execute a sketch it saves all the sketch tabs in a new C:/Users/me/AppData/Local/Temp/sketchName\_\[randomnumbers\]temp directory. (I’m obviously using Windows.) Inside the folder …

---

## [Sequential Loop with Images](https://discourse.processing.org/t/sequential-loop-with-images/6160)

<div class="topic-metadata">

**Author:** [@RienziDeal](https://discourse.processing.org/u/RienziDeal)\
**Replies:** 4\
**Last updated:** [December 3, 2018, 8:41pm UTC](https://discourse.processing.org/t/sequential-loop-with-images/6160 "2018-12-03T20:41:11Z")

</div>

Hi everyone, I created 36 different png’s of this orb that I designed in photoshop and I need to make processing run through all 36 of the images and then just do that forever so it looks like the orb is changing color. …

---

## [Drawing a line in a random direction from the end of a line](https://discourse.processing.org/t/drawing-a-line-in-a-random-direction-from-the-end-of-a-line/6262)

<div class="topic-metadata">

**Author:** [@jam.prescott](https://discourse.processing.org/u/jam.prescott)\
**Replies:** 4\
**Last updated:** [December 3, 2018, 5:52pm UTC](https://discourse.processing.org/t/drawing-a-line-in-a-random-direction-from-the-end-of-a-line/6262 "2018-12-03T17:52:21Z")

</div>

Just started out using processing for a project and theres a drawing I’m trying to create. If this makes sense I’m trying to, Draw a line from a random point with a random length at a random direction Then draw a li…

---

## [Looking for a maintainer for GifAnimation library](https://discourse.processing.org/t/looking-for-a-maintainer-for-gifanimation-library/6258)

<div class="topic-metadata">

**Author:** [@extrapixel](https://discourse.processing.org/u/extrapixel)\
**Replies:** 0\
**Last updated:** [December 3, 2018, 3:29pm UTC](https://discourse.processing.org/t/looking-for-a-maintainer-for-gifanimation-library/6258 "2018-12-03T15:29:04Z")

</div>

Hi there, The GifAnimation library is used to render processing sketches into animated Gifs I’m probably years too late to admit it, but I have no time to maintain the GifAnimation library anymore. Processing has sh…

---

## [Creating particle systems along a curve](https://discourse.processing.org/t/creating-particle-systems-along-a-curve/6259)

<div class="topic-metadata">

**Author:** [@tryingtogetagrip](https://discourse.processing.org/u/tryingtogetagrip)\
**Replies:** 3\
**Last updated:** [December 3, 2018, 4:31pm UTC](https://discourse.processing.org/t/creating-particle-systems-along-a-curve/6259 "2018-12-03T16:31:25Z")

</div>

Hey all, I have a question that I can’t seem to figure out. I know it is possible to use a mouseclick to create a new particle system (just as the example code I have attached beneath). However, what I would like is to …

---

## [Trying volume control of mp3 file with arduino flex sensor](https://discourse.processing.org/t/trying-volume-control-of-mp3-file-with-arduino-flex-sensor/6256)

<div class="topic-metadata">

**Author:** [@runwaysun](https://discourse.processing.org/u/runwaysun)\
**Replies:** 0\
**Last updated:** [December 3, 2018, 3:10pm UTC](https://discourse.processing.org/t/trying-volume-control-of-mp3-file-with-arduino-flex-sensor/6256 "2018-12-03T15:10:13Z")

</div>

Hi im very new to processing. I want to control volume of a mp3 file with flex sensor. So if I bend the sensor the volume goes down. Arduino circuit works and I get the serial but it doesn’t work with processing. Sou…

---

## [Color selected from pallette randomly for ellipses drawn by an array](https://discourse.processing.org/t/color-selected-from-pallette-randomly-for-ellipses-drawn-by-an-array/6204)

<div class="topic-metadata">

**Author:** [@W1nDs0R](https://discourse.processing.org/u/W1nDs0R)\
**Replies:** 2\
**Last updated:** [December 2, 2018, 9:36pm UTC](https://discourse.processing.org/t/color-selected-from-pallette-randomly-for-ellipses-drawn-by-an-array/6204 "2018-12-02T21:36:20Z")

</div>

Hey there Guys, I was wondering if you could offer me some insight in to how I can color each ellipse randomly that is drawn by an array. Currently I have created a second array for colors which it draws from when the …

---

## [Questions on static methods](https://discourse.processing.org/t/questions-on-static-methods/6169)

<div class="topic-metadata">

**Author:** [@jb4x](https://discourse.processing.org/u/jb4x)\
**Replies:** 4\
**Last updated:** [December 2, 2018, 7:33pm UTC](https://discourse.processing.org/t/questions-on-static-methods/6169 "2018-12-02T19:33:43Z")

</div>

Hi everyone, I’m trying to get my head around static methods in a class. Let’s say I want to create the following class: class MyVector { float v1, v2; MyVector(float v1, float v2) { this.v1 = v1; this.…

---

## [Turning processing file into a website?](https://discourse.processing.org/t/turning-processing-file-into-a-website/6166)

<div class="topic-metadata">

**Author:** [@HelaRua](https://discourse.processing.org/u/HelaRua)\
**Replies:** 2\
**Last updated:** [December 2, 2018, 4:23pm UTC](https://discourse.processing.org/t/turning-processing-file-into-a-website/6166 "2018-12-02T16:23:42Z")

</div>

Hi! Is there a way to take a processing file and make it a website? Also: is it possible to have have many people collaborate and make changes on it while being able to see each other’s changes in real-time? Thanks :sm…

---

## [Making 3D planets](https://discourse.processing.org/t/making-3d-planets/6136)

<div class="topic-metadata">

**Author:** [@nerdboybi](https://discourse.processing.org/u/nerdboybi)\
**Replies:** 6\
**Last updated:** [December 2, 2018, 1:42am UTC](https://discourse.processing.org/t/making-3d-planets/6136 "2018-12-02T01:42:03Z")

</div>

Hello, so I have made this program where my planet rotates around the sun. final int SUN\_SIZE=50; final int planetSize=SUN\_SIZE/2; final int X\_RADIUS=150; final int Y\_RADIUS=35; float angle=0; final float SPEED=0.03; …

---

## [How do I create regular spirograph curves around an asymmetrical shape](https://discourse.processing.org/t/how-do-i-create-regular-spirograph-curves-around-an-asymmetrical-shape/5501)

<div class="topic-metadata">

**Author:** [@Rah](https://discourse.processing.org/u/Rah)\
**Replies:** 16\
**Last updated:** [December 1, 2018, 5:22pm UTC](https://discourse.processing.org/t/how-do-i-create-regular-spirograph-curves-around-an-asymmetrical-shape/5501 "2018-12-01T17:22:27Z")

</div>

Hello! I’m desparate for a solution to my problem and very thankful for any kind of help. I’m new to this program and I need to find a way how to create regular spirograph-like curves around an asymmetrical shape. So n…

---

## [Function wont work](https://discourse.processing.org/t/function-wont-work/6134)

<div class="topic-metadata">

**Author:** [@kornFusion](https://discourse.processing.org/u/kornFusion)\
**Replies:** 4\
**Last updated:** [December 1, 2018, 5:06pm UTC](https://discourse.processing.org/t/function-wont-work/6134 "2018-12-01T17:06:43Z")

</div>

Hey Everyone, I have coded a very simple game which works perfectly except the part where the player loses. I have a function called, dead with a condition that if deadSign == true show 2 pictures (PNG) which one of t…

[Previous page](https://discourse.processing.org/c/processing/6.md?page=340)

[Next page](https://discourse.processing.org/c/processing/6.md?page=342)
