# Processing

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

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

**Page:** 267

---

## [Invoking a common method among different object types](https://discourse.processing.org/t/invoking-a-common-method-among-different-object-types/14677)

<div class="topic-metadata">

**Author:** [@thesuperdaine](https://discourse.processing.org/u/thesuperdaine)\
**Replies:** 10\
**Last updated:** [October 15, 2019, 12:53am UTC](https://discourse.processing.org/t/invoking-a-common-method-among-different-object-types/14677 "2019-10-15T00:53:48Z")

</div>

I am making an rpg game that has lots of different items. I want the different items to do different things when used, but I want them to all have the same methods so that I can call “hpPotion01.use()” on a healing potio…

---

## [Selecting & Moving 2D Primitives](https://discourse.processing.org/t/selecting-moving-2d-primitives/14686)

<div class="topic-metadata">

**Author:** [@hmaz](https://discourse.processing.org/u/hmaz)\
**Replies:** 7\
**Last updated:** [October 14, 2019, 10:20pm UTC](https://discourse.processing.org/t/selecting-moving-2d-primitives/14686 "2019-10-14T22:20:43Z")

</div>

Can someone please help me develop my script so that i can select individual entities and move them around the canvas using the mouse. Thankyou SCRIPT: //LIBRARIES import controlP5.\*; //VARIABLES int c = color(100); //…

---

## [Collect data from a local web server](https://discourse.processing.org/t/collect-data-from-a-local-web-server/14691)

<div class="topic-metadata">

**Author:** [@KDarsh20112003](https://discourse.processing.org/u/KDarsh20112003)\
**Replies:** 14\
**Last updated:** [October 14, 2019, 9:35pm UTC](https://discourse.processing.org/t/collect-data-from-a-local-web-server/14691 "2019-10-14T21:35:57Z")

</div>

I found a project (https://maker.pro/arduino/tutorial/how-to-interface-arduino-and-the-mpu-6050-sensor) in which the processing code could get the data from the serial port. I want to make a different version of this pr…

---

## [Using oscP5 with Buttons](https://discourse.processing.org/t/using-oscp5-with-buttons/14620)

<div class="topic-metadata">

**Author:** [@SarcasticIrony](https://discourse.processing.org/u/SarcasticIrony)\
**Replies:** 3\
**Last updated:** [October 14, 2019, 6:43pm UTC](https://discourse.processing.org/t/using-oscp5-with-buttons/14620 "2019-10-14T18:43:43Z")

</div>

Hi, I’d like to change the background color of the second sketch using buttons from the first one. I get them to talk to each other using mouse click back and forth, but I’m struggling to switch it to a button. I first s…

---

## [The function transform(PVector) does not exist](https://discourse.processing.org/t/the-function-transform-pvector-does-not-exist/14668)

<div class="topic-metadata">

**Author:** [@mamamoo](https://discourse.processing.org/u/mamamoo)\
**Replies:** 18\
**Last updated:** [October 14, 2019, 6:31pm UTC](https://discourse.processing.org/t/the-function-transform-pvector-does-not-exist/14668 "2019-10-14T18:31:43Z")

</div>

class StarField { final int STAR\_COUNT = width / 2; final int MAX\_SPEED = 11, MIN\_SPEED = 1; final int SPEED\_STEP = 1; ArrayList\<Star\> stars; PVector endpoint; int speed; StarField() { e…

---

## [Glitching on purpose?](https://discourse.processing.org/t/glitching-on-purpose/14537)

<div class="topic-metadata">

**Author:** [@loni](https://discourse.processing.org/u/loni)\
**Replies:** 3\
**Last updated:** [October 14, 2019, 6:08pm UTC](https://discourse.processing.org/t/glitching-on-purpose/14537 "2019-10-14T18:08:52Z")

</div>

Does anyone know any common (or uncommon) errors that actually produce a visual (and not just one that makes the sketch unable to open)? I’m trying to collect processing “failure” imagery but I’m not really sure how I ca…

---

## [Cellular Automata based on pixelated images](https://discourse.processing.org/t/cellular-automata-based-on-pixelated-images/14424)

<div class="topic-metadata">

**Author:** [@luonglinhle](https://discourse.processing.org/u/luonglinhle)\
**Replies:** 5\
**Last updated:** [October 14, 2019, 4:43pm UTC](https://discourse.processing.org/t/cellular-automata-based-on-pixelated-images/14424 "2019-10-14T16:43:00Z")

</div>

Dear everyone, I am a newbie to processing. As I proceeds, I am very interested in the thinking of Cellular Automata (part of lesson from The Nature of Code by Daniel Shiffman). I really want to create a version based o…

---

## [Combine overlay graphics in draw](https://discourse.processing.org/t/combine-overlay-graphics-in-draw/14676)

<div class="topic-metadata">

**Author:** [@elcougario](https://discourse.processing.org/u/elcougario)\
**Replies:** 12\
**Last updated:** [October 14, 2019, 4:40pm UTC](https://discourse.processing.org/t/combine-overlay-graphics-in-draw/14676 "2019-10-14T16:40:22Z")

</div>

Hey guys, i’ve been working on this for a while, and I’m having difficulties inserting one of my functions into the loop, without it messing the rest or simply not showing. I just want to put dots over everything, but I …

---

## [Tracking user location in a physical grid using a webcam?](https://discourse.processing.org/t/tracking-user-location-in-a-physical-grid-using-a-webcam/14607)

<div class="topic-metadata">

**Author:** [@JPG](https://discourse.processing.org/u/JPG)\
**Replies:** 3\
**Last updated:** [October 14, 2019, 3:35pm UTC](https://discourse.processing.org/t/tracking-user-location-in-a-physical-grid-using-a-webcam/14607 "2019-10-14T15:35:47Z")

</div>

Below is an image of a basic grid that I have in processing. I want to map a users physical location in a space to a location on a grid in processing in real time. Can anyone tell me if it is possible to track a users ph…

---

## [Random keeps looping inside for](https://discourse.processing.org/t/random-keeps-looping-inside-for/14692)

<div class="topic-metadata">

**Author:** [@Shayton](https://discourse.processing.org/u/Shayton)\
**Replies:** 1\
**Last updated:** [October 14, 2019, 2:33pm UTC](https://discourse.processing.org/t/random-keeps-looping-inside-for/14692 "2019-10-14T14:33:33Z")

</div>

Hi! I’m making an Atari Breakout like game for a school project, and I’m having a lil problem I want the bricks’ colors be setted randomly p\[\] pelota = new p\[1\]; b\[\] bloques = new b\[100\]; void setup(){ size(900,600…

---

## [Some problems Using HE\_Mesh library](https://discourse.processing.org/t/some-problems-using-he-mesh-library/14689)

<div class="topic-metadata">

**Author:** [@jlnsrtr](https://discourse.processing.org/u/jlnsrtr)\
**Replies:** 2\
**Last updated:** [October 14, 2019, 1:58pm UTC](https://discourse.processing.org/t/some-problems-using-he-mesh-library/14689 "2019-10-14T13:58:43Z")

</div>

Hi guys! Just started working with Processing for my thesis project, a research on generative and procedural expressions used in graphic design. I’m using the CANGenerativeTypography by Anon Owen folder to make some ex…

---

## [Problem with array of objects from a class](https://discourse.processing.org/t/problem-with-array-of-objects-from-a-class/14660)

<div class="topic-metadata">

**Author:** [@ImDaGr3en](https://discourse.processing.org/u/ImDaGr3en)\
**Replies:** 12\
**Last updated:** [October 14, 2019, 1:04pm UTC](https://discourse.processing.org/t/problem-with-array-of-objects-from-a-class/14660 "2019-10-14T13:04:31Z")

</div>

Hi everyone! I found some issue in declaring an array of objects from a class which I wrote in the code. I’m trying to make a Snake-like minigame, and I’m trying to declare an array of objects which should contain its c…

---

## [Just starting to code, and code returns java.lang.reflect.InvocationTargetException error](https://discourse.processing.org/t/just-starting-to-code-and-code-returns-java-lang-reflect-invocationtargetexception-error/14615)

<div class="topic-metadata">

**Author:** [@Truncation](https://discourse.processing.org/u/Truncation)\
**Replies:** 4\
**Last updated:** [October 14, 2019, 1:01pm UTC](https://discourse.processing.org/t/just-starting-to-code-and-code-returns-java-lang-reflect-invocationtargetexception-error/14615 "2019-10-14T13:01:17Z")

</div>

Just starting to do an elemental version of 2048, as a practice on recreations on other popular games. After coding the function structure and screen appearance, this error comes out of nowhere upon startup. The sketch…

---

## [PoseNet + Processing Error: JSONArray\[0\] is not a JSONObject](https://discourse.processing.org/t/posenet-processing-error-jsonarray-0-is-not-a-jsonobject/14302)

<div class="topic-metadata">

**Author:** [@QueenBee](https://discourse.processing.org/u/QueenBee)\
**Replies:** 10\
**Last updated:** [October 14, 2019, 6:56am UTC](https://discourse.processing.org/t/posenet-processing-error-jsonarray-0-is-not-a-jsonobject/14302 "2019-10-14T06:56:58Z")

</div>

Hi! I’ve been following Daniel Shiffman’s Runway tutorial on using PoseNet with processing (as an alternative to the ever finnicky Kinect!) I’m getting the following error right at the end of the tutorial: …

---

## [Code signing Processing sketches](https://discourse.processing.org/t/code-signing-processing-sketches/14589)

<div class="topic-metadata">

**Author:** [@dtidgwell](https://discourse.processing.org/u/dtidgwell)\
**Replies:** 3\
**Last updated:** [October 14, 2019, 5:00am UTC](https://discourse.processing.org/t/code-signing-processing-sketches/14589 "2019-10-14T05:00:10Z")

</div>

Does anyone have experience in code signing Processing sketches and getting them notarized by Apple for distribution? With the new macOS, Catalina, it’s getting harder to give people compiled copies of sketches without …

---

## [Java error on startup when I launch Processing](https://discourse.processing.org/t/java-error-on-startup-when-i-launch-processing/14625)

<div class="topic-metadata">

**Author:** [@paul3883](https://discourse.processing.org/u/paul3883)\
**Replies:** 4\
**Last updated:** [October 14, 2019, 2:33am UTC](https://discourse.processing.org/t/java-error-on-startup-when-i-launch-processing/14625 "2019-10-14T02:33:15Z")

</div>

Hi, I’m having a strange error but i can’t seam to fix it. When i launch processing I get this popup and then processing closes. It’s been working without any issues for the past couple months … just sudenly today i’m ge…

---

## [Creating A Toolbar & Canvas Sketch](https://discourse.processing.org/t/creating-a-toolbar-canvas-sketch/14645)

<div class="topic-metadata">

**Author:** [@las6525](https://discourse.processing.org/u/las6525)\
**Replies:** 18\
**Last updated:** [October 14, 2019, 2:26am UTC](https://discourse.processing.org/t/creating-a-toolbar-canvas-sketch/14645 "2019-10-14T02:26:00Z")

</div>

Hi All, I need help, my code is way off. What is the best way to format a sketch that uses the constrain() function to divide the window into two parts; one being a toolbar and the other being a canvas? I need to limit …

---

## [Rotating a spiral using Framerate](https://discourse.processing.org/t/rotating-a-spiral-using-framerate/14675)

<div class="topic-metadata">

**Author:** [@fhop](https://discourse.processing.org/u/fhop)\
**Replies:** 1\
**Last updated:** [October 14, 2019, 12:28am UTC](https://discourse.processing.org/t/rotating-a-spiral-using-framerate/14675 "2019-10-14T00:28:48Z")

</div>

Hi all! I was wanting to rotate this spiral (made of ellipses) using framerate or some other means so the whole image slowly rotates. Any help or direction towards tutorials, similar questions etc would be helpful! Th…

---

## [Mixed Datatype Arrays](https://discourse.processing.org/t/mixed-datatype-arrays/14673)

<div class="topic-metadata">

**Author:** [@KeirMeDear](https://discourse.processing.org/u/KeirMeDear)\
**Replies:** 6\
**Last updated:** [October 13, 2019, 11:44pm UTC](https://discourse.processing.org/t/mixed-datatype-arrays/14673 "2019-10-13T23:44:51Z")

</div>

Is there a way to have various datatypes in one array? Checking online it says to initialise as an Object type but that doesn’t seem to work with processing. Can’t seem to find anything in the docu either The Goal: dat…

---

## [Convert image in to binary stream with arduino](https://discourse.processing.org/t/convert-image-in-to-binary-stream-with-arduino/14610)

<div class="topic-metadata">

**Author:** [@shonerudeetha](https://discourse.processing.org/u/shonerudeetha)\
**Replies:** 2\
**Last updated:** [October 13, 2019, 5:47pm UTC](https://discourse.processing.org/t/convert-image-in-to-binary-stream-with-arduino/14610 "2019-10-13T17:47:30Z")

</div>

i am a beginner for processing.my project is transmitting ascii value or image through a blinking LED and recieving those ascii and image via LDR… But i did sending and recieving ascii value…it succeed.My transmittin…

---

## [Finding the closest neighbour between PVector objects in an array](https://discourse.processing.org/t/finding-the-closest-neighbour-between-pvector-objects-in-an-array/14655)

<div class="topic-metadata">

**Author:** [@johnsmith17](https://discourse.processing.org/u/johnsmith17)\
**Replies:** 3\
**Last updated:** [October 13, 2019, 4:50pm UTC](https://discourse.processing.org/t/finding-the-closest-neighbour-between-pvector-objects-in-an-array/14655 "2019-10-13T16:50:57Z")

</div>

Hi ive created an array which holds PVectors of points on a sketch, when mouse is pressed a point is created at mouseX and mouseY. im trying to connect each point to its closest neigbour in order to make a planar graph w…

---

## [Using width outside main file](https://discourse.processing.org/t/using-width-outside-main-file/14659)

<div class="topic-metadata">

**Author:** [@dVaGaymer](https://discourse.processing.org/u/dVaGaymer)\
**Replies:** 2\
**Last updated:** [October 13, 2019, 4:23pm UTC](https://discourse.processing.org/t/using-width-outside-main-file/14659 "2019-10-13T16:23:46Z")

</div>

I’m starting here, trying to program a simple pong, but there is a problem when I change the value of initial Player object position. I want to give the object (a racket) an initial position based on the window’s size, …

---

## [Where is this stroke coming from?](https://discourse.processing.org/t/where-is-this-stroke-coming-from/14545)

<div class="topic-metadata">

**Author:** [@clankill3r](https://discourse.processing.org/u/clankill3r)\
**Replies:** 5\
**Last updated:** [October 13, 2019, 9:13am UTC](https://discourse.processing.org/t/where-is-this-stroke-coming-from/14545 "2019-10-13T09:13:23Z")

</div>

I get a strange grey stroke when drawing, where is it coming from? PGraphics pg; void setup() { size(800, 600, P2D); pg = createGraphics(width, height, P2D); pg.beginDraw(); pg.background(255); pg.endDraw(…

---

## [QR code reader with processing and arduino](https://discourse.processing.org/t/qr-code-reader-with-processing-and-arduino/7349)

<div class="topic-metadata">

**Author:** [@yoshvale](https://discourse.processing.org/u/yoshvale)\
**Replies:** 10\
**Last updated:** [October 13, 2019, 4:57am UTC](https://discourse.processing.org/t/qr-code-reader-with-processing-and-arduino/7349 "2019-10-13T04:57:43Z")

</div>

hi i’m yoshua, i’m new in processing my project is robot arm that can read 2 qr code (i.e : object A and object B) and send the data to arduino, so arduino will receive qr data, if arduino read object A then arm robot m…

---

## [Puzzle with ControlP5](https://discourse.processing.org/t/puzzle-with-controlp5/14643)

<div class="topic-metadata">

**Author:** [@nimbinensis](https://discourse.processing.org/u/nimbinensis)\
**Replies:** 7\
**Last updated:** [October 13, 2019, 2:59am UTC](https://discourse.processing.org/t/puzzle-with-controlp5/14643 "2019-10-13T02:59:56Z")

</div>

Hello all. I have a question about CP5 events. Here’s small program: import controlP5.\*; ControlP5 cp5; boolean looping; void setup() { size(200, 200); cp5 = new ControlP5(this); cp5.addToggle("Click") …

---

## [Use web socket to transfer a String](https://discourse.processing.org/t/use-web-socket-to-transfer-a-string/14642)

<div class="topic-metadata">

**Author:** [@zly1994411](https://discourse.processing.org/u/zly1994411)\
**Replies:** 2\
**Last updated:** [October 13, 2019, 12:45am UTC](https://discourse.processing.org/t/use-web-socket-to-transfer-a-string/14642 "2019-10-13T00:45:32Z")

</div>

Hey guys, I was trying to transfer a String from Node server to processing, the data do come in but when I do the conditional check, the msg == “8” returns false? Can anyone help me with this? Is there a datatype differe…

---

## [How to expand this grid of 9 cropped images so it works for 900?](https://discourse.processing.org/t/how-to-expand-this-grid-of-9-cropped-images-so-it-works-for-900/14622)

<div class="topic-metadata">

**Author:** [@rebecca](https://discourse.processing.org/u/rebecca)\
**Replies:** 3\
**Last updated:** [October 12, 2019, 8:48pm UTC](https://discourse.processing.org/t/how-to-expand-this-grid-of-9-cropped-images-so-it-works-for-900/14622 "2019-10-12T20:48:26Z")

</div>

Hi, I’m very new to coding/processing and would love help with simplifying my code so that it can be expanded easily. Right now I have a grid of 9 images that are stacked on top of each other and then “cropped” using the…

---

## [Perlin Noise on a Sphere](https://discourse.processing.org/t/perlin-noise-on-a-sphere/1121)

<div class="topic-metadata">

**Author:** [@UtrimiqueTrebus12](https://discourse.processing.org/u/UtrimiqueTrebus12)\
**Replies:** 2\
**Last updated:** [June 21, 2018, 3:28pm UTC](https://discourse.processing.org/t/perlin-noise-on-a-sphere/1121 "2018-06-21T15:28:58Z")

</div>

I would need some help to apply a perlin noise correctly to a sphere. Here is my code. import peasy.\*; int resolution = 100; float r = 500; float lat,lon; float xoff,yoff; PVector\[\]\[\] globularLandscape; float rangeMin …

---

## [Exported Application to Mac not opening](https://discourse.processing.org/t/exported-application-to-mac-not-opening/14520)

<div class="topic-metadata">

**Author:** [@plusmartin](https://discourse.processing.org/u/plusmartin)\
**Replies:** 2\
**Last updated:** [October 12, 2019, 6:10pm UTC](https://discourse.processing.org/t/exported-application-to-mac-not-opening/14520 "2019-10-12T18:10:29Z")

</div>

Is it normal for an exported application to weigh more than 400MB for a tiny script? It is very frustrating. Plus, it does not even launch!! I checked the security settings in MacOS but still nothing. Where can I dow…

---

## [Convert Image into ascii value](https://discourse.processing.org/t/convert-image-into-ascii-value/14602)

<div class="topic-metadata">

**Author:** [@shonerudeetha](https://discourse.processing.org/u/shonerudeetha)\
**Replies:** 6\
**Last updated:** [October 11, 2019, 9:46pm UTC](https://discourse.processing.org/t/convert-image-into-ascii-value/14602 "2019-10-11T21:46:33Z")

</div>

sir,i am a beginner for processing…my aim is convert any image into a blinking LED.i did any ascii value into blinking LEd via arduino…Now i need to know how to convert a given image into ascii value… …because i did asci…

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

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