# Latest

**URL:** https://discourse.processing.org/latest.md?no_subcategories=false&page=587

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

**Page:** 588

---

## [Centering the center of div not top right corner](https://discourse.processing.org/t/centering-the-center-of-div-not-top-right-corner/3331)

<div class="topic-metadata">

**Author:** [@BlasterPal](https://discourse.processing.org/u/BlasterPal)\
**Replies:** 4\
**Last updated:** [September 8, 2018, 7:34pm UTC](https://discourse.processing.org/t/centering-the-center-of-div-not-top-right-corner/3331 "2018-09-08T19:34:06Z")

</div>

I’m using p5’s DOM library to create a div and add links to it. I want the div to show up in the center of the screen (aka the center point of the div should be the same as the center point of the screen). I’m using the …

---

## [How to solve p5.js problem](https://discourse.processing.org/t/how-to-solve-p5-js-problem/3373)

<div class="topic-metadata">

**Author:** [@demsp](https://discourse.processing.org/u/demsp)\
**Replies:** 1\
**Last updated:** [September 8, 2018, 7:18pm UTC](https://discourse.processing.org/t/how-to-solve-p5-js-problem/3373 "2018-09-08T19:18:27Z")

</div>

I want to add a question, but how can i insert a code here?

---

## [Cellular Automata Simulator](https://discourse.processing.org/t/cellular-automata-simulator/3358)

<div class="topic-metadata">

**Author:** [@bprentice](https://discourse.processing.org/u/bprentice)\
**Replies:** 6\
**Last updated:** [September 8, 2018, 1:54pm UTC](https://discourse.processing.org/t/cellular-automata-simulator/3358 "2018-09-08T13:54:11Z")

</div>

A sketch called RuleTable that implements a cellular automata simulator can be obtained from here: http://bprentice.webenet.net/RuleTable/RuleTable.zip The simulator supports 2, 3, 4, 5, 6 and 7 state rules. The simula…

---

## [Fetch API cannot load file](https://discourse.processing.org/t/fetch-api-cannot-load-file/3261)

<div class="topic-metadata">

**Author:** [@josephh](https://discourse.processing.org/u/josephh)\
**Replies:** 8\
**Last updated:** [September 8, 2018, 1:34am UTC](https://discourse.processing.org/t/fetch-api-cannot-load-file/3261 "2018-09-08T01:34:58Z")

</div>

Hi there, I have a problem with loading a binary file using the function loadBytes() in p5.js using Chrome ( 68.0.3440.106 Build official 64 bits ). It says : My code : var binary\_file; function preload(){ bina…

---

## [Using Sensors and Pi](https://discourse.processing.org/t/using-sensors-and-pi/1189)

<div class="topic-metadata">

**Author:** [@Zengirl2](https://discourse.processing.org/u/Zengirl2)\
**Replies:** 4\
**Last updated:** [September 7, 2018, 8:22pm UTC](https://discourse.processing.org/t/using-sensors-and-pi/1189 "2018-09-07T20:22:35Z")

</div>

I’m used to using sensors on Arduino, but having problems understanding use on Pi. It seems Processing has GPIO function, but it isn’t clear to me whether you can hook up a Lux sensor (like TSL2561) to the Pi and expect …

---

## [Using Processing in Eclipse](https://discourse.processing.org/t/using-processing-in-eclipse/3328)

<div class="topic-metadata">

**Author:** [@gust](https://discourse.processing.org/u/gust)\
**Replies:** 6\
**Last updated:** [September 7, 2018, 7:44pm UTC](https://discourse.processing.org/t/using-processing-in-eclipse/3328 "2018-09-07T19:44:18Z")

</div>

I am trying to use processing in java in eclipse and importing it after adding the processing jar file to eclipse but getting this error on eclipse about expecting android

---

## [Quick Question About Tables](https://discourse.processing.org/t/quick-question-about-tables/3316)

<div class="topic-metadata">

**Author:** [@dtools22](https://discourse.processing.org/u/dtools22)\
**Replies:** 2\
**Last updated:** [September 7, 2018, 7:11pm UTC](https://discourse.processing.org/t/quick-question-about-tables/3316 "2018-09-07T19:11:53Z")

</div>

Hello All, I have a quick question about how to create new tables. I am working on a data analysis program for poker hands. Each time I do analysis according to certain parameters, I would like the program to create a…

---

## [Trails on a webcam image that detects motion](https://discourse.processing.org/t/trails-on-a-webcam-image-that-detects-motion/3313)

<div class="topic-metadata">

**Author:** [@unknownplayer](https://discourse.processing.org/u/unknownplayer)\
**Replies:** 2\
**Last updated:** [September 7, 2018, 6:40pm UTC](https://discourse.processing.org/t/trails-on-a-webcam-image-that-detects-motion/3313 "2018-09-07T18:40:20Z")

</div>

Hello, sorry for the vague title, couldn’t know how to describe it in a sentence. Here is the problem I’m facing; I have this piece of code which detects any kind of motion and paints those pixels to white: float dg; …

---

## [Processing rectMode()](https://discourse.processing.org/t/processing-rectmode/3332)

<div class="topic-metadata">

**Author:** [@creepercrack](https://discourse.processing.org/u/creepercrack)\
**Replies:** 2\
**Last updated:** [September 7, 2018, 5:41pm UTC](https://discourse.processing.org/t/processing-rectmode/3332 "2018-09-07T17:41:34Z")

</div>

I think there is a bug with rectMode() in processing 3.4 rectMode() is affecting the way text gets drawn on the screen. background(0); text("Text 1", 0, 0, 100, 100); rectMode(CENTER); text("Text 2", 0, 30, 100, 100);…

---

## [How to apply a vhs effect?](https://discourse.processing.org/t/how-to-apply-a-vhs-effect/3268)

<div class="topic-metadata">

**Author:** [@molo32](https://discourse.processing.org/u/molo32)\
**Replies:** 4\
**Last updated:** [September 7, 2018, 4:12pm UTC](https://discourse.processing.org/t/how-to-apply-a-vhs-effect/3268 "2018-09-07T16:12:39Z")

</div>

Does anyone have an idea how to apply this vhs effect in a PImage?

---

## [How to make keyPressed work inside a while loop](https://discourse.processing.org/t/how-to-make-keypressed-work-inside-a-while-loop/3257)

<div class="topic-metadata">

**Author:** [@Yamin](https://discourse.processing.org/u/Yamin)\
**Replies:** 7\
**Last updated:** [September 7, 2018, 4:54pm UTC](https://discourse.processing.org/t/how-to-make-keypressed-work-inside-a-while-loop/3257 "2018-09-07T16:54:20Z")

</div>

Hi guys,I’m working on a project and I need to detect keypressed inside a while loop. Basically there is going to be couple of while loops and depending on the key pressed, the program will come out from the while loop. …

---

## [P5.js image width and height error](https://discourse.processing.org/t/p5-js-image-width-and-height-error/3345)

<div class="topic-metadata">

**Author:** [@josephh](https://discourse.processing.org/u/josephh)\
**Replies:** 4\
**Last updated:** [September 7, 2018, 3:25pm UTC](https://discourse.processing.org/t/p5-js-image-width-and-height-error/3345 "2018-09-07T15:25:54Z")

</div>

Hello there, Basically I want to load some images (in the folder pics/n\*.jpg) and get their pixel data in a 2d array (data = \[\]). I have this code : let data = \[\]; let img; function preload() { for (let i = 0; i \<…

---

## [How to remove the "loading" message from preload()](https://discourse.processing.org/t/how-to-remove-the-loading-message-from-preload/3317)

<div class="topic-metadata">

**Author:** [@currymike](https://discourse.processing.org/u/currymike)\
**Replies:** 4\
**Last updated:** [September 7, 2018, 2:45pm UTC](https://discourse.processing.org/t/how-to-remove-the-loading-message-from-preload/3317 "2018-09-07T14:45:34Z")

</div>

Is there a way to remove the “loading” message when the preload function is running? I’m fine with the screen being blank, just need the loading gone. I can’t seem to find the answer in the P5.JS reference. Any help w…

---

## [Trying to Draw a ball for a Pong Game](https://discourse.processing.org/t/trying-to-draw-a-ball-for-a-pong-game/3073)

<div class="topic-metadata">

**Author:** [@Blue\_Obsidian](https://discourse.processing.org/u/Blue_Obsidian)\
**Replies:** 13\
**Last updated:** [September 7, 2018, 2:19pm UTC](https://discourse.processing.org/t/trying-to-draw-a-ball-for-a-pong-game/3073 "2018-09-07T14:19:45Z")

</div>

float ballX = 200; float ballY = 200; float playerY = 0; boolean accX = true; boolean accY = true; boolean first = true; boolean game\_over = false; void setup (){ size(500, 500); background (0); fill(255); re…

---

## [\[99% SOLVED\]Klein Bottle rendering?](https://discourse.processing.org/t/99-solved-klein-bottle-rendering/2262)

<div class="topic-metadata">

**Author:** [@kll](https://discourse.processing.org/u/kll)\
**Replies:** 5\
**Last updated:** [September 7, 2018, 9:00am UTC](https://discourse.processing.org/t/99-solved-klein-bottle-rendering/2262 "2018-09-07T09:00:08Z")

</div>

i wanted to test the math i found at internet and draw a KLEIN BOTTLE and i try to render it by KleinS.beginShape(TRIANGLE\_STRIP); KleinS.vertex(xs, ys, zs); KleinS.vertex(xs+1, ys+1, zs+1); and i got something wha…

---

## [I fixed the issue #5317](https://discourse.processing.org/t/i-fixed-the-issue-5317/1371)

<div class="topic-metadata">

**Author:** [@ChristianBender](https://discourse.processing.org/u/ChristianBender)\
**Replies:** 0\
**Last updated:** [June 29, 2018, 7:24pm UTC](https://discourse.processing.org/t/i-fixed-the-issue-5317/1371 "2018-06-29T19:24:24Z")

</div>

Hello everybody! I fixed the issue #5317. And made a Pull Request on GitHub. Can someone look on it? Greetings Christian

---

## [Local server: Apache instructions missing. Please revert](https://discourse.processing.org/t/local-server-apache-instructions-missing-please-revert/1397)

<div class="topic-metadata">

**Author:** [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Replies:** 0\
**Last updated:** [July 1, 2018, 1:31am UTC](https://discourse.processing.org/t/local-server-apache-instructions-missing-please-revert/1397 "2018-07-01T01:31:16Z")

</div>

I am referring to this wiki entry in the Processing|P5.js GitHub’s page under the wiki page tab. The instructions to configure the Apache server were replaced with instructions of how to setup php. These instructions onl…

---

## [Inspiration: Tetris](https://discourse.processing.org/t/inspiration-tetris/1426)

<div class="topic-metadata">

**Author:** [@matthewjohnjamieson](https://discourse.processing.org/u/matthewjohnjamieson)\
**Replies:** 0\
**Last updated:** [July 2, 2018, 2:21am UTC](https://discourse.processing.org/t/inspiration-tetris/1426 "2018-07-02T02:21:01Z")

</div>

Apparently the makers of Rez are making the next Tetris game. This really isn’t about processing, but this game really looks like a piece of interactive art and I’m so inspired by it I thought I’d share it with the commu…

---

## [Sound - error when trying to construct any object](https://discourse.processing.org/t/sound-error-when-trying-to-construct-any-object/3283)

<div class="topic-metadata">

**Author:** [@SoundProblems](https://discourse.processing.org/u/SoundProblems)\
**Replies:** 3\
**Last updated:** [September 7, 2018, 4:49am UTC](https://discourse.processing.org/t/sound-error-when-trying-to-construct-any-object/3283 "2018-09-07T04:49:42Z")

</div>

Hi all, I get “ArrayIndexOutOfBoundsException: -1” error when I run the following example code: import processing.sound.\*; SawOsc saw; void setup() { size(640, 360); background(255); // Create square wave os…

---

## [outputDevice in Sound library causing errors when specifying audio channel](https://discourse.processing.org/t/outputdevice-in-sound-library-causing-errors-when-specifying-audio-channel/3222)

<div class="topic-metadata">

**Author:** [@HauntedPliers](https://discourse.processing.org/u/HauntedPliers)\
**Replies:** 5\
**Last updated:** [September 7, 2018, 4:48am UTC](https://discourse.processing.org/t/outputdevice-in-sound-library-causing-errors-when-specifying-audio-channel/3222 "2018-09-07T04:48:51Z")

</div>

Hello, I’m trying to use the Sound library to select which channel of a soundcard to play audio from, but whenever I call the outputDevice command I get some extensive red text no audio. This is the case even when selec…

---

## [How to auto read and print the extra word from the updating text which can auto save](https://discourse.processing.org/t/how-to-auto-read-and-print-the-extra-word-from-the-updating-text-which-can-auto-save/3094)

<div class="topic-metadata">

**Author:** [@Iris](https://discourse.processing.org/u/Iris)\
**Replies:** 5\
**Last updated:** [September 7, 2018, 4:40am UTC](https://discourse.processing.org/t/how-to-auto-read-and-print-the-extra-word-from-the-updating-text-which-can-auto-save/3094 "2018-09-07T04:40:42Z")

</div>

at first I load string in setup and because every time I need to loadstring ,so I write in draw function too, and code below, but there are the problem ,null pointerException.seems like sometimes there are null in the a…

---

## [Draw() not drawing when using pixels to fade image](https://discourse.processing.org/t/draw-not-drawing-when-using-pixels-to-fade-image/3267)

<div class="topic-metadata">

**Author:** [@vixo777](https://discourse.processing.org/u/vixo777)\
**Replies:** 3\
**Last updated:** [September 7, 2018, 2:01am UTC](https://discourse.processing.org/t/draw-not-drawing-when-using-pixels-to-fade-image/3267 "2018-09-07T02:01:25Z")

</div>

Hi all, I’m trying to implement a fade effect. The basic idea is to draw something on the canvas that fades overtime. I draw multiple times, and call fade after every draw, to create an effect where old drawings eventual…

---

## [Point-Triangle Collision](https://discourse.processing.org/t/point-triangle-collision/3187)

<div class="topic-metadata">

**Author:** [@Odermonicon](https://discourse.processing.org/u/Odermonicon)\
**Replies:** 6\
**Last updated:** [September 6, 2018, 11:56pm UTC](https://discourse.processing.org/t/point-triangle-collision/3187 "2018-09-06T23:56:12Z")

</div>

I am creating a 3D engine that does not use wireframe, but rendering the triangles Is the problem! I have seen other code but I don’t understand it. https://www.openprocessing.org/sketch/6380#

---

## [Snmp processing](https://discourse.processing.org/t/snmp-processing/3335)

<div class="topic-metadata">

**Author:** [@tm7677](https://discourse.processing.org/u/tm7677)\
**Replies:** 0\
**Last updated:** [September 6, 2018, 11:55pm UTC](https://discourse.processing.org/t/snmp-processing/3335 "2018-09-06T23:55:54Z")

</div>

Does any have any experience using Processing to utilize snmp data for network and device monitoring?

---

## [Grafica using A TON of memory](https://discourse.processing.org/t/grafica-using-a-ton-of-memory/3300)

<div class="topic-metadata">

**Author:** [@Tglaser92](https://discourse.processing.org/u/Tglaser92)\
**Replies:** 6\
**Last updated:** [September 6, 2018, 10:09pm UTC](https://discourse.processing.org/t/grafica-using-a-ton-of-memory/3300 "2018-09-06T22:09:34Z")

</div>

Hello everybody, I’ve built a simple GUI in processing (P3) to show some sensor data in near real-time and have hit a bit of a snag with Grafica. I’m plotting three values over a 25 point span and it quickly (20s) uses…

---

## [Beads audio library in Python mode](https://discourse.processing.org/t/beads-audio-library-in-python-mode/3077)

<div class="topic-metadata">

**Author:** [@wissme](https://discourse.processing.org/u/wissme)\
**Replies:** 25\
**Last updated:** [September 6, 2018, 8:12pm UTC](https://discourse.processing.org/t/beads-audio-library-in-python-mode/3077 "2018-09-06T20:12:19Z")

</div>

Hi ! I am starting to learn Beads audio library, wonderful book by Evan Merz but in Java. The beads library works fine in Processing.py up to some points where the Java does not seem obvious to be translated in Python. …

---

## [How do I allow two players to play at once using only one keyboard?](https://discourse.processing.org/t/how-do-i-allow-two-players-to-play-at-once-using-only-one-keyboard/3320)

<div class="topic-metadata">

**Author:** [@domjanabi](https://discourse.processing.org/u/domjanabi)\
**Replies:** 4\
**Last updated:** [September 6, 2018, 6:38pm UTC](https://discourse.processing.org/t/how-do-i-allow-two-players-to-play-at-once-using-only-one-keyboard/3320 "2018-09-06T18:38:11Z")

</div>

I tried recreating pong and it went pretty well … except the part where you actually play the game. It doesn’t work with keyPressed() because I would need at least two instances of the key variable running at the same t…

---

## [super.onSaveInstanceState does not exist](https://discourse.processing.org/t/super-onsaveinstancestate-does-not-exist/3251)

<div class="topic-metadata">

**Author:** [@KTibow](https://discourse.processing.org/u/KTibow)\
**Replies:** 13\
**Last updated:** [September 6, 2018, 2:54pm UTC](https://discourse.processing.org/t/super-onsaveinstancestate-does-not-exist/3251 "2018-09-06T14:54:04Z")

</div>

I’m making an app which has multiple pages, and I’m overriding onSaveInstanceState to save across rotation. But then, I get the error “The function onSaveInstanceState(Bundle) does not exist”. My code is public void onS…

---

## [Flip Mirror the screen, Android Mode VR](https://discourse.processing.org/t/flip-mirror-the-screen-android-mode-vr/3309)

<div class="topic-metadata">

**Author:** [@Yarosia](https://discourse.processing.org/u/Yarosia)\
**Replies:** 1\
**Last updated:** [September 6, 2018, 10:00am UTC](https://discourse.processing.org/t/flip-mirror-the-screen-android-mode-vr/3309 "2018-09-06T10:00:36Z")

</div>

Hello, i have a pair of AR Glasses to put my smartphone in. The glasses have translucid lens which reflects the screen of my phone. I would like to create a VR app, but i need to flip mirror the entire content of the si…

---

## [A pathfinding solution](https://discourse.processing.org/t/a-pathfinding-solution/1809)

<div class="topic-metadata">

**Author:** [@vincentstrebelle](https://discourse.processing.org/u/vincentstrebelle)\
**Replies:** 27\
**Last updated:** [September 6, 2018, 9:47am UTC](https://discourse.processing.org/t/a-pathfinding-solution/1809 "2018-09-06T09:47:42Z")

</div>

Hi everybody, i ask my first question here and i recived great help, so here is my second question. i have creatures who move randomly for now, if they find the food they eat ect… but now i want to make some “water sou…

[Previous page](https://discourse.processing.org/latest.md?no_subcategories=false&page=586)

[Next page](https://discourse.processing.org/latest.md?no_subcategories=false&page=588)
