# Processing

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

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

**Page:** 357

---

## [Re Randomizing Variables](https://discourse.processing.org/t/re-randomizing-variables/4745)

<div class="topic-metadata">

**Author:** [@klarj](https://discourse.processing.org/u/klarj)\
**Replies:** 3\
**Last updated:** [October 23, 2018, 2:07pm UTC](https://discourse.processing.org/t/re-randomizing-variables/4745 "2018-10-23T14:07:07Z")

</div>

I’m trying to create a program where 1st a ball is randomly placed and when clicked on, the old one is removed and a new one is placed randomly. The problem is that even though I do random() again for that variable it do…

---

## [Change the datatype returned from pow() function](https://discourse.processing.org/t/change-the-datatype-returned-from-pow-function/4771)

<div class="topic-metadata">

**Author:** [@Cowhead](https://discourse.processing.org/u/Cowhead)\
**Replies:** 1\
**Last updated:** [October 23, 2018, 11:35am UTC](https://discourse.processing.org/t/change-the-datatype-returned-from-pow-function/4771 "2018-10-23T11:35:11Z")

</div>

I was wondering if it was possible to change the datatype returned from the pow() function and how to possibly do this. or if i have to make my own function. i need the pow() function to return a double instead of a floa…

---

## [Beginner has a question about 3D drawing flicker](https://discourse.processing.org/t/beginner-has-a-question-about-3d-drawing-flicker/4666)

<div class="topic-metadata">

**Author:** [@wsnicol](https://discourse.processing.org/u/wsnicol)\
**Replies:** 4\
**Last updated:** [October 22, 2018, 10:26pm UTC](https://discourse.processing.org/t/beginner-has-a-question-about-3d-drawing-flicker/4666 "2018-10-22T22:26:16Z")

</div>

A simple program used to introduce people to 3D drawing was working fine the other day but now the image is flickering, why is it doing this and how can I stop it ? size(100,100,P3D); background(0); translate(0,height…

---

## [Blur / Filter only part of the image / canvas? (Masking?)](https://discourse.processing.org/t/blur-filter-only-part-of-the-image-canvas-masking/4760)

<div class="topic-metadata">

**Author:** [@evn](https://discourse.processing.org/u/evn)\
**Replies:** 1\
**Last updated:** [October 22, 2018, 7:37pm UTC](https://discourse.processing.org/t/blur-filter-only-part-of-the-image-canvas-masking/4760 "2018-10-22T19:37:44Z")

</div>

I have a large canvas and want to use the blur feature, but it’s too much for my computer to handle in real time. I only really care about the center of the canvas being blurred. (let’s say a circle with radius of 50 or …

---

## [Correct memory diagram? Need a second opinion from someone experienced](https://discourse.processing.org/t/correct-memory-diagram-need-a-second-opinion-from-someone-experienced/4622)

<div class="topic-metadata">

**Author:** [@engg23369](https://discourse.processing.org/u/engg23369)\
**Replies:** 5\
**Last updated:** [October 22, 2018, 4:07pm UTC](https://discourse.processing.org/t/correct-memory-diagram-need-a-second-opinion-from-someone-experienced/4622 "2018-10-22T16:07:43Z")

</div>

Can someone with more experience please verify if this is the correct memory diagram.

---

## [Cylinder into a spline](https://discourse.processing.org/t/cylinder-into-a-spline/1811)

<div class="topic-metadata">

**Author:** [@vjjv](https://discourse.processing.org/u/vjjv)\
**Replies:** 18\
**Last updated:** [October 22, 2018, 3:52pm UTC](https://discourse.processing.org/t/cylinder-into-a-spline/1811 "2018-10-22T15:52:51Z")

</div>

Hello! i\`ve this algorithm to make a 3D cylinder, but i want to deform this and create splines or even apply noise, like a ray. I dont know anything about 3D geometry, maybe some of you can give me an aproach. Also, if i…

---

## [How can i access my server with a external ip?](https://discourse.processing.org/t/how-can-i-access-my-server-with-a-external-ip/4739)

<div class="topic-metadata">

**Author:** [@Quix](https://discourse.processing.org/u/Quix)\
**Replies:** 2\
**Last updated:** [October 22, 2018, 3:40pm UTC](https://discourse.processing.org/t/how-can-i-access-my-server-with-a-external-ip/4739 "2018-10-22T15:40:58Z")

</div>

i want to access my website with a external ip but it’s dosen’t work here’s the code import processing.net.\*; import processing.video.\*; import java.io.File; Server myServer; PrintWriter output; int nb = 0; void setup…

---

## [How to set sample rate/frequency in Minim?](https://discourse.processing.org/t/how-to-set-sample-rate-frequency-in-minim/4743)

<div class="topic-metadata">

**Author:** [@kumouni](https://discourse.processing.org/u/kumouni)\
**Replies:** 0\
**Last updated:** [October 22, 2018, 10:54am UTC](https://discourse.processing.org/t/how-to-set-sample-rate-frequency-in-minim/4743 "2018-10-22T10:54:36Z")

</div>

Hi, Since I have problem using the Sound Library, I’ve been trying to use Minim but I am stuck on changing the rate of the sample. Unlike the Sound library, it seems like it won’t allow me access changing the rate. How…

---

## [Save variable in a loop](https://discourse.processing.org/t/save-variable-in-a-loop/4654)

<div class="topic-metadata">

**Author:** [@hugo](https://discourse.processing.org/u/hugo)\
**Replies:** 7\
**Last updated:** [October 22, 2018, 6:59am UTC](https://discourse.processing.org/t/save-variable-in-a-loop/4654 "2018-10-22T06:59:41Z")

</div>

Hello, I am a beginner in programming. I created a simple program that shows my problem : int A=0; void setup () { size(400,400); } void draw () { background(0); if(mousePressed) { A=A+1; } text(A,200,…

---

## [Text() doesn't seem to be working](https://discourse.processing.org/t/text-doesnt-seem-to-be-working/4712)

<div class="topic-metadata">

**Author:** [@Tsskyx](https://discourse.processing.org/u/Tsskyx)\
**Replies:** 2\
**Last updated:** [October 22, 2018, 5:23am UTC](https://discourse.processing.org/t/text-doesnt-seem-to-be-working/4712 "2018-10-22T05:23:40Z")

</div>

Here’s my project: import com.jogamp.newt.opengl.GLWindow; GLWindow r; PGraphics w, u; int R, L, F, B, U, D, S = 30; float blockSize = 256, mouseSens = .003; PVector move = new PVector(), dir = new PVector(), pos = new…

---

## [Object tracking](https://discourse.processing.org/t/object-tracking/4716)

<div class="topic-metadata">

**Author:** [@ishback](https://discourse.processing.org/u/ishback)\
**Replies:** 1\
**Last updated:** [October 22, 2018, 3:51am UTC](https://discourse.processing.org/t/object-tracking/4716 "2018-10-22T03:51:41Z")

</div>

Hi! Is there any library or example for object tracking with persistence in Processing? So far I’ve been playing with findContours from OpenCV and tried to do the persistance myself, but I thought that should be a probl…

---

## [\[RESOLVED\] mouseX Position as Degrees to Rotate the drawing](https://discourse.processing.org/t/resolved-mousex-position-as-degrees-to-rotate-the-drawing/4722)

<div class="topic-metadata">

**Author:** [@SuBluCat](https://discourse.processing.org/u/SuBluCat)\
**Replies:** 8\
**Last updated:** [October 21, 2018, 11:50pm UTC](https://discourse.processing.org/t/resolved-mousex-position-as-degrees-to-rotate-the-drawing/4722 "2018-10-21T23:50:05Z")

</div>

I have an assignment due tomorrow and there is this one part where it says “Use the mouse’s horizontal position as the amount of degrees to rotate the hero”. (Edit) I’m uploading the complete code cause I realized just …

---

## [Processing Animation Question](https://discourse.processing.org/t/processing-animation-question/4705)

<div class="topic-metadata">

**Author:** [@chisholmem](https://discourse.processing.org/u/chisholmem)\
**Replies:** 4\
**Last updated:** [October 21, 2018, 5:46pm UTC](https://discourse.processing.org/t/processing-animation-question/4705 "2018-10-21T17:46:38Z")

</div>

Hi there- I am currently trying to make an animation for homework for my coding class and I am having trouble. I have three separate squares on the screen, but I don’t know how to properly make them go at different times…

---

## [How to Access Processing Auto-Suggest system?](https://discourse.processing.org/t/how-to-access-processing-auto-suggest-system/4709)

<div class="topic-metadata">

**Author:** [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Replies:** 2\
**Last updated:** [October 21, 2018, 12:16pm UTC](https://discourse.processing.org/t/how-to-access-processing-auto-suggest-system/4709 "2018-10-21T12:16:11Z")

</div>

As the question might Show, i don‘t know how, what, where or Even if something like that really exists or is accessible, But that is the question :sweat\_smile: What i mean, is there a way to get the autosuggestions in a…

---

## [More efficent ways to get PVector heading or atan2](https://discourse.processing.org/t/more-efficent-ways-to-get-pvector-heading-or-atan2/4706)

<div class="topic-metadata">

**Author:** [@Sarah](https://discourse.processing.org/u/Sarah)\
**Replies:** 2\
**Last updated:** [October 21, 2018, 11:23am UTC](https://discourse.processing.org/t/more-efficent-ways-to-get-pvector-heading-or-atan2/4706 "2018-10-21T11:23:41Z")

</div>

Hi, I’ve been experimenting on some steering behaviors, and some of the functions need the velocities heading, but it seemed that PVector.heading() takes up a lot of CPU as it uses atan2() and makes the sketch run slowe…

---

## [Ship fly through the gate (asteroids game)](https://discourse.processing.org/t/ship-fly-through-the-gate-asteroids-game/4647)

<div class="topic-metadata">

**Author:** [@nhghi](https://discourse.processing.org/u/nhghi)\
**Replies:** 3\
**Last updated:** [October 21, 2018, 12:09am UTC](https://discourse.processing.org/t/ship-fly-through-the-gate-asteroids-game/4647 "2018-10-21T00:09:20Z")

</div>

hi, guys, I’m trying to make a small game look like asteroids game but I this time I just need my ship to fly through the gate ( make from 2 direct that the ship can fly in) if it hit the gate the ship should stop at whe…

---

## [Drawing using colors from camera(Pixel Array)](https://discourse.processing.org/t/drawing-using-colors-from-camera-pixel-array/4694)

<div class="topic-metadata">

**Author:** [@spityura](https://discourse.processing.org/u/spityura)\
**Replies:** 1\
**Last updated:** [October 20, 2018, 10:17pm UTC](https://discourse.processing.org/t/drawing-using-colors-from-camera-pixel-array/4694 "2018-10-20T22:17:06Z")

</div>

what am I doing wrong? I’m trying to get rgb values from camera an draw circles with those values it works fine with the get function but with the pixel array it doesn’t look right import processing.video.\*; Capture …

---

## [Function to turn sentence into all caps](https://discourse.processing.org/t/function-to-turn-sentence-into-all-caps/4673)

<div class="topic-metadata">

**Author:** [@engg23369](https://discourse.processing.org/u/engg23369)\
**Replies:** 5\
**Last updated:** [October 20, 2018, 9:50pm UTC](https://discourse.processing.org/t/function-to-turn-sentence-into-all-caps/4673 "2018-10-20T21:50:53Z")

</div>

I’m trying to make my own function that takes a sentence and turns every letter in it into an uppercase. I know there’s a pre-defined function that does this but i’m trying to make own myself. Here’s what I have so far. …

---

## [Syphon server and mixing static and active modes](https://discourse.processing.org/t/syphon-server-and-mixing-static-and-active-modes/4235)

<div class="topic-metadata">

**Author:** [@jtoenjes](https://discourse.processing.org/u/jtoenjes)\
**Replies:** 3\
**Last updated:** [October 20, 2018, 9:11pm UTC](https://discourse.processing.org/t/syphon-server-and-mixing-static-and-active-modes/4235 "2018-10-20T21:11:53Z")

</div>

I’m trying to set up a Syphon Server within the code below (by Golan Levin). The code runs fine if I comment out the server line in void setup(), but once I try to activate the new SyphonServer I get the dreaded “It look…

---

## [Sending string command to DCCpp](https://discourse.processing.org/t/sending-string-command-to-dccpp/4695)

<div class="topic-metadata">

**Author:** [@rva1945](https://discourse.processing.org/u/rva1945)\
**Replies:** 1\
**Last updated:** [October 20, 2018, 8:50pm UTC](https://discourse.processing.org/t/sending-string-command-to-dccpp/4695 "2018-10-20T20:50:53Z")

</div>

Hi: I’m using DCCpp for controlling my trains. Everything works fine but now I want to use a controller that I designed for controlling the turnouts and throttles. Yes I know there is a Processing Controller already wor…

---

## [Why do i get assertion error on world.step();](https://discourse.processing.org/t/why-do-i-get-assertion-error-on-world-step/4685)

<div class="topic-metadata">

**Author:** [@processing\_guy](https://discourse.processing.org/u/processing_guy)\
**Replies:** 2\
**Last updated:** [October 20, 2018, 3:58pm UTC](https://discourse.processing.org/t/why-do-i-get-assertion-error-on-world-step/4685 "2018-10-20T15:58:20Z")

</div>

import fisica.\*; FWorld world; FCircle player; FBox pipeup; FBox pipedown; class game { float x = pipeup.getX(); float y = pipeup.getY(); float x1 = pipedown.getX(); float y1 = pipedown.getY(); void update…

---

## [Game Snake: fluidity problem](https://discourse.processing.org/t/game-snake-fluidity-problem/4664)

<div class="topic-metadata">

**Author:** [@LECARROU](https://discourse.processing.org/u/LECARROU)\
**Replies:** 3\
**Last updated:** [October 20, 2018, 1:37pm UTC](https://discourse.processing.org/t/game-snake-fluidity-problem/4664 "2018-10-20T13:37:21Z")

</div>

Hello, I’m currently programming a snake game under processing and overall the game works with the most basic features: moving snakes that can be directed to the keyboard and I record positions already occupied that can…

---

## [Why do i get NullPointerException and how to fix it](https://discourse.processing.org/t/why-do-i-get-nullpointerexception-and-how-to-fix-it/4456)

<div class="topic-metadata">

**Author:** [@processing\_guy](https://discourse.processing.org/u/processing_guy)\
**Replies:** 4\
**Last updated:** [October 20, 2018, 12:52pm UTC](https://discourse.processing.org/t/why-do-i-get-nullpointerexception-and-how-to-fix-it/4456 "2018-10-20T12:52:38Z")

</div>

import fisica.\*; FBox boxButton; FCircle circleButton; FPoly polyButton; FWorld world; color buttonColor = #155AAD; color hoverColor = #55AA11; color bodyColor = #E6B800; float pos = 0; float angle = 0; float gx = 1…

---

## [Do I have to have Processing installed in order to run the GUI?](https://discourse.processing.org/t/do-i-have-to-have-processing-installed-in-order-to-run-the-gui/4678)

<div class="topic-metadata">

**Author:** [@Mahrokh](https://discourse.processing.org/u/Mahrokh)\
**Replies:** 2\
**Last updated:** [October 20, 2018, 10:55am UTC](https://discourse.processing.org/t/do-i-have-to-have-processing-installed-in-order-to-run-the-gui/4678 "2018-10-20T10:55:28Z")

</div>

I want to make a GUI for an Arduino based pulse sequence generator and I want it to be fool proof and user-friendly. The problem is, I don’t want the user to have to open Processing and see the code and then open the GU…

---

## [Save string into byte array](https://discourse.processing.org/t/save-string-into-byte-array/4371)

<div class="topic-metadata">

**Author:** [@jacobrejin](https://discourse.processing.org/u/jacobrejin)\
**Replies:** 18\
**Last updated:** [October 20, 2018, 9:48am UTC](https://discourse.processing.org/t/save-string-into-byte-array/4371 "2018-10-20T09:48:11Z")

</div>

currently I am converting my text file into a string array and then combining them. once combined I an converting them into an integer array by using split() all the data int the text file is numbers that are a byte lo…

---

## [What are the most efficient sizes for Variables/Arrays?](https://discourse.processing.org/t/what-are-the-most-efficient-sizes-for-variables-arrays/4164)

<div class="topic-metadata">

**Author:** [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Replies:** 5\
**Last updated:** [October 20, 2018, 1:06am UTC](https://discourse.processing.org/t/what-are-the-most-efficient-sizes-for-variables-arrays/4164 "2018-10-20T01:06:34Z")

</div>

What im asking exactly is, which would be the most efficient sizes for Arrays. For numbers from 0 - 2^32 numbers it would be an int, for 0 - 2^64 it would be long, but how does that work for arrays? A perfekt answer woul…

---

## [.dat file does not exist](https://discourse.processing.org/t/dat-file-does-not-exist/4651)

<div class="topic-metadata">

**Author:** [@rva1945](https://discourse.processing.org/u/rva1945)\
**Replies:** 2\
**Last updated:** [October 19, 2018, 8:48pm UTC](https://discourse.processing.org/t/dat-file-does-not-exist/4651 "2018-10-19T20:48:40Z")

</div>

Is there anyway of checking of the file exists prior to loadBytes()? Inicially the file does not exist and the sketch stops. Thanks

---

## [Make a ball move at a speed to where the mouse is clicked](https://discourse.processing.org/t/make-a-ball-move-at-a-speed-to-where-the-mouse-is-clicked/4652)

<div class="topic-metadata">

**Author:** [@kome](https://discourse.processing.org/u/kome)\
**Replies:** 1\
**Last updated:** [October 19, 2018, 6:20pm UTC](https://discourse.processing.org/t/make-a-ball-move-at-a-speed-to-where-the-mouse-is-clicked/4652 "2018-10-19T18:20:03Z")

</div>

I’m new to processing and I’m trying to move a ball (an ellipse) to the position of where the mouse is clicked but I don’t what it to jump there . I want it to move there at a certain speed . int golfBallX = 200; int g…

---

## [Make the object move in the circle (asteroids game)](https://discourse.processing.org/t/make-the-object-move-in-the-circle-asteroids-game/4606)

<div class="topic-metadata">

**Author:** [@nhghi](https://discourse.processing.org/u/nhghi)\
**Replies:** 14\
**Last updated:** [October 19, 2018, 5:56pm UTC](https://discourse.processing.org/t/make-the-object-move-in-the-circle-asteroids-game/4606 "2018-10-19T17:56:04Z")

</div>

i have an object like an arrow and if i want to move all the arrow to move in the circle how can i do it

---

## [\[SOLVED\] PeasyCam raises NoSuchMethodError for PApplet::registerDraw when using Intellij](https://discourse.processing.org/t/solved-peasycam-raises-nosuchmethoderror-for-papplet-registerdraw-when-using-intellij/4535)

<div class="topic-metadata">

**Author:** [@ReflectiveOperation](https://discourse.processing.org/u/ReflectiveOperation)\
**Replies:** 3\
**Last updated:** [October 19, 2018, 3:58pm UTC](https://discourse.processing.org/t/solved-peasycam-raises-nosuchmethoderror-for-papplet-registerdraw-when-using-intellij/4535 "2018-10-19T15:58:34Z")

</div>

Hi, trying to move my project into Intelij\*, but I can’t get PeasyCam to work. I’ve added the library to the project, and it correctly recognizes the PeasyCam type, but when I run the sketch I get the following runtimeE…

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

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