# Latest

**URL:** https://discourse.processing.org/latest.md?page=339

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

**Page:** 340

---

## [How can I read this json file?](https://discourse.processing.org/t/how-can-i-read-this-json-file/21623)

<div class="topic-metadata">

**Author:** [@sasaKDH](https://discourse.processing.org/u/sasaKDH)\
**Replies:** 5\
**Last updated:** [June 6, 2020, 5:11pm UTC](https://discourse.processing.org/t/how-can-i-read-this-json-file/21623 "2020-06-06T17:11:50Z")

</div>

sppo works right but, spid doesn’t I think they have same structure so, I can’t understand. Here is the structure of spid function setup() { createCanvas(300, 300); sppo = loadJSON("../jsons/spposition.json"); …

---

## [Using Values from a Class as Arguments for Another Class](https://discourse.processing.org/t/using-values-from-a-class-as-arguments-for-another-class/21601)

<div class="topic-metadata">

**Author:** [@brent](https://discourse.processing.org/u/brent)\
**Replies:** 3\
**Last updated:** [June 6, 2020, 3:42pm UTC](https://discourse.processing.org/t/using-values-from-a-class-as-arguments-for-another-class/21601 "2020-06-06T15:42:00Z")

</div>

I’m trying to make the code I have for a basic painting sketch more efficient, so I made classes for the color sliders and the brush. I’m trying to set the arguments for Brush() using the values from each colorSlider\[\]. …

---

## [Evaluating Student Code](https://discourse.processing.org/t/evaluating-student-code/21570)

<div class="topic-metadata">

**Author:** [@pfe1223](https://discourse.processing.org/u/pfe1223)\
**Replies:** 7\
**Last updated:** [June 6, 2020, 4:50am UTC](https://discourse.processing.org/t/evaluating-student-code/21570 "2020-06-06T04:50:27Z")

</div>

Does anybody know of any grading scripts for Processing code? Perhaps something like an AST could be used to evaluate student code.

---

## [Cat Game with p5js & froobit](https://discourse.processing.org/t/cat-game-with-p5js-froobit/21617)

<div class="topic-metadata">

**Author:** [@r4nd0m](https://discourse.processing.org/u/r4nd0m)\
**Replies:** 0\
**Last updated:** [June 6, 2020, 10:50am UTC](https://discourse.processing.org/t/cat-game-with-p5js-froobit/21617 "2020-06-06T10:50:15Z")

</div>

Hi, I didn’t fulfilled my promise, and it’s to write a good documentation for Froobit because I was in a hurry to finish a game for my buddy and it’s about cats! So for all the cat lovers :cat2: out there this is the g…

---

## [Using a 2D Array in a Class Object - NullPointerException?](https://discourse.processing.org/t/using-a-2d-array-in-a-class-object-nullpointerexception/21606)

<div class="topic-metadata">

**Author:** [@RetProf](https://discourse.processing.org/u/RetProf)\
**Replies:** 10\
**Last updated:** [June 6, 2020, 3:10am UTC](https://discourse.processing.org/t/using-a-2d-array-in-a-class-object-nullpointerexception/21606 "2020-06-06T03:10:45Z")

</div>

The following is a short sketch with a single new Class. In the class I’m trying to develop a 2D array in the Constructor and then use it in a method in the class. The method recognizes a variable in the constructor but …

---

## [X =width/2 not plotting to the middle of the sketch window](https://discourse.processing.org/t/x-width-2-not-plotting-to-the-middle-of-the-sketch-window/21585)

<div class="topic-metadata">

**Author:** [@BackTo](https://discourse.processing.org/u/BackTo)\
**Replies:** 4\
**Last updated:** [June 5, 2020, 6:16pm UTC](https://discourse.processing.org/t/x-width-2-not-plotting-to-the-middle-of-the-sketch-window/21585 "2020-06-05T18:16:58Z")

</div>

Hello, I have a very basic question. When I set the X coordinate to width/2 and the Y coordinate to height/2, the coordinate, plotted never ends up in the middle of the screen. Is there some coding syntax I’m missing? …

---

## [Map() value to fit screen](https://discourse.processing.org/t/map-value-to-fit-screen/21558)

<div class="topic-metadata">

**Author:** [@mockingjay](https://discourse.processing.org/u/mockingjay)\
**Replies:** 11\
**Last updated:** [June 5, 2020, 6:13pm UTC](https://discourse.processing.org/t/map-value-to-fit-screen/21558 "2020-06-05T18:13:48Z")

</div>

void setup() { size(1280,720); background(0); } float currentVal = 0; float reading = 0; float value = -150; void draw() { reading = getData(); map(reading, -150,height,0,height/2); currentVal += (reading - cu…

---

## [About Processing Tools](https://discourse.processing.org/t/about-processing-tools/21565)

<div class="topic-metadata">

**Author:** [@wwave](https://discourse.processing.org/u/wwave)\
**Replies:** 2\
**Last updated:** [June 5, 2020, 6:11pm UTC](https://discourse.processing.org/t/about-processing-tools/21565 "2020-06-05T18:11:40Z")

</div>

Hi, Is there any tools in Processing that I have a list in a window which I have many options? For example, in the list, I have introduction option, relazation option and etc. I can slide the slider. When I choose one …

---

## [Siri style waveform design with p5 sound](https://discourse.processing.org/t/siri-style-waveform-design-with-p5-sound/21529)

<div class="topic-metadata">

**Author:** [@eurobob](https://discourse.processing.org/u/eurobob)\
**Replies:** 8\
**Last updated:** [June 5, 2020, 5:04pm UTC](https://discourse.processing.org/t/siri-style-waveform-design-with-p5-sound/21529 "2020-06-05T17:04:06Z")

</div>

How would I go about creating an animation similar to this?: https://dribbble.com/shots/5401314-Voice-interface-design

---

## [Does write() not work in the web editor?](https://discourse.processing.org/t/does-write-not-work-in-the-web-editor/21594)

<div class="topic-metadata">

**Author:** [@inmc](https://discourse.processing.org/u/inmc)\
**Replies:** 1\
**Last updated:** [June 5, 2020, 3:09pm UTC](https://discourse.processing.org/t/does-write-not-work-in-the-web-editor/21594 "2020-06-05T15:09:23Z")

</div>

In my project I’m basically trying to make a string of text and save it to my computer in a .txt file. https://p5js.org/reference/#/p5.PrintWriter/write So in the reference for write(), you call the function and it aut…

---

## [Digital port of an algorithm I use to make analogue paintings](https://discourse.processing.org/t/digital-port-of-an-algorithm-i-use-to-make-analogue-paintings/21595)

<div class="topic-metadata">

**Author:** [@BackTo](https://discourse.processing.org/u/BackTo)\
**Replies:** 2\
**Last updated:** [June 5, 2020, 2:29pm UTC](https://discourse.processing.org/t/digital-port-of-an-algorithm-i-use-to-make-analogue-paintings/21595 "2020-06-05T14:29:30Z")

</div>

Hello I’m primarily a painter, but have an interest in processing. I’m chugguing away learning it from Daniel Shiffman’s Learning Processing. Here is an example of what some of my paintings look like . FB\_IMG\_151040640…

---

## [Simulation about Cooperative Object Transport in Multi-Robot Systems](https://discourse.processing.org/t/simulation-about-cooperative-object-transport-in-multi-robot-systems/21393)

<div class="topic-metadata">

**Author:** [@weijie](https://discourse.processing.org/u/weijie)\
**Replies:** 3\
**Last updated:** [June 5, 2020, 1:21pm UTC](https://discourse.processing.org/t/simulation-about-cooperative-object-transport-in-multi-robot-systems/21393 "2020-06-05T13:21:43Z")

</div>

Hi everyone, I’m developing a simulation of a group of simple robots transporting objects together. The multi-robot system should be able to: transport object of different shapes able to stabilize the object while tr…

---

## [Custom mouse cursor](https://discourse.processing.org/t/custom-mouse-cursor/21549)

<div class="topic-metadata">

**Author:** [@mgood7123](https://discourse.processing.org/u/mgood7123)\
**Replies:** 6\
**Last updated:** [June 5, 2020, 4:48am UTC](https://discourse.processing.org/t/custom-mouse-cursor/21549 "2020-06-05T04:48:16Z")

</div>

how can i customize the cursor that is displayed inside Processing 3, for example, make it appear as a custom png image instead of the OS’s cursor image

---

## [Tiling / repeating shader image texture](https://discourse.processing.org/t/tiling-repeating-shader-image-texture/21591)

<div class="topic-metadata">

**Author:** [@andypurbrick](https://discourse.processing.org/u/andypurbrick)\
**Replies:** 2\
**Last updated:** [June 5, 2020, 12:58pm UTC](https://discourse.processing.org/t/tiling-repeating-shader-image-texture/21591 "2020-06-05T12:58:46Z")

</div>

Hi, I’m new to p5.js and I’ve just ported a shader from shadertoy. It works fine, however, the image that I’m using as a texture is defaulting to CLAMP when I want it to REPEAT. I’ve tried to use textureWrap(REPEAT) …

---

## [Duplicate index file with a sketch](https://discourse.processing.org/t/duplicate-index-file-with-a-sketch/21589)

<div class="topic-metadata">

**Author:** [@dcipollo](https://discourse.processing.org/u/dcipollo)\
**Replies:** 1\
**Last updated:** [June 5, 2020, 11:53am UTC](https://discourse.processing.org/t/duplicate-index-file-with-a-sketch/21589 "2020-06-05T11:53:28Z")

</div>

Is it possible to duplicate the index.html file in a sketch. The only options in the pop-up menu are rename or delete. Or do I need to copy/paste the code into a blank new file? Thanks

---

## [Beginner Question: About Flow](https://discourse.processing.org/t/beginner-question-about-flow/21180)

<div class="topic-metadata">

**Author:** [@katjs](https://discourse.processing.org/u/katjs)\
**Replies:** 12\
**Last updated:** [June 5, 2020, 11:09am UTC](https://discourse.processing.org/t/beginner-question-about-flow/21180 "2020-06-05T11:09:23Z")

</div>

Hello people, I’m new here and I really want some help. I’ve a bit of a problem using P5. My JS is quite poor and I’m using P5 to get a better understanding from the ground up. So I’m just trying to mess around with va…

---

## [Simple way to create this diagram using pythagoras theorem](https://discourse.processing.org/t/simple-way-to-create-this-diagram-using-pythagoras-theorem/21583)

<div class="topic-metadata">

**Author:** [@leronix](https://discourse.processing.org/u/leronix)\
**Replies:** 2\
**Last updated:** [June 5, 2020, 11:00am UTC](https://discourse.processing.org/t/simple-way-to-create-this-diagram-using-pythagoras-theorem/21583 "2020-06-05T11:00:28Z")

</div>

int a; int c; int b = sqrt(aa+cc);

---

## [Odd TableSaving Behavoir](https://discourse.processing.org/t/odd-tablesaving-behavoir/21586)

<div class="topic-metadata">

**Author:** [@TheEternalDragon](https://discourse.processing.org/u/TheEternalDragon)\
**Replies:** 1\
**Last updated:** [June 5, 2020, 10:43am UTC](https://discourse.processing.org/t/odd-tablesaving-behavoir/21586 "2020-06-05T10:43:26Z")

</div>

I’m trying to save the data of a few objects to a table, this includes their position as a vector and their current size so that it can be used when reopening the program. However when using the code below, instead of ge…

---

## [Beginner who can use some help](https://discourse.processing.org/t/beginner-who-can-use-some-help/21505)

<div class="topic-metadata">

**Author:** [@Student](https://discourse.processing.org/u/Student)\
**Replies:** 5\
**Last updated:** [June 5, 2020, 10:18am UTC](https://discourse.processing.org/t/beginner-who-can-use-some-help/21505 "2020-06-05T10:18:28Z")

</div>

Hey! Im currently working on a small project, for which I need a certain function which I just don’t seem to get working. I am working with motion tracking. Within the code, I try to change the color of the screen, the …

---

## [Per-vertex color gradient fill](https://discourse.processing.org/t/per-vertex-color-gradient-fill/9679)

<div class="topic-metadata">

**Author:** [@cdaein](https://discourse.processing.org/u/cdaein)\
**Replies:** 14\
**Last updated:** [June 5, 2020, 9:18am UTC](https://discourse.processing.org/t/per-vertex-color-gradient-fill/9679 "2020-06-05T09:18:44Z")

</div>

I’m trying to color each vertex of a rectangle differently to create a nice, smooth gradient fill inside. But when I run the sketch below, it looks like the shapes are broken into triangles and I see a clear band - is th…

---

## [Advice on crime data](https://discourse.processing.org/t/advice-on-crime-data/21573)

<div class="topic-metadata">

**Author:** [@mcintyre](https://discourse.processing.org/u/mcintyre)\
**Replies:** 1\
**Last updated:** [June 5, 2020, 5:20am UTC](https://discourse.processing.org/t/advice-on-crime-data/21573 "2020-06-05T05:20:59Z")

</div>

I’m teaching a 5-week machine learning course to high school students this summer using p5.js and ml5.js. We’ll cover classification and regression during the final week, so I’d like to motivate the material through a co…

---

## [Requires restart of Processing?](https://discourse.processing.org/t/requires-restart-of-processing/21574)

<div class="topic-metadata">

**Author:** [@Math\_Machine](https://discourse.processing.org/u/Math_Machine)\
**Replies:** 2\
**Last updated:** [June 5, 2020, 12:41am UTC](https://discourse.processing.org/t/requires-restart-of-processing/21574 "2020-06-05T00:41:38Z")

</div>

Okay, so I know I’m going to sound very, very stupid asking this question, but I’d also be very, very upset if I lost 2 years worth of programs from my save folders. So, in the preferences tab of Processing, there’s an …

---

## [Processing match 3](https://discourse.processing.org/t/processing-match-3/21507)

<div class="topic-metadata">

**Author:** [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Replies:** 16\
**Last updated:** [June 5, 2020, 12:13am UTC](https://discourse.processing.org/t/processing-match-3/21507 "2020-06-05T00:13:10Z")

</div>

I’m making a match 3 game or at least I think it still called match 3. Anyways you click on a block and all the blocks touching that one of the same type vanish too. My problem is diagonal blocks are being chosen instead…

---

## [Processing Array size](https://discourse.processing.org/t/processing-array-size/21569)

<div class="topic-metadata">

**Author:** [@philspitler](https://discourse.processing.org/u/philspitler)\
**Replies:** 4\
**Last updated:** [June 5, 2020, 12:01am UTC](https://discourse.processing.org/t/processing-array-size/21569 "2020-06-05T00:01:43Z")

</div>

I have a Processing sketch that reads folders of images and displays them. It has been working great but it seems that as soon as the folder got over 500 images I get an error. My code is pretty straight forward. I de…

---

## [I need help please! Mario](https://discourse.processing.org/t/i-need-help-please-mario/21409)

<div class="topic-metadata">

**Author:** [@jasmine](https://discourse.processing.org/u/jasmine)\
**Replies:** 13\
**Last updated:** [June 4, 2020, 11:57pm UTC](https://discourse.processing.org/t/i-need-help-please-mario/21409 "2020-06-04T23:57:07Z")

</div>

int gameMode=0;//0 - menu, 1 - play game, 2 - instructions, 3 - character selection int selChar=1;//default character is "character 1" int level=1; color red=color(255, 0, 0); color green=color(0, 255, 0); color blue=col…

---

## [Calculating spin physics](https://discourse.processing.org/t/calculating-spin-physics/21289)

<div class="topic-metadata">

**Author:** [@markcosmic](https://discourse.processing.org/u/markcosmic)\
**Replies:** 10\
**Last updated:** [June 4, 2020, 7:36pm UTC](https://discourse.processing.org/t/calculating-spin-physics/21289 "2020-06-04T19:36:58Z")

</div>

Greetings all, Without using one of the physics engine libraries, I’d like to calculate the spin of a ball bouncing off a boundary. As I understand it, the algorithm has to do with the ball’s velocity and the angle betw…

---

## [How do I move an object in 3d space?](https://discourse.processing.org/t/how-do-i-move-an-object-in-3d-space/938)

<div class="topic-metadata">

**Author:** [@xxxlaf](https://discourse.processing.org/u/xxxlaf)\
**Replies:** 1\
**Last updated:** [June 14, 2018, 3:00am UTC](https://discourse.processing.org/t/how-do-i-move-an-object-in-3d-space/938 "2018-06-14T03:00:46Z")

</div>

My code is… function setup() { createCanvas(500, 500, WEBGL); } function draw() { background(200); orbitControl(); // Objects box(75, 100, 50); sphere(50) } How would I change the x and y p…

---

## [Getting position from playNote (Minim)](https://discourse.processing.org/t/getting-position-from-playnote-minim/21360)

<div class="topic-metadata">

**Author:** [@tribblesontoast](https://discourse.processing.org/u/tribblesontoast)\
**Replies:** 14\
**Last updated:** [June 4, 2020, 4:43pm UTC](https://discourse.processing.org/t/getting-position-from-playnote-minim/21360 "2020-06-04T16:43:26Z")

</div>

Hi all, I’m using the Minim Library to play music using the playNotes() function. My question is twofold: What structure is the playNote function populating? (is it an array?) How do I get the position within this st…

---

## [Set PShape parameters](https://discourse.processing.org/t/set-pshape-parameters/21556)

<div class="topic-metadata">

**Author:** [@Moritz](https://discourse.processing.org/u/Moritz)\
**Replies:** 7\
**Last updated:** [June 4, 2020, 4:18pm UTC](https://discourse.processing.org/t/set-pshape-parameters/21556 "2020-06-04T16:18:55Z")

</div>

Hello, I want to set the parameters of a PShape without creating a new one. Is it possible or do i have to create a new Pshape? thank you

---

## [When I have compiled my ByteCode how do I insert it into my methods](https://discourse.processing.org/t/when-i-have-compiled-my-bytecode-how-do-i-insert-it-into-my-methods/21538)

<div class="topic-metadata">

**Author:** [@AntiViral\_Builder](https://discourse.processing.org/u/AntiViral_Builder)\
**Replies:** 3\
**Last updated:** [June 4, 2020, 8:38am UTC](https://discourse.processing.org/t/when-i-have-compiled-my-bytecode-how-do-i-insert-it-into-my-methods/21538 "2020-06-04T08:38:28Z")

</div>

I am new to java and processing what I actually do understand is that they are C++ based. I only understand a little about C. I do not have time to look at thousands of java files just to do something that should be simp…

[Previous page](https://discourse.processing.org/latest.md?page=338)

[Next page](https://discourse.processing.org/latest.md?page=340)
