# Processing

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

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

**Page:** 127

---

## [Parsing object to array/Getting name of an object attribute](https://discourse.processing.org/t/parsing-object-to-array-getting-name-of-an-object-attribute/30759)

<div class="topic-metadata">

**Author:** [@Naik\_Trofimov](https://discourse.processing.org/u/Naik_Trofimov)\
**Replies:** 3\
**Last updated:** [June 17, 2021, 4:40pm UTC](https://discourse.processing.org/t/parsing-object-to-array-getting-name-of-an-object-attribute/30759 "2021-06-17T16:40:44Z")

</div>

Hello everyone, I had an idea to try to make a tool for saving the state of a running program on processing, which could be applied by adding just a couple of lines, I would call it “quick save”. The problem is that in a…

---

## [Error in sound player](https://discourse.processing.org/t/error-in-sound-player/30717)

<div class="topic-metadata">

**Author:** [@Pauls](https://discourse.processing.org/u/Pauls)\
**Replies:** 1\
**Last updated:** [June 17, 2021, 4:05pm UTC](https://discourse.processing.org/t/error-in-sound-player/30717 "2021-06-17T16:05:23Z")

</div>

I tried to test sound file but there is no respond. Can some one tell me the reason. The music.play become yellow and the following error is on consol: NullPointerException Here is the code: import processing.sound.\*; …

---

## [Organic Random Lines](https://discourse.processing.org/t/organic-random-lines/30748)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 2\
**Last updated:** [June 16, 2021, 10:53pm UTC](https://discourse.processing.org/t/organic-random-lines/30748 "2021-06-16T22:53:34Z")

</div>

Hi there! I am trying to draw organic lines, so I have started making that kind of oscillations that you can see on black line. I don’t know if that can be done easier, but is was the only possible way for my beguinner l…

---

## [Please help me. "It looks like you're mixing "active" and "static" modes."](https://discourse.processing.org/t/please-help-me-it-looks-like-youre-mixing-active-and-static-modes/30743)

<div class="topic-metadata">

**Author:** [@sasa](https://discourse.processing.org/u/sasa)\
**Replies:** 2\
**Last updated:** [June 16, 2021, 7:43pm UTC](https://discourse.processing.org/t/please-help-me-it-looks-like-youre-mixing-active-and-static-modes/30743 "2021-06-16T19:43:06Z")

</div>

Robot r1; void setup(){ size(800, 600); r1 = new Robot(); r1.setPos(width/2, height/2); } void draw(){ r1.display(); } noStroke(); fill(204, 10); rect(0, 0, width, height); stroke(0); translate(transX, trans…

---

## [What is the code from the light sensor to control my waveform?](https://discourse.processing.org/t/what-is-the-code-from-the-light-sensor-to-control-my-waveform/30736)

<div class="topic-metadata">

**Author:** [@Marga](https://discourse.processing.org/u/Marga)\
**Replies:** 1\
**Last updated:** [June 15, 2021, 11:52pm UTC](https://discourse.processing.org/t/what-is-the-code-from-the-light-sensor-to-control-my-waveform/30736 "2021-06-15T23:52:09Z")

</div>

Hi, I’m having difficulties in reaching my goal, which is with the Arduino Esplora, when I point more light to the light sensor my waveform in the processing increases and when the sensor receives less this waveform disa…

---

## [Basic Ball bouncing with mouse](https://discourse.processing.org/t/basic-ball-bouncing-with-mouse/30735)

<div class="topic-metadata">

**Author:** [@userfc](https://discourse.processing.org/u/userfc)\
**Replies:** 1\
**Last updated:** [June 15, 2021, 10:40pm UTC](https://discourse.processing.org/t/basic-ball-bouncing-with-mouse/30735 "2021-06-15T22:40:39Z")

</div>

Hi! I need help because I don’t know where to start. I want to build a small game of tiles where you start with a grid of 5x5 balls opposed to one ball that represents the user’s cursor. The first need is to be able to h…

---

## [Coding game: catching coins and avoiding bombs](https://discourse.processing.org/t/coding-game-catching-coins-and-avoiding-bombs/30709)

<div class="topic-metadata">

**Author:** [@processinggg](https://discourse.processing.org/u/processinggg)\
**Replies:** 9\
**Last updated:** [June 15, 2021, 6:50pm UTC](https://discourse.processing.org/t/coding-game-catching-coins-and-avoiding-bombs/30709 "2021-06-15T18:50:40Z")

</div>

Hello, I have a few questions about following code. I have coins, which are being caught by the ship and b0mbs which have to be avoided. However, the b0mbs are somehow stuck with the coins and they aren’t their own objec…

---

## [Adding Score Mechanism](https://discourse.processing.org/t/adding-score-mechanism/30690)

<div class="topic-metadata">

**Author:** [@azul](https://discourse.processing.org/u/azul)\
**Replies:** 10\
**Last updated:** [June 15, 2021, 5:16pm UTC](https://discourse.processing.org/t/adding-score-mechanism/30690 "2021-06-15T17:16:43Z")

</div>

Hi, I made a simple game, yet I couldn’t add a scoring mechanism and an opening scene. When the spaceship hits one of the balls, it loses score, when it explodes the balls using mouse function, it gains scores. It would …

---

## [Adobe Illustrator blend tool simulation in Processing](https://discourse.processing.org/t/adobe-illustrator-blend-tool-simulation-in-processing/30649)

<div class="topic-metadata">

**Author:** [@borjan.pavlek](https://discourse.processing.org/u/borjan.pavlek)\
**Replies:** 4\
**Last updated:** [June 15, 2021, 9:00am UTC](https://discourse.processing.org/t/adobe-illustrator-blend-tool-simulation-in-processing/30649 "2021-06-15T09:00:12Z")

</div>

Hey everyone, just a quick question - is it possible to re-create blending tool via code in processing? It should look something like this. I am new to processing, I can understand basics and this is something I would …

---

## [Crash-Causing Error with trying to display Lives](https://discourse.processing.org/t/crash-causing-error-with-trying-to-display-lives/30706)

<div class="topic-metadata">

**Author:** [@spamelim](https://discourse.processing.org/u/spamelim)\
**Replies:** 3\
**Last updated:** [June 14, 2021, 7:29pm UTC](https://discourse.processing.org/t/crash-causing-error-with-trying-to-display-lives/30706 "2021-06-14T19:29:35Z")

</div>

I have been trying to make a space-shooter type game, and I have been coding lives (which work until I try to display them). My code to display the life count is Player p; void draw() { text("Lives:", 100, 100); text…

---

## [Some help with Conways Game Of Life](https://discourse.processing.org/t/some-help-with-conways-game-of-life/30605)

<div class="topic-metadata">

**Author:** [@Ironbatman1](https://discourse.processing.org/u/Ironbatman1)\
**Replies:** 14\
**Last updated:** [June 14, 2021, 1:43pm UTC](https://discourse.processing.org/t/some-help-with-conways-game-of-life/30605 "2021-06-14T13:43:22Z")

</div>

Alright so I’ve been working on the game of life and have run into a weird problem. There are squares deciding to draw alive for an unknown reason. I have used print to check what the state is at those steps and I know i…

---

## [Can´t run sketches in VS Code from one day to another](https://discourse.processing.org/t/can-t-run-sketches-in-vs-code-from-one-day-to-another/30703)

<div class="topic-metadata">

**Author:** [@cheister](https://discourse.processing.org/u/cheister)\
**Replies:** 2\
**Last updated:** [June 14, 2021, 12:55pm UTC](https://discourse.processing.org/t/can-t-run-sketches-in-vs-code-from-one-day-to-another/30703 "2021-06-14T12:55:05Z")

</div>

Hi, I installed the Processing VSCode Plugin which worked very well but from one day to another the following error occurred: Could not run the sketch (Target VM failed to initialize). It still works in the Processing I…

---

## [Coding a composite image of images that randomly shuffle in placement](https://discourse.processing.org/t/coding-a-composite-image-of-images-that-randomly-shuffle-in-placement/30694)

<div class="topic-metadata">

**Author:** [@phanan](https://discourse.processing.org/u/phanan)\
**Replies:** 1\
**Last updated:** [June 14, 2021, 10:40am UTC](https://discourse.processing.org/t/coding-a-composite-image-of-images-that-randomly-shuffle-in-placement/30694 "2021-06-14T10:40:31Z")

</div>

I know how to code basic Python, but am brand new to Processing/p5j.s. Any help would be appreciated on the steps needed to do the following: I want to code an array of images to fill the background of a webpage, and ha…

---

## [How to control the mouse in processing?](https://discourse.processing.org/t/how-to-control-the-mouse-in-processing/30684)

<div class="topic-metadata">

**Author:** [@ProcessingTOP](https://discourse.processing.org/u/ProcessingTOP)\
**Replies:** 1\
**Last updated:** [June 14, 2021, 10:20am UTC](https://discourse.processing.org/t/how-to-control-the-mouse-in-processing/30684 "2021-06-14T10:20:37Z")

</div>

We need a library to control the mouse for processing. It is for control, not reading.

---

## [3d scanner with Arduino and laser pointer](https://discourse.processing.org/t/3d-scanner-with-arduino-and-laser-pointer/30360)

<div class="topic-metadata">

**Author:** [@jafal](https://discourse.processing.org/u/jafal)\
**Replies:** 78\
**Last updated:** [June 13, 2021, 11:22pm UTC](https://discourse.processing.org/t/3d-scanner-with-arduino-and-laser-pointer/30360 "2021-06-13T23:22:13Z")

</div>

hi all i am thinking to make 3d scanner using line laser pointer with rotation table and web camera all hardware is fine with me Arduino and laser with camera mount is ok i have reach to result like this …

---

## [Move PacMan Using Arrow Key](https://discourse.processing.org/t/move-pacman-using-arrow-key/30670)

<div class="topic-metadata">

**Author:** [@MacJ](https://discourse.processing.org/u/MacJ)\
**Replies:** 6\
**Last updated:** [June 13, 2021, 10:24pm UTC](https://discourse.processing.org/t/move-pacman-using-arrow-key/30670 "2021-06-13T22:24:46Z")

</div>

Hello, here is my attempt at it any help would be much appreciated. //The variables that control everything known about the pacman float pacmanX, pacmanY; //The position of the pacman final int PACMAN\_DIAMETER =…

---

## [The work of Georg Nees](https://discourse.processing.org/t/the-work-of-georg-nees/30558)

<div class="topic-metadata">

**Author:** [@debxyz](https://discourse.processing.org/u/debxyz)\
**Replies:** 12\
**Last updated:** [June 13, 2021, 8:27pm UTC](https://discourse.processing.org/t/the-work-of-georg-nees/30558 "2021-06-13T20:27:24Z")

</div>

I recently stumbled upon a reference to Georg Nees. I then found a few pieces (eight) of his work on the Victoria and Albert Museum site. And there is a database of more of his work here: http://dada.compart-bremen.de…

---

## [How can I implement a PlayStation Controller (with rumble)](https://discourse.processing.org/t/how-can-i-implement-a-playstation-controller-with-rumble/30662)

<div class="topic-metadata">

**Author:** [@EinsMalteHH](https://discourse.processing.org/u/EinsMalteHH)\
**Replies:** 5\
**Last updated:** [June 13, 2021, 9:28am UTC](https://discourse.processing.org/t/how-can-i-implement-a-playstation-controller-with-rumble/30662 "2021-06-13T09:28:43Z")

</div>

I have tried using Game Control plus, and it worked okay… But It doesn’t seem to work for rumbling my PlayStation 4 Controller (Dual shock 4)

---

## [Help with comparing values in an array](https://discourse.processing.org/t/help-with-comparing-values-in-an-array/30668)

<div class="topic-metadata">

**Author:** [@TheBearOfJare](https://discourse.processing.org/u/TheBearOfJare)\
**Replies:** 1\
**Last updated:** [June 13, 2021, 6:17am UTC](https://discourse.processing.org/t/help-with-comparing-values-in-an-array/30668 "2021-06-13T06:17:09Z")

</div>

So, I’ve been writing various homemade neural networks, and I’ve realized that I waste a ton of time re-writing code and spending too much time writing ten billion copies of the same variable with just a different name. …

---

## [Beginner: how to run examples from 'The Book of Shaders'](https://discourse.processing.org/t/beginner-how-to-run-examples-from-the-book-of-shaders/4682)

<div class="topic-metadata">

**Author:** [@Hieronymus](https://discourse.processing.org/u/Hieronymus)\
**Replies:** 10\
**Last updated:** [June 12, 2021, 10:26am UTC](https://discourse.processing.org/t/beginner-how-to-run-examples-from-the-book-of-shaders/4682 "2021-06-12T10:26:35Z")

</div>

Hello and thank you, I am an absolute beginner with minimal knowledge of coding and I started working trough the examples of ‘The Book of Shaders’ ( https://thebookofshaders.com) I am trying to get the example code to …

---

## [Strange pixels with point()](https://discourse.processing.org/t/strange-pixels-with-point/30659)

<div class="topic-metadata">

**Author:** [@maze](https://discourse.processing.org/u/maze)\
**Replies:** 4\
**Last updated:** [June 12, 2021, 10:13am UTC](https://discourse.processing.org/t/strange-pixels-with-point/30659 "2021-06-12T10:13:19Z")

</div>

Drawing points with float positions doesn’t seem to round correctly in special situations. It seems that sometimes two points are rendered instead of one. stroke(0); strokeWeight(3); point(10, 19.9999); point(1…

---

## [Recreate Parabolic Triangle](https://discourse.processing.org/t/recreate-parabolic-triangle/30638)

<div class="topic-metadata">

**Author:** [@Chencho](https://discourse.processing.org/u/Chencho)\
**Replies:** 2\
**Last updated:** [June 12, 2021, 2:40am UTC](https://discourse.processing.org/t/recreate-parabolic-triangle/30638 "2021-06-12T02:40:49Z")

</div>

I want to recreate this Parabolic triangle gif using Processing. I’ve already got the “base” code figured out I think. What I need now is to cycle through my code to get the correct number of triangles/lines. I’m using…

---

## [PBox2D How to change individual shapes' Position in a body?](https://discourse.processing.org/t/pbox2d-how-to-change-individual-shapes-position-in-a-body/30646)

<div class="topic-metadata">

**Author:** [@goblincaptain](https://discourse.processing.org/u/goblincaptain)\
**Replies:** 2\
**Last updated:** [June 11, 2021, 3:13pm UTC](https://discourse.processing.org/t/pbox2d-how-to-change-individual-shapes-position-in-a-body/30646 "2021-06-11T15:13:27Z")

</div>

I want to create a static body with two rectangles in processing, and i want them to be like an “L”, but now the two rectangles are placed in the middle, and I don’t know how to fix that. Any suggestion will be appreciat…

---

## [Using Sound with Processing](https://discourse.processing.org/t/using-sound-with-processing/30641)

<div class="topic-metadata">

**Author:** [@Iperez](https://discourse.processing.org/u/Iperez)\
**Replies:** 0\
**Last updated:** [June 11, 2021, 2:45am UTC](https://discourse.processing.org/t/using-sound-with-processing/30641 "2021-06-11T02:45:03Z")

</div>

I am trying to add sound to my code using the Processing sound library but the sound is very slow and suddenly stops playing. I am working with an IMac 8Gb of Ram using Sur. The code is correct, I tested it on other com…

---

## [Formula does work on paper however not in my very simple program](https://discourse.processing.org/t/formula-does-work-on-paper-however-not-in-my-very-simple-program/30141)

<div class="topic-metadata">

**Author:** [@Nino](https://discourse.processing.org/u/Nino)\
**Replies:** 3\
**Last updated:** [June 10, 2021, 8:28pm UTC](https://discourse.processing.org/t/formula-does-work-on-paper-however-not-in-my-very-simple-program/30141 "2021-06-10T20:28:00Z")

</div>

I’m running into an issue where it seems like processing is wrongly calculating my formulas. The idea is simple I draw a line and I want to draw n number of points on that line, evenly distributed. So I came up with a …

---

## [Transparent sketch](https://discourse.processing.org/t/transparent-sketch/30603)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 1\
**Last updated:** [June 10, 2021, 7:29pm UTC](https://discourse.processing.org/t/transparent-sketch/30603 "2021-06-10T19:29:35Z")

</div>

@GoToLoop I’m just following an old thread and stumbled upon some of your code https://forum.processing.org/two/discussion/20499/moving-a-translucent-window-around-the-screen/p1 /\*\* \* Opacity + WindowDecoration (v2.0…

---

## [Fix NullPointerException error](https://discourse.processing.org/t/fix-nullpointerexception-error/30632)

<div class="topic-metadata">

**Author:** [@Chencho](https://discourse.processing.org/u/Chencho)\
**Replies:** 3\
**Last updated:** [June 10, 2021, 7:21pm UTC](https://discourse.processing.org/t/fix-nullpointerexception-error/30632 "2021-06-10T19:21:13Z")

</div>

I have an error in my code and I’m not sure how to fix it.I’m relatively new to Arrays. I want to sort the numbers given in Arreglo into two other arrays, one for positive numbers and the other for negative. Error is o…

---

## [Need to Delete control from G4P Builder](https://discourse.processing.org/t/need-to-delete-control-from-g4p-builder/30634)

<div class="topic-metadata">

**Author:** [@microchip22](https://discourse.processing.org/u/microchip22)\
**Replies:** 0\
**Last updated:** [June 10, 2021, 6:37pm UTC](https://discourse.processing.org/t/need-to-delete-control-from-g4p-builder/30634 "2021-06-10T18:37:57Z")

</div>

I added a control to a window in the G4P designer and now I want to deleted it. I tried to highlight the control, and press the delete key.

---

## [Reordering a chopped-up video (crop images from frames)](https://discourse.processing.org/t/reordering-a-chopped-up-video-crop-images-from-frames/30567)

<div class="topic-metadata">

**Author:** [@Mat100](https://discourse.processing.org/u/Mat100)\
**Replies:** 4\
**Last updated:** [June 10, 2021, 4:06pm UTC](https://discourse.processing.org/t/reordering-a-chopped-up-video-crop-images-from-frames/30567 "2021-06-10T16:06:06Z")

</div>

Hi, I’m a total noob at Processing. I presume this is possible but it would be good to have it confirmed before I start. :slightly\_smiling\_face: I want to cut rectangles from random frames in an existing video to const…

---

## [Scaling to file](https://discourse.processing.org/t/scaling-to-file/30607)

<div class="topic-metadata">

**Author:** [@yalaniv](https://discourse.processing.org/u/yalaniv)\
**Replies:** 1\
**Last updated:** [June 9, 2021, 5:30pm UTC](https://discourse.processing.org/t/scaling-to-file/30607 "2021-06-09T17:30:24Z")

</div>

Is it possible to create graphics on screen size 1000\\750, But saving it to file as a 10000/7500? Export as a 1000/750 and scale it won’t work because it will make lines become rectangles and I want it to be thick as a…

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

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