# Processing

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

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

**Page:** 137

---

## [Security & Privacy Considerations in Processing](https://discourse.processing.org/t/security-privacy-considerations-in-processing/29527)

<div class="topic-metadata">

**Author:** [@claoidek](https://discourse.processing.org/u/claoidek)\
**Replies:** 2\
**Last updated:** [April 20, 2021, 4:40pm UTC](https://discourse.processing.org/t/security-privacy-considerations-in-processing/29527 "2021-04-20T16:40:34Z")

</div>

Hi I’m writing an assignment on the security and privacy considerations of a Processing sketch (using a control p5 library). Does anyone know of any vulnerabilities I should consider?

---

## [Algorithm of an arc based on the midpoint algorithm](https://discourse.processing.org/t/algorithm-of-an-arc-based-on-the-midpoint-algorithm/29502)

<div class="topic-metadata">

**Author:** [@S1993](https://discourse.processing.org/u/S1993)\
**Replies:** 2\
**Last updated:** [April 20, 2021, 10:24am UTC](https://discourse.processing.org/t/algorithm-of-an-arc-based-on-the-midpoint-algorithm/29502 "2021-04-20T10:24:54Z")

</div>

I have to create an algorithm to produce a circular segment, so I have to give the radius, the center, and the initial and final angle. I have been working on the midpoint circle algorithm but I don know how to change i…

---

## [Need help adding two player to our snake project](https://discourse.processing.org/t/need-help-adding-two-player-to-our-snake-project/29492)

<div class="topic-metadata">

**Author:** [@Sentaun](https://discourse.processing.org/u/Sentaun)\
**Replies:** 5\
**Last updated:** [April 20, 2021, 7:40am UTC](https://discourse.processing.org/t/need-help-adding-two-player-to-our-snake-project/29492 "2021-04-20T07:40:44Z")

</div>

me and my friend have a assignment to edit a code to make it different in our own way. we decided to edit a code made by the coding train to add two player. the idea is that two snakes fight it out by trying to get the …

---

## [OpenCV update, Heaviside Step Function, deriving parametric functions of shapes, Sobel filter](https://discourse.processing.org/t/opencv-update-heaviside-step-function-deriving-parametric-functions-of-shapes-sobel-filter/21931)

<div class="topic-metadata">

**Author:** [@noel](https://discourse.processing.org/u/noel)\
**Replies:** 54\
**Last updated:** [April 20, 2021, 5:46am UTC](https://discourse.processing.org/t/opencv-update-heaviside-step-function-deriving-parametric-functions-of-shapes-sobel-filter/21931 "2021-04-20T05:46:17Z")

</div>

Hi. I would like to plot this function but I’m not sure how to implement it. It is a Heaviside step function, and I assume that the theta sign means that the sinusoid applies only to 27π \< t \< 31π , and otherwise the…

---

## [FFT.forward equivalent for AudioSample](https://discourse.processing.org/t/fft-forward-equivalent-for-audiosample/29464)

<div class="topic-metadata">

**Author:** [@indicator\_red](https://discourse.processing.org/u/indicator_red)\
**Replies:** 8\
**Last updated:** [April 20, 2021, 2:55am UTC](https://discourse.processing.org/t/fft-forward-equivalent-for-audiosample/29464 "2021-04-20T02:55:17Z")

</div>

Hello, I am attempting to get audio/video sync working for exporting a music visualization. I’m working with this demo script from VideoExport:withAudioViz.pde. I am able to generate the analysis .txt file and get the s…

---

## [Multiple shapes](https://discourse.processing.org/t/multiple-shapes/29472)

<div class="topic-metadata">

**Author:** [@PARINAZ129](https://discourse.processing.org/u/PARINAZ129)\
**Replies:** 3\
**Last updated:** [April 19, 2021, 9:25pm UTC](https://discourse.processing.org/t/multiple-shapes/29472 "2021-04-19T21:25:20Z")

</div>

Dear As a beginner, I have rendered a car via rectangles and circles. Actually, I want to move this car via mouse but I cant movie multiple shapes which created the car at the same time. I would be grateful If you che…

---

## [Function Return Error](https://discourse.processing.org/t/function-return-error/29501)

<div class="topic-metadata">

**Author:** [@Bromo](https://discourse.processing.org/u/Bromo)\
**Replies:** 11\
**Last updated:** [April 19, 2021, 8:06pm UTC](https://discourse.processing.org/t/function-return-error/29501 "2021-04-19T20:06:40Z")

</div>

Hi, I’m pretty new with functions and was wondering what I could do differently here. Ideally I’d like the function to sort the two numbers given and give me the number that’s closest to 100 (without going over). Current…

---

## [G4P giving me an error on TextField settext()](https://discourse.processing.org/t/g4p-giving-me-an-error-on-textfield-settext/29483)

<div class="topic-metadata">

**Author:** [@FedeKrum](https://discourse.processing.org/u/FedeKrum)\
**Replies:** 4\
**Last updated:** [April 19, 2021, 7:37pm UTC](https://discourse.processing.org/t/g4p-giving-me-an-error-on-textfield-settext/29483 "2021-04-19T19:37:19Z")

</div>

Hi, I did a form with G4P GUI. I added only one line at the event of a text field. It looks that the event can’t handle the typing of one character at the field and crashes. I am getting this error while executing the…

---

## [Wiimote + Processing 3](https://discourse.processing.org/t/wiimote-processing-3/27668)

<div class="topic-metadata">

**Author:** [@Litotitus](https://discourse.processing.org/u/Litotitus)\
**Replies:** 2\
**Last updated:** [April 19, 2021, 7:33pm UTC](https://discourse.processing.org/t/wiimote-processing-3/27668 "2021-04-19T19:33:10Z")

</div>

Hello, I rediscovered my old Wiimote controller and I am trying to make it work with Processing 3.5.4. I am using a MacbookPro with macOS Catalina. I already tried out several things but mainly my problem is that the u…

---

## [Optimization of Lissajous table](https://discourse.processing.org/t/optimization-of-lissajous-table/29481)

<div class="topic-metadata">

**Author:** [@Rafsing](https://discourse.processing.org/u/Rafsing)\
**Replies:** 6\
**Last updated:** [April 19, 2021, 2:10pm UTC](https://discourse.processing.org/t/optimization-of-lissajous-table/29481 "2021-04-19T14:10:04Z")

</div>

I created code, that animates creation of lissajous table. It works properly, but sometimes, when the first circle travels almost entire lap it slows down dramatically. How can I optimize this code: void calculations() …

---

## [HeatCam examples .... Please help!](https://discourse.processing.org/t/heatcam-examples-please-help/29390)

<div class="topic-metadata">

**Author:** [@SLEE](https://discourse.processing.org/u/SLEE)\
**Replies:** 6\
**Last updated:** [April 19, 2021, 1:57pm UTC](https://discourse.processing.org/t/heatcam-examples-please-help/29390 "2021-04-19T13:57:17Z")

</div>

Hi! I’m the real beginner in this field :frowning: I tried to follow various examples with my Sparkfun parts. And I’m trying to do the example with processing Heatcam. ( Example 4 - Processing Heat Cam) I do everythi…

---

## [G4P can't handle multiple opened sketches on my mac](https://discourse.processing.org/t/g4p-cant-handle-multiple-opened-sketches-on-my-mac/29485)

<div class="topic-metadata">

**Author:** [@FedeKrum](https://discourse.processing.org/u/FedeKrum)\
**Replies:** 2\
**Last updated:** [April 19, 2021, 11:23am UTC](https://discourse.processing.org/t/g4p-cant-handle-multiple-opened-sketches-on-my-mac/29485 "2021-04-19T11:23:50Z")

</div>

Hi. If I open 2 sketches in Processing on my mac, “G4P GUI builder” gets confused and if I open it while focused on one project, it may bring the “gui” of the other. This forces me to close all other sketches and try a…

---

## [General wondering about Kinect like devices and clever cameras](https://discourse.processing.org/t/general-wondering-about-kinect-like-devices-and-clever-cameras/29489)

<div class="topic-metadata">

**Author:** [@Jean-no](https://discourse.processing.org/u/Jean-no)\
**Replies:** 1\
**Last updated:** [April 19, 2021, 10:04am UTC](https://discourse.processing.org/t/general-wondering-about-kinect-like-devices-and-clever-cameras/29489 "2021-04-19T10:04:15Z")

</div>

Kinect is (Kinect was !) a great tool to use with Processing for interactive installations, but Microsoft ended it. It is still possible, though, to buy used ones, and they’re even not very expensive. But how is it goin…

---

## [Export with serial () library does not work](https://discourse.processing.org/t/export-with-serial-library-does-not-work/29417)

<div class="topic-metadata">

**Author:** [@Liu.Exit](https://discourse.processing.org/u/Liu.Exit)\
**Replies:** 5\
**Last updated:** [April 19, 2021, 9:40am UTC](https://discourse.processing.org/t/export-with-serial-library-does-not-work/29417 "2021-04-19T09:40:56Z")

</div>

Good morning all, My sketch works fine with IDE but after an export (.exe) the program crashes. (Both x32 and x64.) This only happens when I introduce the SERIAL library. Anyone know why? I am not the only one with th…

---

## [Overwriting pixels\[\] Manually](https://discourse.processing.org/t/overwriting-pixels-manually/29306)

<div class="topic-metadata">

**Author:** [@what42](https://discourse.processing.org/u/what42)\
**Replies:** 3\
**Last updated:** [April 18, 2021, 10:32pm UTC](https://discourse.processing.org/t/overwriting-pixels-manually/29306 "2021-04-18T22:32:06Z")

</div>

I just wanted to know if there’s any way I can bypass loadPixels() and just do pixels = new int \[width \* height\];. I have a function that renders a tilemap to an int array, and load&updatePixels() is slowing it down quit…

---

## [Resize event for sketch without draw() loop](https://discourse.processing.org/t/resize-event-for-sketch-without-draw-loop/29462)

<div class="topic-metadata">

**Author:** [@TechnicJelle](https://discourse.processing.org/u/TechnicJelle)\
**Replies:** 7\
**Last updated:** [April 18, 2021, 10:05pm UTC](https://discourse.processing.org/t/resize-event-for-sketch-without-draw-loop/29462 "2021-04-18T22:05:19Z")

</div>

Hi there! A few friends and me have been working on a small spreadsheet-like software program lately and of course, we made it resizeable by using surface.setResizable(true). The thing of this software is that, because…

---

## [Why my Serial Port stays busy?](https://discourse.processing.org/t/why-my-serial-port-stays-busy/15844)

<div class="topic-metadata">

**Author:** [@laptophead](https://discourse.processing.org/u/laptophead)\
**Replies:** 12\
**Last updated:** [April 18, 2021, 8:22pm UTC](https://discourse.processing.org/t/why-my-serial-port-stays-busy/15844 "2021-04-18T20:22:01Z")

</div>

I am using a Win 10 Surface tablet to display settings of my robot arm. My data stream comes through a HC 06 Arduino BT dongle at 57600 baud, paired with the tablet. It worked fine when the sketches were small but now …

---

## [How can I create a sphere (or other shape) with cubes? (3D)](https://discourse.processing.org/t/how-can-i-create-a-sphere-or-other-shape-with-cubes-3d/28047)

<div class="topic-metadata">

**Author:** [@vassilakosaggelos](https://discourse.processing.org/u/vassilakosaggelos)\
**Replies:** 6\
**Last updated:** [April 15, 2021, 7:46pm UTC](https://discourse.processing.org/t/how-can-i-create-a-sphere-or-other-shape-with-cubes-3d/28047 "2021-04-15T19:46:07Z")

</div>

Hi everyone I am new generally in coding ( not only in Processing) so I need your help if you can. What I want to do is to design 10 types of cubes with different color shades ( from white to totally black) without havin…

---

## [Create a new object of a subclass with a String](https://discourse.processing.org/t/create-a-new-object-of-a-subclass-with-a-string/29467)

<div class="topic-metadata">

**Author:** [@TimeLex](https://discourse.processing.org/u/TimeLex)\
**Replies:** 2\
**Last updated:** [April 18, 2021, 6:28pm UTC](https://discourse.processing.org/t/create-a-new-object-of-a-subclass-with-a-string/29467 "2021-04-18T18:28:05Z")

</div>

My friend and I are working on a game. There is an abstract item class and some specific items: abstract class Item{ PVector Start; PVector End; float Progress; boolean delete; boolean flammable; int B…

---

## [How can I connect balls to each other with a line?](https://discourse.processing.org/t/how-can-i-connect-balls-to-each-other-with-a-line/29470)

<div class="topic-metadata">

**Author:** [@iox007](https://discourse.processing.org/u/iox007)\
**Replies:** 5\
**Last updated:** [April 18, 2021, 3:33pm UTC](https://discourse.processing.org/t/how-can-i-connect-balls-to-each-other-with-a-line/29470 "2021-04-18T15:33:11Z")

</div>

Im trying to connect the balls to each other by lines but for some reason, im failing at it. What am i doing wrong? int anz = 10; int r = 8; int speed = 3; boolean show = true; float tmp; float…

---

## [Convert from FFT back to audio?](https://discourse.processing.org/t/convert-from-fft-back-to-audio/29461)

<div class="topic-metadata">

**Author:** [@BennyHacker](https://discourse.processing.org/u/BennyHacker)\
**Replies:** 2\
**Last updated:** [April 18, 2021, 3:30pm UTC](https://discourse.processing.org/t/convert-from-fft-back-to-audio/29461 "2021-04-18T15:30:27Z")

</div>

Hello forum. I have used the processing sound library to analyze an audio file and get the sound spectrum in the form of an array of floats. I was wondering if there was a well understood way of converting back to audio…

---

## [Different Colors when using PGraphics](https://discourse.processing.org/t/different-colors-when-using-pgraphics/29458)

<div class="topic-metadata">

**Author:** [@kweso](https://discourse.processing.org/u/kweso)\
**Replies:** 1\
**Last updated:** [April 17, 2021, 6:58pm UTC](https://discourse.processing.org/t/different-colors-when-using-pgraphics/29458 "2021-04-17T18:58:25Z")

</div>

Hey all! could you tell my why I get different colors when drawing to a PGraphic? PGraphics canvas; void setup(){ size(1060,200); colorMode(HSB,360,100,100,100); background(0,0,100); canvas = createGraphic…

---

## [Boolean function inside a class not working](https://discourse.processing.org/t/boolean-function-inside-a-class-not-working/29426)

<div class="topic-metadata">

**Author:** [@iudividnal](https://discourse.processing.org/u/iudividnal)\
**Replies:** 3\
**Last updated:** [April 17, 2021, 10:26am UTC](https://discourse.processing.org/t/boolean-function-inside-a-class-not-working/29426 "2021-04-17T10:26:12Z")

</div>

Hey there i was creating an animation for a simple game im working on and run into a problem where my simple boolean function inside a class returns an error “NullPointerException” int randomHue; int rainbowHue; boole…

---

## [Please, help me. API Post method, I want to solve it](https://discourse.processing.org/t/please-help-me-api-post-method-i-want-to-solve-it/29328)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 3\
**Last updated:** [April 17, 2021, 7:39am UTC](https://discourse.processing.org/t/please-help-me-api-post-method-i-want-to-solve-it/29328 "2021-04-17T07:39:10Z")

</div>

API pdf file : import http.requests.\*; public void setup(){ PostRequest post = new PostRequest("https://getefento.com/"); // api/v2/measurements post.addHeader("Content-Type", "application/json"); post.addHeader…

---

## [Instantiate one class inside another using a third](https://discourse.processing.org/t/instantiate-one-class-inside-another-using-a-third/29414)

<div class="topic-metadata">

**Author:** [@Aleksi](https://discourse.processing.org/u/Aleksi)\
**Replies:** 9\
**Last updated:** [April 16, 2021, 10:24pm UTC](https://discourse.processing.org/t/instantiate-one-class-inside-another-using-a-third/29414 "2021-04-16T22:24:11Z")

</div>

Hello again! I can’t figure out how to use reflection to instantiate one class inside another using a third class. I feel like I’m close… The goal in this example is to instantiate A.b inside C. import java.lang.refle…

---

## [Problem with for loops](https://discourse.processing.org/t/problem-with-for-loops/29425)

<div class="topic-metadata">

**Author:** [@kairama15](https://discourse.processing.org/u/kairama15)\
**Replies:** 1\
**Last updated:** [April 16, 2021, 8:22pm UTC](https://discourse.processing.org/t/problem-with-for-loops/29425 "2021-04-16T20:22:34Z")

</div>

When I run the following code, when I try to println the variable a in the FOR loop, it doesn’t show up on the window. I would expect the loop to be entered and iterated because m\[0\] is greater than 0, and so is m\[1\], m…

---

## [Make use of camera in pc and live stream](https://discourse.processing.org/t/make-use-of-camera-in-pc-and-live-stream/29413)

<div class="topic-metadata">

**Author:** [@shaun26](https://discourse.processing.org/u/shaun26)\
**Replies:** 1\
**Last updated:** [April 16, 2021, 6:25pm UTC](https://discourse.processing.org/t/make-use-of-camera-in-pc-and-live-stream/29413 "2021-04-16T18:25:03Z")

</div>

I want to live stream a video captured from camera using p5.js. I’m using this camera: AR0234CS, Full HD, 120FPS, USB3 Global Shutter Camera This is possible? any ideas how to implement?

---

## [Music is not stopping](https://discourse.processing.org/t/music-is-not-stopping/29415)

<div class="topic-metadata">

**Author:** [@Mert](https://discourse.processing.org/u/Mert)\
**Replies:** 1\
**Last updated:** [April 16, 2021, 6:18pm UTC](https://discourse.processing.org/t/music-is-not-stopping/29415 "2021-04-16T18:18:38Z")

</div>

Hello everyone I added to music on my code but even if I stop playing music continue to play just wtf how can I solve that problem here is my alllllll code: int rad = 200; // Boyut float xpos, ypos; // Başlay…

---

## [How to replace Shape with an image ? PShape to PImage](https://discourse.processing.org/t/how-to-replace-shape-with-an-image-pshape-to-pimage/29386)

<div class="topic-metadata">

**Author:** [@carolina\_moreira](https://discourse.processing.org/u/carolina_moreira)\
**Replies:** 4\
**Last updated:** [April 16, 2021, 12:08pm UTC](https://discourse.processing.org/t/how-to-replace-shape-with-an-image-pshape-to-pimage/29386 "2021-04-16T12:08:12Z")

</div>

I am trying to exchange all forms for images What is the correct way to do it? The game opens and no error appears The image just does not appear when I press the Y key hope someone can help me thank you in advance …

---

## [Errors in SpaceShip Game](https://discourse.processing.org/t/errors-in-spaceship-game/29389)

<div class="topic-metadata">

**Author:** [@spamelim](https://discourse.processing.org/u/spamelim)\
**Replies:** 3\
**Last updated:** [April 16, 2021, 11:50am UTC](https://discourse.processing.org/t/errors-in-spaceship-game/29389 "2021-04-16T11:50:12Z")

</div>

I’ve been programming a 3D game where a ship avoids spikes on a terrain of triangle sectors. I’ve been having two major problems with the game so far. 1) the triangle sector terrain seems to be moving slowly downwards an…

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

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