# Processing

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

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

**Page:** 323

---

## [Reliable if statement switching with sin()](https://discourse.processing.org/t/reliable-if-statement-switching-with-sin/8399)

<div class="topic-metadata">

**Author:** [@mwmw](https://discourse.processing.org/u/mwmw)\
**Replies:** 7\
**Last updated:** [February 15, 2019, 2:23am UTC](https://discourse.processing.org/t/reliable-if-statement-switching-with-sin/8399 "2019-02-15T02:23:35Z")

</div>

Hello, I’m writing a basic DMX controller which has a few simple colour animations. One animation I’m working on currently uses a sin() function to oscillate the brightness value. When the brightness is 0 I want the hue…

---

## [Unsigned Bytes from Arduino Misbehaving](https://discourse.processing.org/t/unsigned-bytes-from-arduino-misbehaving/8318)

<div class="topic-metadata">

**Author:** [@TheGankerer](https://discourse.processing.org/u/TheGankerer)\
**Replies:** 6\
**Last updated:** [February 14, 2019, 2:42pm UTC](https://discourse.processing.org/t/unsigned-bytes-from-arduino-misbehaving/8318 "2019-02-14T14:42:08Z")

</div>

Hello everyone, I’m having some issues with data I’m reading from an Arduino Uno. Essentially I’m using the Arduino as a DAQ and sending over 4 analog inputs over the Serial. The first two inputs (A0 and A1) are single…

---

## [Human-Form 3D Mocap - Graphics Code](https://discourse.processing.org/t/human-form-3d-mocap-graphics-code/8392)

<div class="topic-metadata">

**Author:** [@L11L](https://discourse.processing.org/u/L11L)\
**Replies:** 1\
**Last updated:** [February 14, 2019, 1:40pm UTC](https://discourse.processing.org/t/human-form-3d-mocap-graphics-code/8392 "2019-02-14T13:40:11Z")

</div>

I started using Processing three days ago. I am using Processing to capture the motion of a MPU6050-driven IMU sensor. I need a human form (or something that resembles human) to represent the data output of the IMU senso…

---

## [I don't know how to communicate with internet](https://discourse.processing.org/t/i-dont-know-how-to-communicate-with-internet/8381)

<div class="topic-metadata">

**Author:** [@AngelsApple](https://discourse.processing.org/u/AngelsApple)\
**Replies:** 4\
**Last updated:** [February 14, 2019, 8:14am UTC](https://discourse.processing.org/t/i-dont-know-how-to-communicate-with-internet/8381 "2019-02-14T08:14:56Z")

</div>

I’d like to write a code about data scrapping from internet I set the target as downloading my facebook images and friends list, but It seems too hard for me So now I’m trying to make easy sample that download google L…

---

## [Help on mirroring an image](https://discourse.processing.org/t/help-on-mirroring-an-image/8387)

<div class="topic-metadata">

**Author:** [@Plum](https://discourse.processing.org/u/Plum)\
**Replies:** 4\
**Last updated:** [February 14, 2019, 6:07am UTC](https://discourse.processing.org/t/help-on-mirroring-an-image/8387 "2019-02-14T06:07:20Z")

</div>

So I am currently doing some school assignments which involves me mirroring an image “pixel by pixel”. I got an example on how to flip the image, however i’m struggling to figure out how to mirror it. Here is the code t…

---

## [How to capture an image after contour.draw();?](https://discourse.processing.org/t/how-to-capture-an-image-after-contour-draw/8389)

<div class="topic-metadata">

**Author:** [@laptophead](https://discourse.processing.org/u/laptophead)\
**Replies:** 1\
**Last updated:** [February 14, 2019, 5:49am UTC](https://discourse.processing.org/t/how-to-capture-an-image-after-contour-draw/8389 "2019-02-14T05:49:29Z")

</div>

I am using the “FindContours” example from the OpenCV library. All works well, but I would like to capture an image after the countours have been drawn. (For further analysis of the the contours.) So I tried: con…

---

## [Incrementing/Decrementing Color Brightness](https://discourse.processing.org/t/incrementing-decrementing-color-brightness/8378)

<div class="topic-metadata">

**Author:** [@Diamaru](https://discourse.processing.org/u/Diamaru)\
**Replies:** 2\
**Last updated:** [February 14, 2019, 1:29am UTC](https://discourse.processing.org/t/incrementing-decrementing-color-brightness/8378 "2019-02-14T01:29:53Z")

</div>

Hello all, I am working on developing a drawing tool for one of my classes and I am having trouble with a specific part of the code. The color variable “x” should increment by 10 when the UP key is pressed and decrement …

---

## [Deadlock? (main thread keeps waiting)](https://discourse.processing.org/t/deadlock-main-thread-keeps-waiting/8371)

<div class="topic-metadata">

**Author:** [@maxhawaii](https://discourse.processing.org/u/maxhawaii)\
**Replies:** 0\
**Last updated:** [February 13, 2019, 7:17pm UTC](https://discourse.processing.org/t/deadlock-main-thread-keeps-waiting/8371 "2019-02-13T19:17:43Z")

</div>

Hi everyone, I’m pretty sure that my processing sketch deadlocks and I’m having trouble debugging it. Most of the time, the sketch runs fine but once in a while - sometimes after 10 minutes, sometimes after 6 hours of …

---

## [Tweak mode not working?](https://discourse.processing.org/t/tweak-mode-not-working/7972)

<div class="topic-metadata">

**Author:** [@jdarias](https://discourse.processing.org/u/jdarias)\
**Replies:** 5\
**Last updated:** [February 13, 2019, 6:42pm UTC](https://discourse.processing.org/t/tweak-mode-not-working/7972 "2019-02-13T18:42:33Z")

</div>

Whenever i try the tweak functionality i get a red bar and this in the console: java.lang.ClassCastException: processing.app.RunnerListenerEdtAdapter cannot be cast to processing.mode.java.JavaEditor at processing.mode…

---

## [Creating an Array](https://discourse.processing.org/t/creating-an-array/8334)

<div class="topic-metadata">

**Author:** [@Awal](https://discourse.processing.org/u/Awal)\
**Replies:** 8\
**Last updated:** [February 13, 2019, 5:04pm UTC](https://discourse.processing.org/t/creating-an-array/8334 "2019-02-13T17:04:06Z")

</div>

Hi, I am working on a class assignment but I am stuck. The assignment is Create an int array called salesFigure that will hold 5 elements. Use a for loop to print all the elements. (They should all be 0 since no info…

---

## [Number Tile Game](https://discourse.processing.org/t/number-tile-game/8342)

<div class="topic-metadata">

**Author:** [@o0804337](https://discourse.processing.org/u/o0804337)\
**Replies:** 5\
**Last updated:** [February 13, 2019, 5:09am UTC](https://discourse.processing.org/t/number-tile-game/8342 "2019-02-13T05:09:12Z")

</div>

\`I am trying to make a tile game where you are supposed to put the numbers in order. So I couldn’t get the numbers into the last row and I trying to get them to move. There isn’t supposed to be a square on the bottom rig…

---

## [\[SOLVED\] Interpolating a continuous bezier curve](https://discourse.processing.org/t/solved-interpolating-a-continuous-bezier-curve/7905)

<div class="topic-metadata">

**Author:** [@Aleksi](https://discourse.processing.org/u/Aleksi)\
**Replies:** 6\
**Last updated:** [February 12, 2019, 11:25pm UTC](https://discourse.processing.org/t/solved-interpolating-a-continuous-bezier-curve/7905 "2019-02-12T23:25:56Z")

</div>

It’s relatively straightforward interpolating a single bezier curve. What I’m looking for is a way to interpolate a continuous bezier curve. I’m assuming it’s possible, and if I wasn’t pressed for time I’d probably figur…

---

## [Udp recreiving multiple ports](https://discourse.processing.org/t/udp-recreiving-multiple-ports/7516)

<div class="topic-metadata">

**Author:** [@jimfah](https://discourse.processing.org/u/jimfah)\
**Replies:** 6\
**Last updated:** [February 11, 2019, 8:45pm UTC](https://discourse.processing.org/t/udp-recreiving-multiple-ports/7516 "2019-02-11T20:45:28Z")

</div>

I would like to extend the UDP object to allow for listening to multiple ports. Note the use of extends in the class definition. public class myUDP extends UDP{ String myIp; int myPort; String inMsg; boole…

---

## [Problem dividing face of a WETriangleMesh (bug in toxiclibs ?)](https://discourse.processing.org/t/problem-dividing-face-of-a-wetrianglemesh-bug-in-toxiclibs/7790)

<div class="topic-metadata">

**Author:** [@solub](https://discourse.processing.org/u/solub)\
**Replies:** 1\
**Last updated:** [February 12, 2019, 7:46pm UTC](https://discourse.processing.org/t/problem-dividing-face-of-a-wetrianglemesh-bug-in-toxiclibs/7790 "2019-02-12T19:46:07Z")

</div>

Dear all, In the following example code I’m trying to add 3 new faces on top of one of the original 4 faces of a tetrahedron mesh. The mesh vertices are connected by springs. My problem is that the vertices of the newl…

---

## [Gallery with some images](https://discourse.processing.org/t/gallery-with-some-images/8295)

<div class="topic-metadata">

**Author:** [@akjunior](https://discourse.processing.org/u/akjunior)\
**Replies:** 4\
**Last updated:** [February 12, 2019, 5:55pm UTC](https://discourse.processing.org/t/gallery-with-some-images/8295 "2019-02-12T17:55:02Z")

</div>

ir, can i ask u a question? I wrote this code in processing, where you have something like gallery with some images. And if you click on one picture its enlarges. But right now, where ever I click, it is same picture whi…

---

## [Driving Effect / Moving Dividing Line](https://discourse.processing.org/t/driving-effect-moving-dividing-line/8316)

<div class="topic-metadata">

**Author:** [@hexe43](https://discourse.processing.org/u/hexe43)\
**Replies:** 3\
**Last updated:** [February 12, 2019, 5:21pm UTC](https://discourse.processing.org/t/driving-effect-moving-dividing-line/8316 "2019-02-12T17:21:37Z")

</div>

Hi, I want to create a “car avoiding game”. To make it look like the cars are driving I want to make the dividing line move constantly from top to bottom in a loop. How is that possible? Hopefully, someone is able to hel…

---

## [Gesture recognition](https://discourse.processing.org/t/gesture-recognition/8211)

<div class="topic-metadata">

**Author:** [@matheplica](https://discourse.processing.org/u/matheplica)\
**Replies:** 5\
**Last updated:** [February 12, 2019, 12:51pm UTC](https://discourse.processing.org/t/gesture-recognition/8211 "2019-02-12T12:51:28Z")

</div>

Hi, there is way to recognize gesture ? I would like to know when the mouse make lines, infinite, circle (his speed and direction : clockwise or not), … There is a old library but doesn’t work with current processing.

---

## [Timer that ends with a song](https://discourse.processing.org/t/timer-that-ends-with-a-song/8270)

<div class="topic-metadata">

**Author:** [@juliastar](https://discourse.processing.org/u/juliastar)\
**Replies:** 4\
**Last updated:** [February 12, 2019, 7:56am UTC](https://discourse.processing.org/t/timer-that-ends-with-a-song/8270 "2019-02-12T07:56:28Z")

</div>

Hi, I’m very new to processing. Right now I’m trying to create a game for kids. The thing is that I’m trying to create a timer and when it is equal to 0 a song will go off. So thanks to this forum and Youtube I manage t…

---

## [Displaying HTML in JFrame](https://discourse.processing.org/t/displaying-html-in-jframe/8307)

<div class="topic-metadata">

**Author:** [@lmccandless](https://discourse.processing.org/u/lmccandless)\
**Replies:** 1\
**Last updated:** [February 12, 2019, 5:55am UTC](https://discourse.processing.org/t/displaying-html-in-jframe/8307 "2019-02-12T05:55:39Z")

</div>

I’d like to get some HTML from a page and display it instead of writing my own parsing and trying to display it all with text(); I’ve cobbled this together from examples I’ve found on the old forum and stackoverflow, b…

---

## [Sketch works with P2D but doesn't update with JAVA2D](https://discourse.processing.org/t/sketch-works-with-p2d-but-doesnt-update-with-java2d/8312)

<div class="topic-metadata">

**Author:** [@hamoid](https://discourse.processing.org/u/hamoid)\
**Replies:** 0\
**Last updated:** [February 12, 2019, 4:02am UTC](https://discourse.processing.org/t/sketch-works-with-p2d-but-doesnt-update-with-java2d/8312 "2019-02-12T04:02:22Z")

</div>

Hi! Any ideas on why this program fails to draw different lines when clicking the mouse on JAVA2D, but does work with P2D? (on Processing 0269). Maybe it works on previous versions? In JAVA2D it seems to draw always the…

---

## [\[SOLVED\] Combined Strings not == single string](https://discourse.processing.org/t/solved-combined-strings-not-single-string/8310)

<div class="topic-metadata">

**Author:** [@kandles11](https://discourse.processing.org/u/kandles11)\
**Replies:** 2\
**Last updated:** [February 12, 2019, 3:57am UTC](https://discourse.processing.org/t/solved-combined-strings-not-single-string/8310 "2019-02-12T03:57:18Z")

</div>

Hello, I am having some troubles merging two strings to equal one. I want the two strings, once added together, to be able to == another string. I tried it, but its not printing the line. Any help would be appreciated :s…

---

## [Projects a PVector onto camera](https://discourse.processing.org/t/projects-a-pvector-onto-camera/7908)

<div class="topic-metadata">

**Author:** [@vjjv](https://discourse.processing.org/u/vjjv)\
**Replies:** 3\
**Last updated:** [February 11, 2019, 9:31pm UTC](https://discourse.processing.org/t/projects-a-pvector-onto-camera/7908 "2019-02-11T21:31:07Z")

</div>

Hello! in three.js exist a function calls Projects (onto a camera): .project ( camera : Camera ) : this camera — camera to use in the projection. project: function ( camera ) { return this.applyMatrix4( camera.matri…

---

## [Getting pull requests merged into processing-video project](https://discourse.processing.org/t/getting-pull-requests-merged-into-processing-video-project/7891)

<div class="topic-metadata">

**Author:** [@alexmiller](https://discourse.processing.org/u/alexmiller)\
**Replies:** 5\
**Last updated:** [February 11, 2019, 8:46pm UTC](https://discourse.processing.org/t/getting-pull-requests-merged-into-processing-video-project/7891 "2019-02-11T20:46:06Z")

</div>

I recently submitted a pull request to the processing video library. I took a peek at the other outstanding pull requests against the library and was concerned to see that there doesn’t seem to be any progress on getting…

---

## [How to adjust tab size - GPanel - G4P library](https://discourse.processing.org/t/how-to-adjust-tab-size-gpanel-g4p-library/8285)

<div class="topic-metadata">

**Author:** [@fvoiron](https://discourse.processing.org/u/fvoiron)\
**Replies:** 4\
**Last updated:** [February 11, 2019, 8:19pm UTC](https://discourse.processing.org/t/how-to-adjust-tab-size-gpanel-g4p-library/8285 "2019-02-11T20:19:23Z")

</div>

Is there any way to control the width of the tab of a GPanel / G4P library? Indeed when changing the font (setFont()) / or the text (setText()) set to the tab after creation of the GPanel, the tab width dosen’t resize p…

---

## [Why are if AND else being executed at the same time?](https://discourse.processing.org/t/why-are-if-and-else-being-executed-at-the-same-time/8246)

<div class="topic-metadata">

**Author:** [@Schred](https://discourse.processing.org/u/Schred)\
**Replies:** 3\
**Last updated:** [February 11, 2019, 6:49pm UTC](https://discourse.processing.org/t/why-are-if-and-else-being-executed-at-the-same-time/8246 "2019-02-11T18:49:11Z")

</div>

Hi! I’m working on a collision system at the moment and everything seemed to work fine (actually not but I want to solve all the other problems on my own lol :sweat\_smile:) but then I realised that a boolean in the code…

---

## [Newbie - connecting txt file to this code](https://discourse.processing.org/t/newbie-connecting-txt-file-to-this-code/8284)

<div class="topic-metadata">

**Author:** [@rezaniik](https://discourse.processing.org/u/rezaniik)\
**Replies:** 3\
**Last updated:** [February 11, 2019, 3:34pm UTC](https://discourse.processing.org/t/newbie-connecting-txt-file-to-this-code/8284 "2019-02-11T15:34:01Z")

</div>

hi all, i am extremely new to processing, as of a few hours. perhaps i’m jumping too quickly and trying to do something more complex without know the basics but I have been messing around with the code below. And what…

---

## [How can I avoid this error on mobile browsers?](https://discourse.processing.org/t/how-can-i-avoid-this-error-on-mobile-browsers/8255)

<div class="topic-metadata">

**Author:** [@chrisjj](https://discourse.processing.org/u/chrisjj)\
**Replies:** 1\
**Last updated:** [February 10, 2019, 11:09pm UTC](https://discourse.processing.org/t/how-can-i-avoid-this-error-on-mobile-browsers/8255 "2019-02-10T23:09:25Z")

</div>

When I try to run this openprocessing sketch on any mobile browser, when the touch is ended, I get an error Unable to dispatch event. Could anyone verify this? And suggest how I can avoid it?

---

## [How to create ripple effects over an image?](https://discourse.processing.org/t/how-to-create-ripple-effects-over-an-image/8227)

<div class="topic-metadata">

**Author:** [@artisan](https://discourse.processing.org/u/artisan)\
**Replies:** 3\
**Last updated:** [February 10, 2019, 10:59pm UTC](https://discourse.processing.org/t/how-to-create-ripple-effects-over-an-image/8227 "2019-02-10T22:59:20Z")

</div>

Ok, I am fairly new to processing so forgive me if this question is stupid or if this is not a suitable place to ask. The following code is taken from Dan Shiffman, The only modification made to this Is that I draw the …

---

## [How to make this wave movement?](https://discourse.processing.org/t/how-to-make-this-wave-movement/7911)

<div class="topic-metadata">

**Author:** [@Murky](https://discourse.processing.org/u/Murky)\
**Replies:** 7\
**Last updated:** [February 9, 2019, 7:39pm UTC](https://discourse.processing.org/t/how-to-make-this-wave-movement/7911 "2019-02-09T19:39:28Z")

</div>

Hello! I have found this Gif very interesting (credits to @beesandbombs). I am able to make the still version of the Gif in Processing, but I have no idea how to make it move like that? I don’t really know how can I …

---

## [How to setup sketch path in atom.io?](https://discourse.processing.org/t/how-to-setup-sketch-path-in-atom-io/8191)

<div class="topic-metadata">

**Author:** [@TomblyBones](https://discourse.processing.org/u/TomblyBones)\
**Replies:** 2\
**Last updated:** [February 10, 2019, 2:47pm UTC](https://discourse.processing.org/t/how-to-setup-sketch-path-in-atom-io/8191 "2019-02-10T14:47:08Z")

</div>

Okay so I would like to start using processing in atom.io but whenever I try to run the code it tells me I need to specify a sketch folder with this “–sketch=/full/path/to/your/sketch/dir” however I am unsure of what thi…

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

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