# Processing

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

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

**Page:** 352

---

## [Animated text / Spacing problem](https://discourse.processing.org/t/animated-text-spacing-problem/4559)

<div class="topic-metadata">

**Author:** [@RC75018](https://discourse.processing.org/u/RC75018)\
**Replies:** 4\
**Last updated:** [November 4, 2018, 8:57am UTC](https://discourse.processing.org/t/animated-text-spacing-problem/4559 "2018-11-04T08:57:06Z")

</div>

Hi Everyone, I am trying to create an animated text, starting with a random size and color on the page. Each letter move according a sine fonction. Unfortunately, i get lost in my thoughts and don’t understand anymore…

---

## [Manipulating Processing Templates with a Cyton board (EEG waves)](https://discourse.processing.org/t/manipulating-processing-templates-with-a-cyton-board-eeg-waves/4997)

<div class="topic-metadata">

**Author:** [@roguetheory](https://discourse.processing.org/u/roguetheory)\
**Replies:** 1\
**Last updated:** [November 4, 2018, 5:35am UTC](https://discourse.processing.org/t/manipulating-processing-templates-with-a-cyton-board-eeg-waves/4997 "2018-11-04T05:35:40Z")

</div>

I was wondering if anybody had any experience controlling any of the processing templates using an Open BCI Cyton 8 channel board and their EEG hand band (or similar)?

---

## ["couldn't run the sketch" while using sound](https://discourse.processing.org/t/couldnt-run-the-sketch-while-using-sound/5106)

<div class="topic-metadata">

**Author:** [@meiyangjie](https://discourse.processing.org/u/meiyangjie)\
**Replies:** 1\
**Last updated:** [November 4, 2018, 4:40am UTC](https://discourse.processing.org/t/couldnt-run-the-sketch-while-using-sound/5106 "2018-11-04T04:40:14Z")

</div>

Hi, guys, when I want to use the sound to play a music, it comes to some problems and I don’t what to do. here is the problem.

---

## [Alternative to Circular Array?](https://discourse.processing.org/t/alternative-to-circular-array/5147)

<div class="topic-metadata">

**Author:** [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Replies:** 13\
**Last updated:** [November 3, 2018, 11:46pm UTC](https://discourse.processing.org/t/alternative-to-circular-array/5147 "2018-11-03T23:46:04Z")

</div>

Now, i‘m not really looking for an alternative for a circular array, But for a System that works similar to it. A circular array is basically a normal array, that works like \[i%array.length\] (if i got that right…). What…

---

## [Images will open fine on Apple IMac but won't open on windows pc](https://discourse.processing.org/t/images-will-open-fine-on-apple-imac-but-wont-open-on-windows-pc/5168)

<div class="topic-metadata">

**Author:** [@corbyn](https://discourse.processing.org/u/corbyn)\
**Replies:** 1\
**Last updated:** [November 3, 2018, 11:35pm UTC](https://discourse.processing.org/t/images-will-open-fine-on-apple-imac-but-wont-open-on-windows-pc/5168 "2018-11-03T23:35:56Z")

</div>

When I work with images on an Apple IMac they work fine, I then save my code onto a flash drive with the data folder as well and everything else that is usually there in the sketch folder when I open it on a windows PC a…

---

## [Sorting Two Arrays at a Time?](https://discourse.processing.org/t/sorting-two-arrays-at-a-time/5164)

<div class="topic-metadata">

**Author:** [@alexac692](https://discourse.processing.org/u/alexac692)\
**Replies:** 2\
**Last updated:** [November 3, 2018, 10:37pm UTC](https://discourse.processing.org/t/sorting-two-arrays-at-a-time/5164 "2018-11-03T22:37:00Z")

</div>

My problem is that I want to take an array and “reassign” indices so that you can list them from lowest to highest, without actually shuffling the original array. In this case it’s with student IDs and I want to be able …

---

## [Draw rows of squares pattern](https://discourse.processing.org/t/draw-rows-of-squares-pattern/5100)

<div class="topic-metadata">

**Author:** [@gpevehou](https://discourse.processing.org/u/gpevehou)\
**Replies:** 10\
**Last updated:** [November 3, 2018, 10:04pm UTC](https://discourse.processing.org/t/draw-rows-of-squares-pattern/5100 "2018-11-03T22:04:41Z")

</div>

This code is supposed to be drawing the attached pattern, but is only drawing one square. . does anyone know what I need to add/ what I’m doing wrong? Thank you! int X\_coordinate=150; int y\_coordinate=200; void change…

---

## [Why does my spikes not show up?](https://discourse.processing.org/t/why-does-my-spikes-not-show-up/5161)

<div class="topic-metadata">

**Author:** [@Xeeker](https://discourse.processing.org/u/Xeeker)\
**Replies:** 2\
**Last updated:** [November 3, 2018, 6:39pm UTC](https://discourse.processing.org/t/why-does-my-spikes-not-show-up/5161 "2018-11-03T18:39:52Z")

</div>

float x = 150; float y = 200; float okning = 3; int toggle = 0; float r; int gravity = 0.07; int velocity; int NumbOfSpikes = 10; //S stands for Spike float\[\] SPos = new float \[NumbOfSpikes\]; float\[\] SX = new float \[N…

---

## [How to save Level Progress?](https://discourse.processing.org/t/how-to-save-level-progress/5156)

<div class="topic-metadata">

**Author:** [@Schred](https://discourse.processing.org/u/Schred)\
**Replies:** 13\
**Last updated:** [November 3, 2018, 4:34pm UTC](https://discourse.processing.org/t/how-to-save-level-progress/5156 "2018-11-03T16:34:39Z")

</div>

So I’m trying to make a small adventure mode for my game, and I need to be able to store the information when a level is completed. I am trying to use a PrintWriter, and it actually prints the right result into a text fi…

---

## [Problem with accelerometer](https://discourse.processing.org/t/problem-with-accelerometer/5131)

<div class="topic-metadata">

**Author:** [@chalita](https://discourse.processing.org/u/chalita)\
**Replies:** 1\
**Last updated:** [November 3, 2018, 10:44am UTC](https://discourse.processing.org/t/problem-with-accelerometer/5131 "2018-11-03T10:44:22Z")

</div>

import processing.serial.\*; Serial c; void setup() { size(800, 600, OPENGL); c = new Serial(this, "/dev/cu.usbserial-DN02SMXZ", 115200); // change the COM port } void draw() { float x, y, z; if (c.available()…

---

## [Difference between i/10\*10 and i?](https://discourse.processing.org/t/difference-between-i-10-10-and-i/5149)

<div class="topic-metadata">

**Author:** [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Replies:** 4\
**Last updated:** [November 3, 2018, 7:49am UTC](https://discourse.processing.org/t/difference-between-i-10-10-and-i/5149 "2018-11-03T07:49:37Z")

</div>

These are two codes, that should have the exact same result, but don’t… why? for (int i = 0; i \< vectors.length; i++) { vectors\[i\] = new PVector(i%10\*10 + 50, i/10\*10); } for (int i = 0; i \< vectors.length; i++)…

---

## [Getting a specific character printed when mouse is clicked](https://discourse.processing.org/t/getting-a-specific-character-printed-when-mouse-is-clicked/5138)

<div class="topic-metadata">

**Author:** [@rebelcoder](https://discourse.processing.org/u/rebelcoder)\
**Replies:** 8\
**Last updated:** [November 3, 2018, 2:29am UTC](https://discourse.processing.org/t/getting-a-specific-character-printed-when-mouse-is-clicked/5138 "2018-11-03T02:29:40Z")

</div>

Hey Guys, I am trying to write a program in which the alphabets are rotating in a circle with constant speed. this is my code for drawing the characters in a circle and then rotating them in a circle. the first angle dra…

---

## [Sliding Tile Puzzle](https://discourse.processing.org/t/sliding-tile-puzzle/4930)

<div class="topic-metadata">

**Author:** [@Shimuni](https://discourse.processing.org/u/Shimuni)\
**Replies:** 8\
**Last updated:** [November 3, 2018, 3:21am UTC](https://discourse.processing.org/t/sliding-tile-puzzle/4930 "2018-11-03T03:21:00Z")

</div>

I have to create a sliding tile puzzle, but it seems I am stuck. I don’t know how to make it so the tiles in the grid can swap places in order for me to arrange them correctly. Integer AmountOfButtons = 16; int cols = 4…

---

## [Trouble pushing a box with another box, collision detection](https://discourse.processing.org/t/trouble-pushing-a-box-with-another-box-collision-detection/4551)

<div class="topic-metadata">

**Author:** [@ddownn](https://discourse.processing.org/u/ddownn)\
**Replies:** 9\
**Last updated:** [November 3, 2018, 3:11am UTC](https://discourse.processing.org/t/trouble-pushing-a-box-with-another-box-collision-detection/4551 "2018-11-03T03:11:00Z")

</div>

Hello. I have been trying to find a way to get a box to push another box from any of its sides. This seems to almost work, but it keeps failing for some reason. Pushing from the top and right seem to work better than the…

---

## [How to make shapes out of characters using loop?](https://discourse.processing.org/t/how-to-make-shapes-out-of-characters-using-loop/5134)

<div class="topic-metadata">

**Author:** [@rollbon](https://discourse.processing.org/u/rollbon)\
**Replies:** 1\
**Last updated:** [November 2, 2018, 11:07pm UTC](https://discourse.processing.org/t/how-to-make-shapes-out-of-characters-using-loop/5134 "2018-11-02T23:07:22Z")

</div>

I am trying to make a circle that is made out of English Alphabet. I made a String that included the entire alphabet and I tried creating the circle using each character from the string individually using ‘for’ command (…

---

## [Sorting ArrayList](https://discourse.processing.org/t/sorting-arraylist/5083)

<div class="topic-metadata">

**Author:** [@Yann](https://discourse.processing.org/u/Yann)\
**Replies:** 5\
**Last updated:** [November 2, 2018, 10:13pm UTC](https://discourse.processing.org/t/sorting-arraylist/5083 "2018-11-02T22:13:25Z")

</div>

Hi, I can’t find how to sort an ArrayList by one of the variables of the contained objects. Let’s say I have a class like this one: class Event { int position; int value; Event(int p, int v) { position = p;…

---

## [TrueType loadFont](https://discourse.processing.org/t/truetype-loadfont/5127)

<div class="topic-metadata">

**Author:** [@FerrariLuigi](https://discourse.processing.org/u/FerrariLuigi)\
**Replies:** 3\
**Last updated:** [November 2, 2018, 9:25pm UTC](https://discourse.processing.org/t/truetype-loadfont/5127 "2018-11-02T21:25:40Z")

</div>

Dear all, according the example ( https://processing.org/reference/textFont\_.html ) on the reference manual I wrote the following sketch: PFont font32; void setup() { font32 = loadFont("steelfish rg.ttf"); size…

---

## [Need a help in simple "Label Marker" processing game](https://discourse.processing.org/t/need-a-help-in-simple-label-marker-processing-game/5130)

<div class="topic-metadata">

**Author:** [@John](https://discourse.processing.org/u/John)\
**Replies:** 1\
**Last updated:** [November 2, 2018, 8:38pm UTC](https://discourse.processing.org/t/need-a-help-in-simple-label-marker-processing-game/5130 "2018-11-02T20:38:40Z")

</div>

As i am new to processing so the program seemed vary hard for me. if some one helped me with that i would be glad.The instructions are given below: Write a program which will allow you to type a message at the bottom of…

---

## [Changing colors on a rectangle](https://discourse.processing.org/t/changing-colors-on-a-rectangle/5090)

<div class="topic-metadata">

**Author:** [@chalita](https://discourse.processing.org/u/chalita)\
**Replies:** 3\
**Last updated:** [November 2, 2018, 7:01pm UTC](https://discourse.processing.org/t/changing-colors-on-a-rectangle/5090 "2018-11-02T19:01:37Z")

</div>

THE FOLLOWING CODE IS WRITTEN ON PROCESSING. I NEED THE CODE TO CHANGE THE COLOR OF A RECTANGLE WHEN THE VARIABLE B CHANGES ITS VALUE. WHEN D\>20 THE RECTANGLE SHOULD BE GREEN, WHEN 20\>D\>10 IT SHOULD BE YELLOW, AND WHEN D\<…

---

## [Flood Fill Very Slow](https://discourse.processing.org/t/flood-fill-very-slow/5110)

<div class="topic-metadata">

**Author:** [@murphysuk](https://discourse.processing.org/u/murphysuk)\
**Replies:** 1\
**Last updated:** [November 2, 2018, 6:08pm UTC](https://discourse.processing.org/t/flood-fill-very-slow/5110 "2018-11-02T18:08:14Z")

</div>

I have created the flood fill program shown below. When you click in an area then that shape will fill with black. I am pleased with the result except that it is incredibly slow. I believe this is because every surroundi…

---

## [Filling window with points](https://discourse.processing.org/t/filling-window-with-points/5108)

<div class="topic-metadata">

**Author:** [@techMatt](https://discourse.processing.org/u/techMatt)\
**Replies:** 2\
**Last updated:** [November 2, 2018, 11:15am UTC](https://discourse.processing.org/t/filling-window-with-points/5108 "2018-11-02T11:15:57Z")

</div>

Hello guys, i’m here with my first processing issue. I don’t know why this code doesn’t work. My purpose was filling the entire window with points but i don’t see no points at all. Why?:frowning\_face::frowning\_face: Thi…

---

## [Particles moving away from center, how?](https://discourse.processing.org/t/particles-moving-away-from-center-how/5082)

<div class="topic-metadata">

**Author:** [@evievdm](https://discourse.processing.org/u/evievdm)\
**Replies:** 8\
**Last updated:** [November 2, 2018, 7:38am UTC](https://discourse.processing.org/t/particles-moving-away-from-center-how/5082 "2018-11-02T07:38:14Z")

</div>

Hello everyone! First of all, I am quite a newby to Processing and coding in general, so my code might not look very 'professional. I have created a program that has particles moving around. When the mouse is pressed,…

---

## [How to do serial without setting up new port?](https://discourse.processing.org/t/how-to-do-serial-without-setting-up-new-port/5076)

<div class="topic-metadata">

**Author:** [@GBry](https://discourse.processing.org/u/GBry)\
**Replies:** 4\
**Last updated:** [November 2, 2018, 5:29am UTC](https://discourse.processing.org/t/how-to-do-serial-without-setting-up-new-port/5076 "2018-11-02T05:29:43Z")

</div>

Hi, I’m trying to send a simple on/off command to Arduino, but the thing is, the serial port setup takes exactly 1561ms (so I had to add a delay of 1561 prior to sending the command) The question is, can I get one Proce…

---

## [Realtime 2D radiosity shader implementation](https://discourse.processing.org/t/realtime-2d-radiosity-shader-implementation/4257)

<div class="topic-metadata">

**Author:** [@solub](https://discourse.processing.org/u/solub)\
**Replies:** 4\
**Last updated:** [October 22, 2018, 9:31am UTC](https://discourse.processing.org/t/realtime-2d-radiosity-shader-implementation/4257 "2018-10-22T09:31:47Z")

</div>

Hi all, I was wondering if some of you could help me make this 2D radiosity shader work with Processing. By “work”, I mean being able: to apply the shader to basic shape primitives (rect, ellipse, triangle, arc) draw…

---

## [Serial Processing does not read or write anything to controller](https://discourse.processing.org/t/serial-processing-does-not-read-or-write-anything-to-controller/5094)

<div class="topic-metadata">

**Author:** [@vtrivedi](https://discourse.processing.org/u/vtrivedi)\
**Replies:** 2\
**Last updated:** [November 2, 2018, 3:36am UTC](https://discourse.processing.org/t/serial-processing-does-not-read-or-write-anything-to-controller/5094 "2018-11-02T03:36:37Z")

</div>

Hi Team, I have written a processing software for the first time for my project. The concept is to read data from and write commands to pulser controller over the serial port. However, even though I see the COM port g…

---

## [How should I structure the Main loop for my game?](https://discourse.processing.org/t/how-should-i-structure-the-main-loop-for-my-game/5009)

<div class="topic-metadata">

**Author:** [@Angle](https://discourse.processing.org/u/Angle)\
**Replies:** 4\
**Last updated:** [November 1, 2018, 11:23pm UTC](https://discourse.processing.org/t/how-should-i-structure-the-main-loop-for-my-game/5009 "2018-11-01T23:23:16Z")

</div>

Should I just use the draw() method from processing? Or should I use noLoop() and write my own main loop code instead? I want to implement dt (deltaTime, used to keep gameplay smooth) and all that jazz, so it seems like …

---

## [Black Box Behind Letters (how to eliminate)](https://discourse.processing.org/t/black-box-behind-letters-how-to-eliminate/5043)

<div class="topic-metadata">

**Author:** [@sirianth](https://discourse.processing.org/u/sirianth)\
**Replies:** 8\
**Last updated:** [November 1, 2018, 11:13pm UTC](https://discourse.processing.org/t/black-box-behind-letters-how-to-eliminate/5043 "2018-11-01T23:13:11Z")

</div>

I have some black boxes behind my text. What causes this and how do I elminate it? I can past my code, but my code is really long…

---

## [How to turn this code into a simple loop?](https://discourse.processing.org/t/how-to-turn-this-code-into-a-simple-loop/5098)

<div class="topic-metadata">

**Author:** [@rollbon](https://discourse.processing.org/u/rollbon)\
**Replies:** 1\
**Last updated:** [November 1, 2018, 10:27pm UTC](https://discourse.processing.org/t/how-to-turn-this-code-into-a-simple-loop/5098 "2018-11-01T22:27:08Z")

</div>

How can I turn this code into a simple loop using ‘for’ command? The first circle is the smallest circle, each circle, fill subtracts 30 and size grows by 10. The x and y stay the same. void setup(){ size(500, 500); …

---

## [NullPointerException](https://discourse.processing.org/t/nullpointerexception/5079)

<div class="topic-metadata">

**Author:** [@rohmat](https://discourse.processing.org/u/rohmat)\
**Replies:** 20\
**Last updated:** [November 1, 2018, 9:05pm UTC](https://discourse.processing.org/t/nullpointerexception/5079 "2018-11-01T21:05:21Z")

</div>

when i run my program, the message error say NullPointed Exception. could someone help me to fix my program? I’m still beginer with Processing Benda\[\] bola = new Benda\[20\]; color warna; PVector gravitasi; PVector angi…

---

## [Not sure how to code this Random/shuffling image effect](https://discourse.processing.org/t/not-sure-how-to-code-this-random-shuffling-image-effect/5073)

<div class="topic-metadata">

**Author:** [@Damo](https://discourse.processing.org/u/Damo)\
**Replies:** 4\
**Last updated:** [November 1, 2018, 7:39pm UTC](https://discourse.processing.org/t/not-sure-how-to-code-this-random-shuffling-image-effect/5073 "2018-11-01T19:39:21Z")

</div>

I want to code a random shuffling array of images, where each square pulls from a separate folder of images and every time it refreshes its another random array of images. I’m not sure how difficult this is any help …

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

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