# Processing

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

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

**Page:** 187

---

## [Sometimes can't access classes outside of main .pde file](https://discourse.processing.org/t/sometimes-cant-access-classes-outside-of-main-pde-file/23535)

<div class="topic-metadata">

**Author:** [@usr-pyth](https://discourse.processing.org/u/usr-pyth)\
**Replies:** 3\
**Last updated:** [August 28, 2020, 8:29pm UTC](https://discourse.processing.org/t/sometimes-cant-access-classes-outside-of-main-pde-file/23535 "2020-08-28T20:29:19Z")

</div>

I’m making a Processing example of boids, and I have a main boids.pde file and a boid\_class.pde file. I have a class Boid in the boid\_class.pde file that I’m unable to access from boids.pde. How do I fix this?

---

## [Creating a light source in 2D world](https://discourse.processing.org/t/creating-a-light-source-in-2d-world/23528)

<div class="topic-metadata">

**Author:** [@xSimas](https://discourse.processing.org/u/xSimas)\
**Replies:** 3\
**Last updated:** [August 28, 2020, 5:30pm UTC](https://discourse.processing.org/t/creating-a-light-source-in-2d-world/23528 "2020-08-28T17:30:19Z")

</div>

Hi. I’m trying to create a light source in 2D. As an example, take a game character in 2D world that is holding a torch in a dark cave and there’s some area around him that’s fully lit up and then it gets darker (as the …

---

## [That's strange! Detect mouse inside a box?](https://discourse.processing.org/t/thats-strange-detect-mouse-inside-a-box/23443)

<div class="topic-metadata">

**Author:** [@HumanoidX](https://discourse.processing.org/u/HumanoidX)\
**Replies:** 10\
**Last updated:** [August 28, 2020, 12:41pm UTC](https://discourse.processing.org/t/thats-strange-detect-mouse-inside-a-box/23443 "2020-08-28T12:41:34Z")

</div>

I remember that I did that in a Periodic Table program before, my Dad accidentally deleted the D: drive in my computer and everything inside got lost. This is my code: boolean mouseIsBetween(float x1,float y1,float x2,…

---

## [strokeWeight() acting strangely with FX2D](https://discourse.processing.org/t/strokeweight-acting-strangely-with-fx2d/23423)

<div class="topic-metadata">

**Author:** [@ketchupmustard](https://discourse.processing.org/u/ketchupmustard)\
**Replies:** 2\
**Last updated:** [August 28, 2020, 8:16am UTC](https://discourse.processing.org/t/strokeweight-acting-strangely-with-fx2d/23423 "2020-08-28T08:16:06Z")

</div>

Hey y’all. I was gonna post my code but I noticed it’s resolved once I get rid of FX2D in my fullscreen() declaration. Basically I couldn’t seem to selectively change the strokeWeight - I couldn’t change certain elemen…

---

## [Trying to call a function from one class to another. Worked until I made created an array of the Class](https://discourse.processing.org/t/trying-to-call-a-function-from-one-class-to-another-worked-until-i-made-created-an-array-of-the-class/23468)

<div class="topic-metadata">

**Author:** [@BackTo](https://discourse.processing.org/u/BackTo)\
**Replies:** 4\
**Last updated:** [August 27, 2020, 9:05pm UTC](https://discourse.processing.org/t/trying-to-call-a-function-from-one-class-to-another-worked-until-i-made-created-an-array-of-the-class/23468 "2020-08-27T21:05:50Z")

</div>

Hi, I’ve probably not described the problem in the title properly. The error I get is ‘sx cannot be resolved or is not a field’ Me again. I’m adapting an old sketch just as a practice tool to help cement the various c…

---

## [Tramontana Multitouch Event](https://discourse.processing.org/t/tramontana-multitouch-event/23497)

<div class="topic-metadata">

**Author:** [@Hyperion65](https://discourse.processing.org/u/Hyperion65)\
**Replies:** 5\
**Last updated:** [August 27, 2020, 5:59pm UTC](https://discourse.processing.org/t/tramontana-multitouch-event/23497 "2020-08-27T17:59:57Z")

</div>

I hope someone has experience with the Tramontana library for Processing. While normal Touch recognition seems to work well, it seems I am unable to get the values for multitouch, All the other values are accessible, bu…

---

## [Get average heading](https://discourse.processing.org/t/get-average-heading/23483)

<div class="topic-metadata">

**Author:** [@TimoL](https://discourse.processing.org/u/TimoL)\
**Replies:** 8\
**Last updated:** [August 27, 2020, 4:41pm UTC](https://discourse.processing.org/t/get-average-heading/23483 "2020-08-27T16:41:04Z")

</div>

I have another maths/coding question. Im trying to figure out the average heading of an array of PVectors. At first I tried adding up the heading values and dividing that by the count. But there are scenarios where th…

---

## [How to Plot a Mandelbulb](https://discourse.processing.org/t/how-to-plot-a-mandelbulb/23490)

<div class="topic-metadata">

**Author:** [@rubbs](https://discourse.processing.org/u/rubbs)\
**Replies:** 12\
**Last updated:** [August 27, 2020, 2:25pm UTC](https://discourse.processing.org/t/how-to-plot-a-mandelbulb/23490 "2020-08-27T14:25:42Z")

</div>

Hello, I am trying to recreate the mandelbulb in processing (a 3D version of the mandelbrot set). I have looked through multiple sites for the equations to plot but they are different depending on the site. I am also st…

---

## [Processing version-3 is not working with Windows 10](https://discourse.processing.org/t/processing-version-3-is-not-working-with-windows-10/23521)

<div class="topic-metadata">

**Author:** [@Sreejith](https://discourse.processing.org/u/Sreejith)\
**Replies:** 0\
**Last updated:** [August 27, 2020, 10:55am UTC](https://discourse.processing.org/t/processing-version-3-is-not-working-with-windows-10/23521 "2020-08-27T10:55:39Z")

</div>

Processing 2.1 is working fine with Windows10 in my org domain environment.Unfortunately latest version is not working with Windows 10. We are calling application from local network share.Its receiving code but no output…

---

## [Problem with Selection Sort?](https://discourse.processing.org/t/problem-with-selection-sort/23506)

<div class="topic-metadata">

**Author:** [@Brucef](https://discourse.processing.org/u/Brucef)\
**Replies:** 2\
**Last updated:** [August 27, 2020, 7:32am UTC](https://discourse.processing.org/t/problem-with-selection-sort/23506 "2020-08-27T07:32:28Z")

</div>

The Selection Sort coded below does not sort correctly. The numbers 7,66,5,40,33,99 are entered into an array called nums\[ \]. When the program is run they do not sort from low to high? Certain sequences will sort, such…

---

## [Problem with wraparound when using beginShape()](https://discourse.processing.org/t/problem-with-wraparound-when-using-beginshape/23511)

<div class="topic-metadata">

**Author:** [@mruts](https://discourse.processing.org/u/mruts)\
**Replies:** 0\
**Last updated:** [August 26, 2020, 9:39pm UTC](https://discourse.processing.org/t/problem-with-wraparound-when-using-beginshape/23511 "2020-08-26T21:39:45Z")

</div>

Hi, I’m trying to adapt this code (from Daniel Shiffman). It uses an image to generate a flow field, then draw lines following the field. The issue I’m having (I think) is in void borders() in the Vehicle class. When th…

---

## [Collision shape after rotate](https://discourse.processing.org/t/collision-shape-after-rotate/23426)

<div class="topic-metadata">

**Author:** [@NoName](https://discourse.processing.org/u/NoName)\
**Replies:** 1\
**Last updated:** [August 26, 2020, 8:29pm UTC](https://discourse.processing.org/t/collision-shape-after-rotate/23426 "2020-08-26T20:29:19Z")

</div>

Please explain to me how you can check the collision of rectangular shapes after they have been rotated. Question number 2. How to correctly get the vertex of the shape after rotation? I have after getVertex() a point …

---

## [Best way to emulate a rotary encoder wheel?](https://discourse.processing.org/t/best-way-to-emulate-a-rotary-encoder-wheel/21982)

<div class="topic-metadata">

**Author:** [@rkdnson](https://discourse.processing.org/u/rkdnson)\
**Replies:** 22\
**Last updated:** [August 21, 2020, 11:21am UTC](https://discourse.processing.org/t/best-way-to-emulate-a-rotary-encoder-wheel/21982 "2020-08-21T11:21:07Z")

</div>

Hello all. Trying to find the easiest way to capture user input on an encoder wheel. In theory, I would want to track the clockwise / counterclockwise mouse movement within the area representing the encoder. So instead o…

---

## [Cp5 TextField bug](https://discourse.processing.org/t/cp5-textfield-bug/23471)

<div class="topic-metadata">

**Author:** [@shuptuu](https://discourse.processing.org/u/shuptuu)\
**Replies:** 3\
**Last updated:** [August 25, 2020, 8:47am UTC](https://discourse.processing.org/t/cp5-textfield-bug/23471 "2020-08-25T08:47:40Z")

</div>

Hi, Something weird with TextField controller from cp5: In a project, I have to manage the visibility of an ArrayList of Textfield controllers, according different parameters. So the best way I found to do it is in my …

---

## [Importing Processing Video Library into IntelliJ](https://discourse.processing.org/t/importing-processing-video-library-into-intellij/23437)

<div class="topic-metadata">

**Author:** [@Caleb](https://discourse.processing.org/u/Caleb)\
**Replies:** 3\
**Last updated:** [August 24, 2020, 10:37pm UTC](https://discourse.processing.org/t/importing-processing-video-library-into-intellij/23437 "2020-08-24T22:37:13Z")

</div>

I’m able to import Processing just fine but I’m unable to import the Processing Video library. I’ve tried tried adding the whole folder to the library and adding the .jars to the library. When I just put in the whole…

---

## [Detection of collision between elements from same array only works sometimes](https://discourse.processing.org/t/detection-of-collision-between-elements-from-same-array-only-works-sometimes/23447)

<div class="topic-metadata">

**Author:** [@Leonsuper](https://discourse.processing.org/u/Leonsuper)\
**Replies:** 6\
**Last updated:** [August 24, 2020, 11:16am UTC](https://discourse.processing.org/t/detection-of-collision-between-elements-from-same-array-only-works-sometimes/23447 "2020-08-24T11:16:07Z")

</div>

Hello! I’ve created a small program where circles stored in an array move through the window. They rebound when they hit the window’s limits and they’re supposed to rebound when they collide with each other, but thesse …

---

## [Make one of my sketches a screensaver](https://discourse.processing.org/t/make-one-of-my-sketches-a-screensaver/23456)

<div class="topic-metadata">

**Author:** [@Crysp](https://discourse.processing.org/u/Crysp)\
**Replies:** 1\
**Last updated:** [August 24, 2020, 9:34am UTC](https://discourse.processing.org/t/make-one-of-my-sketches-a-screensaver/23456 "2020-08-24T09:34:58Z")

</div>

Hello, I want to make one of my Processing sketches my screensaver, and am wondering if there was a way that I can make it one. Here is the sketch that I am talking about if you’re interested. I have Windows 10 if that i…

---

## [textWidth() .... what is being returned?](https://discourse.processing.org/t/textwidth-what-is-being-returned/7864)

<div class="topic-metadata">

**Author:** [@shedMusic](https://discourse.processing.org/u/shedMusic)\
**Replies:** 8\
**Last updated:** [August 24, 2020, 5:30am UTC](https://discourse.processing.org/t/textwidth-what-is-being-returned/7864 "2020-08-24T05:30:43Z")

</div>

Just playing with text and think that textWidth() returns a length that includes an added space? Test code: String\[\] strArray = {"the", "quick", "brown", "fox"} ; int xOffset = 0 ; void setup() { size(400, 400) ; …

---

## [Syntax error on(s), misplaced construct(s)](https://discourse.processing.org/t/syntax-error-on-s-misplaced-construct-s/23446)

<div class="topic-metadata">

**Author:** [@shaymin-le-dev](https://discourse.processing.org/u/shaymin-le-dev)\
**Replies:** 0\
**Last updated:** [August 23, 2020, 7:16pm UTC](https://discourse.processing.org/t/syntax-error-on-s-misplaced-construct-s/23446 "2020-08-23T19:16:21Z")

</div>

Hello i have this error: Syntax error on(s), misplaced construct(s) when I want to start this code: import static javax.swing.JOptionPane.\*; String snto = "55"; snto = showInputDialog("enter the number of faces"); I h…

---

## [Problem with storing user-entered text in a string](https://discourse.processing.org/t/problem-with-storing-user-entered-text-in-a-string/23348)

<div class="topic-metadata">

**Author:** [@benvining](https://discourse.processing.org/u/benvining)\
**Replies:** 9\
**Last updated:** [August 23, 2020, 2:58pm UTC](https://discourse.processing.org/t/problem-with-storing-user-entered-text-in-a-string/23348 "2020-08-23T14:58:59Z")

</div>

Hello all! As part of a larger project, I created a popup window where a user can enter some text (to change their username in a game). I have a String that stores the player’s username and a separate String that stores …

---

## [Trying to offset vector](https://discourse.processing.org/t/trying-to-offset-vector/23304)

<div class="topic-metadata">

**Author:** [@TimoL](https://discourse.processing.org/u/TimoL)\
**Replies:** 2\
**Last updated:** [August 23, 2020, 6:14am UTC](https://discourse.processing.org/t/trying-to-offset-vector/23304 "2020-08-23T06:14:16Z")

</div>

Im trying to offset a vector. Im sure this is really easy, but Im struggling with the maths. Basically I have 2 vectors: A & B. (Green & red) Using them I am creating a new Vector: C (blue) My goal is to ‘offset’ ve…

---

## [Is this possible? Interactive panning inside video play](https://discourse.processing.org/t/is-this-possible-interactive-panning-inside-video-play/23434)

<div class="topic-metadata">

**Author:** [@Algorithmicself](https://discourse.processing.org/u/Algorithmicself)\
**Replies:** 0\
**Last updated:** [August 23, 2020, 3:03am UTC](https://discourse.processing.org/t/is-this-possible-interactive-panning-inside-video-play/23434 "2020-08-23T03:03:13Z")

</div>

Hi! I have a question or request for guidelines how to approach my task to create an interactive pan inside a video play. I have one video file. It is a 4 x 4K video - meaning a video file in resolution size of (4x384…

---

## [Fixing an 'unknown source' issue preventing Eclipse debugging within a custom Processing library](https://discourse.processing.org/t/fixing-an-unknown-source-issue-preventing-eclipse-debugging-within-a-custom-processing-library/23432)

<div class="topic-metadata">

**Author:** [@colinpt](https://discourse.processing.org/u/colinpt)\
**Replies:** 0\
**Last updated:** [August 23, 2020, 3:03am UTC](https://discourse.processing.org/t/fixing-an-unknown-source-issue-preventing-eclipse-debugging-within-a-custom-processing-library/23432 "2020-08-23T03:03:04Z")

</div>

I’m building myself a processing library, and I would like to be able to step into my library methods fro my Proclipsing sketch in order to properly debug. However, after trying numerous fixes, I am unable to get this fu…

---

## [Too many calls to pushMatrix()](https://discourse.processing.org/t/too-many-calls-to-pushmatrix/23411)

<div class="topic-metadata">

**Author:** [@todai](https://discourse.processing.org/u/todai)\
**Replies:** 8\
**Last updated:** [August 23, 2020, 2:31am UTC](https://discourse.processing.org/t/too-many-calls-to-pushmatrix/23411 "2020-08-23T02:31:02Z")

</div>

Hey, Is there a way to increase the matrix stack depth for pushMatrix()? I am working with 3D objects that have to be displayed with a relative position from one and other. The 3D objects are all created with box() fro…

---

## [Degree of rotation is broken](https://discourse.processing.org/t/degree-of-rotation-is-broken/23428)

<div class="topic-metadata">

**Author:** [@NoName](https://discourse.processing.org/u/NoName)\
**Replies:** 3\
**Last updated:** [August 22, 2020, 11:02pm UTC](https://discourse.processing.org/t/degree-of-rotation-is-broken/23428 "2020-08-22T23:02:34Z")

</div>

I rotate the shape manually by iterating over the vertices. But as with a normal turn, the turn comes from the first peak. I have a Vector that means the position of this shape, but after rotation the vector is not in …

---

## [P2D Misbehaviour](https://discourse.processing.org/t/p2d-misbehaviour/23427)

<div class="topic-metadata">

**Author:** [@MasterSailor](https://discourse.processing.org/u/MasterSailor)\
**Replies:** 1\
**Last updated:** [August 22, 2020, 5:14pm UTC](https://discourse.processing.org/t/p2d-misbehaviour/23427 "2020-08-22T17:14:35Z")

</div>

I needed to adapt a fairly large application to use P2D instead of JAVA2D as the main renderer, because a new feature uses some 3D graphics (createGraphics(wdth,hght, P3D)) and this is evidently not possible with the mai…

---

## [About JS Google Maps](https://discourse.processing.org/t/about-js-google-maps/23206)

<div class="topic-metadata">

**Author:** [@SouSageYa](https://discourse.processing.org/u/SouSageYa)\
**Replies:** 1\
**Last updated:** [August 22, 2020, 4:29pm UTC](https://discourse.processing.org/t/about-js-google-maps/23206 "2020-08-22T16:29:19Z")

</div>

How to send arduino values to a map created by Js

---

## [Movie Maker Tool not Using Last Images](https://discourse.processing.org/t/movie-maker-tool-not-using-last-images/23251)

<div class="topic-metadata">

**Author:** [@playinmyblues](https://discourse.processing.org/u/playinmyblues)\
**Replies:** 3\
**Last updated:** [August 21, 2020, 5:20am UTC](https://discourse.processing.org/t/movie-maker-tool-not-using-last-images/23251 "2020-08-21T05:20:28Z")

</div>

There is a series of photos that I am using with the Movie Maker Tool. I used it with the first set of images and found that the video was too fast. I copied each file and pasted back in the same folder so that the the o…

---

## [How do I make the snake's tail add on when i hit the apple?](https://discourse.processing.org/t/how-do-i-make-the-snakes-tail-add-on-when-i-hit-the-apple/23322)

<div class="topic-metadata">

**Author:** [@cdixo82](https://discourse.processing.org/u/cdixo82)\
**Replies:** 3\
**Last updated:** [August 20, 2020, 9:14pm UTC](https://discourse.processing.org/t/how-do-i-make-the-snakes-tail-add-on-when-i-hit-the-apple/23322 "2020-08-20T21:14:47Z")

</div>

ArrayList\<Integer\> x = new ArrayList\<Integer\>(); ArrayList\<Integer\> y = new ArrayList\<Integer\>(); int gridSize = 20; int h = height; int w = height; int xdir = 0; int ydir = 0; boolean eaten = false; int applex; int app…

---

## [Slow performance when passing multiple PGraphics into each other as shader textures](https://discourse.processing.org/t/slow-performance-when-passing-multiple-pgraphics-into-each-other-as-shader-textures/23384)

<div class="topic-metadata">

**Author:** [@neel](https://discourse.processing.org/u/neel)\
**Replies:** 2\
**Last updated:** [August 20, 2020, 1:10pm UTC](https://discourse.processing.org/t/slow-performance-when-passing-multiple-pgraphics-into-each-other-as-shader-textures/23384 "2020-08-20T13:10:48Z")

</div>

Hey all, I’m attempting to use multiple pgraphics objects for my code. I want to draw some shapes on the first pgraphics. I then want to use a shader on the second pgraphics object to apply blur to the red channel and t…

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

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