# Latest

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

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

**Page:** 338

---

## [Solarization shader](https://discourse.processing.org/t/solarization-shader/21731)

<div class="topic-metadata">

**Author:** [@monkstone](https://discourse.processing.org/u/monkstone)\
**Replies:** 3\
**Last updated:** [June 11, 2020, 1:03pm UTC](https://discourse.processing.org/t/solarization-shader/21731 "2020-06-11T13:03:58Z")

</div>

Recently there was a post about creating a Sabbatier effect in processing. It got me thinking about creating a glsl shader filter, so I stole an idea from shader toy. Needed a bit of hacking to run with processing, here …

---

## [Generating landscapes. How to set real values?](https://discourse.processing.org/t/generating-landscapes-how-to-set-real-values/15018)

<div class="topic-metadata">

**Author:** [@Tanya](https://discourse.processing.org/u/Tanya)\
**Replies:** 6\
**Last updated:** [June 11, 2020, 12:56pm UTC](https://discourse.processing.org/t/generating-landscapes-how-to-set-real-values/15018 "2020-06-11T12:56:19Z")

</div>

Hello! I’m creating a program in JavaScript which will generate a landscape. It would be great to use real z-coordinate values. The idea is to use some function and it’ll return me the altitude of a certain point. Well, …

---

## [How to change the button label text of widget created by selectFileInput()](https://discourse.processing.org/t/how-to-change-the-button-label-text-of-widget-created-by-selectfileinput/21335)

<div class="topic-metadata">

**Author:** [@grege2](https://discourse.processing.org/u/grege2)\
**Replies:** 8\
**Last updated:** [June 11, 2020, 8:06am UTC](https://discourse.processing.org/t/how-to-change-the-button-label-text-of-widget-created-by-selectfileinput/21335 "2020-06-11T08:06:52Z")

</div>

Hi all, Very simple question, apologies. When I use createFileInput() in p5.js, the label on the button is always “Choose Files”, and I just can’t find a way to change the dang thing. I suppose createFileInput() create…

---

## [Will This Perceptron Work?](https://discourse.processing.org/t/will-this-perceptron-work/21692)

<div class="topic-metadata">

**Author:** [@Adi](https://discourse.processing.org/u/Adi)\
**Replies:** 3\
**Last updated:** [June 9, 2020, 5:59pm UTC](https://discourse.processing.org/t/will-this-perceptron-work/21692 "2020-06-09T17:59:06Z")

</div>

I am trying to code my own perceptron, based sort of on The Coading Train’s example, as a biginner I wanted to make it as simple as possible, I also wanted to make something new. So I decided on this example: (x \* z)+(y…

---

## [Detect if code is being run in editor or embedded](https://discourse.processing.org/t/detect-if-code-is-being-run-in-editor-or-embedded/21259)

<div class="topic-metadata">

**Author:** [@STEMcoding](https://discourse.processing.org/u/STEMcoding)\
**Replies:** 2\
**Last updated:** [May 24, 2020, 6:46pm UTC](https://discourse.processing.org/t/detect-if-code-is-being-run-in-editor-or-embedded/21259 "2020-05-24T18:46:48Z")

</div>

I would like to be able to add something to my p5.js code to be able to detect whether the code is being run in the http://editor.p5js.org environment or if it is being run embedded in a website. If in the editor then I…

---

## [Battery level on pc](https://discourse.processing.org/t/battery-level-on-pc/21740)

<div class="topic-metadata">

**Author:** [@juanjoc](https://discourse.processing.org/u/juanjoc)\
**Replies:** 1\
**Last updated:** [June 11, 2020, 12:50am UTC](https://discourse.processing.org/t/battery-level-on-pc/21740 "2020-06-11T00:50:41Z")

</div>

Hi everyone. I am interested to know if there is a way to know the pc battery level with any code. I just found it but only for android devices. Thanks

---

## [3rd Person Shooter translate() and camera()](https://discourse.processing.org/t/3rd-person-shooter-translate-and-camera/21633)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 3\
**Last updated:** [June 10, 2020, 10:56pm UTC](https://discourse.processing.org/t/3rd-person-shooter-translate-and-camera/21633 "2020-06-10T22:56:11Z")

</div>

Hello all, I would like to make a 3rd Person Shooter (or 3rd Person Player) where a player in 3D is followed by a camera. Move with mouse and wasd keys. I found a code in the forum. But in the code, the player and ca…

---

## [How do I use Processing to read and write data to an Arduino](https://discourse.processing.org/t/how-do-i-use-processing-to-read-and-write-data-to-an-arduino/21113)

<div class="topic-metadata">

**Author:** [@McLae5](https://discourse.processing.org/u/McLae5)\
**Replies:** 13\
**Last updated:** [June 10, 2020, 10:43pm UTC](https://discourse.processing.org/t/how-do-i-use-processing-to-read-and-write-data-to-an-arduino/21113 "2020-06-10T22:43:09Z")

</div>

Looking for a front end to manage Arduino data from a PC. I Know the arduino side (Serial IO and parsing), looking for a PC side option. The need is to read data from the arduino, make changes, and write updated data b…

---

## [A p5 React version of my Weather Station sketch](https://discourse.processing.org/t/a-p5-react-version-of-my-weather-station-sketch/21751)

<div class="topic-metadata">

**Author:** [@JustinJohnson](https://discourse.processing.org/u/JustinJohnson)\
**Replies:** 0\
**Last updated:** [June 10, 2020, 9:13pm UTC](https://discourse.processing.org/t/a-p5-react-version-of-my-weather-station-sketch/21751 "2020-06-10T21:13:43Z")

</div>

A follow up from a few weeks ago: For the past few weeks, I’ve actually been working on a version of this sketch with the React version of p5, along with some Bootstrap CSS to make it look a bit nicer and more responsiv…

---

## [Weather Station (Work in progress)](https://discourse.processing.org/t/weather-station-work-in-progress/21211)

<div class="topic-metadata">

**Author:** [@JustinJohnson](https://discourse.processing.org/u/JustinJohnson)\
**Replies:** 8\
**Last updated:** [June 10, 2020, 9:02pm UTC](https://discourse.processing.org/t/weather-station-work-in-progress/21211 "2020-06-10T21:02:34Z")

</div>

Hi! I’ve been working on this project over the past few days on OpenProcessing (link down below), and certainly welcome you to have a look :slight\_smile: It incorporates quite a bit of material (3D, JSON, API and DOM). …

---

## [Warnings using noSmooth() in setup()](https://discourse.processing.org/t/warnings-using-nosmooth-in-setup/21703)

<div class="topic-metadata">

**Author:** [@glv](https://discourse.processing.org/u/glv)\
**Replies:** 6\
**Last updated:** [June 10, 2020, 8:17pm UTC](https://discourse.processing.org/t/warnings-using-nosmooth-in-setup/21703 "2020-06-10T20:17:50Z")

</div>

Hello, Can anyone help me understand what is happening here? Ok: Ok: ? ? ? :)

---

## [GIF Of Inverting a binary Tree](https://discourse.processing.org/t/gif-of-inverting-a-binary-tree/21625)

<div class="topic-metadata">

**Author:** [@sharoha](https://discourse.processing.org/u/sharoha)\
**Replies:** 5\
**Last updated:** [June 10, 2020, 8:04pm UTC](https://discourse.processing.org/t/gif-of-inverting-a-binary-tree/21625 "2020-06-10T20:04:20Z")

</div>

Hi. I am trying to create a gif, for the inversion of a binary tree(swap the left and right child of a node). For that, I have created a sketch of a binary tree first And then I am trying to redraw the tree after swap…

---

## [Manually drawing an oval, in response to a straight mouse drag](https://discourse.processing.org/t/manually-drawing-an-oval-in-response-to-a-straight-mouse-drag/21710)

<div class="topic-metadata">

**Author:** [@ottenm](https://discourse.processing.org/u/ottenm)\
**Replies:** 7\
**Last updated:** [June 10, 2020, 7:41pm UTC](https://discourse.processing.org/t/manually-drawing-an-oval-in-response-to-a-straight-mouse-drag/21710 "2020-06-10T19:41:35Z")

</div>

I wrote a sketch for penning letters and digits on a touchscreen, and then manipulating them. I use it as a teaching tool for young kids. The penning part is trivial, just drawing lines in response to mouse events. I …

---

## [Can't get pixels out of my image](https://discourse.processing.org/t/cant-get-pixels-out-of-my-image/21733)

<div class="topic-metadata">

**Author:** [@marianalimoes](https://discourse.processing.org/u/marianalimoes)\
**Replies:** 2\
**Last updated:** [June 10, 2020, 7:30pm UTC](https://discourse.processing.org/t/cant-get-pixels-out-of-my-image/21733 "2020-06-10T19:30:23Z")

</div>

Hello kind people, I’m following Mr. Daniel Shiffman’s tutorial on blob detection (the first one) Here is the code I copied from his GitHub. I also have the Blob tab (exactly as his) and a DCapture class. Because my ca…

---

## [Help to make opensource repository](https://discourse.processing.org/t/help-to-make-opensource-repository/21716)

<div class="topic-metadata">

**Author:** [@JoseMY](https://discourse.processing.org/u/JoseMY)\
**Replies:** 7\
**Last updated:** [June 10, 2020, 1:39pm UTC](https://discourse.processing.org/t/help-to-make-opensource-repository/21716 "2020-06-10T13:39:37Z")

</div>

Hi! Please excuse my horrible English. One year ago I tried to submit one of my processing for android apps to F-Droid, but it was rejected because I used precompiled libraries. I was asked to add references to maven v…

---

## [Gray glsl filter with video capture](https://discourse.processing.org/t/gray-glsl-filter-with-video-capture/21735)

<div class="topic-metadata">

**Author:** [@monkstone](https://discourse.processing.org/u/monkstone)\
**Replies:** 0\
**Last updated:** [June 10, 2020, 12:39pm UTC](https://discourse.processing.org/t/gray-glsl-filter-with-video-capture/21735 "2020-06-10T12:39:47Z")

</div>

On a bit of roll with glsl filters and video capture on my RaspberryPI4. Previously people have reported issues using regular processing filters with video capture:- Opengl and face OSC Filter with glvideo Here is ano…

---

## [Pixel position synchronization error with face detector](https://discourse.processing.org/t/pixel-position-synchronization-error-with-face-detector/21592)

<div class="topic-metadata">

**Author:** [@panic](https://discourse.processing.org/u/panic)\
**Replies:** 4\
**Last updated:** [June 10, 2020, 12:34pm UTC](https://discourse.processing.org/t/pixel-position-synchronization-error-with-face-detector/21592 "2020-06-10T12:34:23Z")

</div>

Hello, I am trying to create a code that creates pixels on a video following the movement of the face detector. He managed to create the pixelated effect on the video but it stays in the upper corner and does not follow …

---

## [Cannot find solution to: "Could not run the sketch (Target VM failed to initialize)"](https://discourse.processing.org/t/cannot-find-solution-to-could-not-run-the-sketch-target-vm-failed-to-initialize/21732)

<div class="topic-metadata">

**Author:** [@TheEternalDragon](https://discourse.processing.org/u/TheEternalDragon)\
**Replies:** 9\
**Last updated:** [June 10, 2020, 11:14am UTC](https://discourse.processing.org/t/cannot-find-solution-to-could-not-run-the-sketch-target-vm-failed-to-initialize/21732 "2020-06-10T11:14:01Z")

</div>

So I have been getting this error that is stated in the title and I have looked around a bit. The problem often seems to be a library or an nVidea driver however I am not using any nVidea drivers. So I am at a bit of a l…

---

## [I need help to keep score](https://discourse.processing.org/t/i-need-help-to-keep-score/21724)

<div class="topic-metadata">

**Author:** [@mrporcessing](https://discourse.processing.org/u/mrporcessing)\
**Replies:** 2\
**Last updated:** [June 10, 2020, 10:11am UTC](https://discourse.processing.org/t/i-need-help-to-keep-score/21724 "2020-06-10T10:11:58Z")

</div>

Hi, I just need help adding the score to my game. Its doing random things. I need the score to be added separately when the ball touches each individual paddle. heres my code; //Screem int screenX = 600; int screenY = …

---

## [ArrayList size gives a nullPointerException, while data is stored](https://discourse.processing.org/t/arraylist-size-gives-a-nullpointerexception-while-data-is-stored/21712)

<div class="topic-metadata">

**Author:** [@BadGameDeveloper](https://discourse.processing.org/u/BadGameDeveloper)\
**Replies:** 10\
**Last updated:** [June 10, 2020, 7:56am UTC](https://discourse.processing.org/t/arraylist-size-gives-a-nullpointerexception-while-data-is-stored/21712 "2020-06-10T07:56:27Z")

</div>

Hi, I have a problem. My arraylist called spawns gives a NullPointerException on spawns.size. This happens in the constructor. I tried it with IntLists, but the same thing happened. The ArrayList should be read here. …

---

## [Everyone talking : full animation produced with processing](https://discourse.processing.org/t/everyone-talking-full-animation-produced-with-processing/21698)

<div class="topic-metadata">

**Author:** [@effedebe](https://discourse.processing.org/u/effedebe)\
**Replies:** 2\
**Last updated:** [June 10, 2020, 7:03am UTC](https://discourse.processing.org/t/everyone-talking-full-animation-produced-with-processing/21698 "2020-06-10T07:03:58Z")

</div>

2020-06-08T22:00:00Z (UTC) https://www.youtube.com/watch?v=EbfsPFbcBB4 Video : original graphics, full animated with processing sync with midi music Music : full composition of an original soundtrack This is a short …

---

## [Block the PApplet(Processing) closing action when ESC is pressed](https://discourse.processing.org/t/block-the-papplet-processing-closing-action-when-esc-is-pressed/21657)

<div class="topic-metadata">

**Author:** [@Moritz](https://discourse.processing.org/u/Moritz)\
**Replies:** 4\
**Last updated:** [June 10, 2020, 4:49am UTC](https://discourse.processing.org/t/block-the-papplet-processing-closing-action-when-esc-is-pressed/21657 "2020-06-10T04:49:51Z")

</div>

Hey Guys, How can i block the closing action when ESC is pressed? The only way i found by myself was to overwrite the original closing method and creating a new one @Override public void exit(){ } public void exitPr…

---

## [How to create a slider locked to an axis](https://discourse.processing.org/t/how-to-create-a-slider-locked-to-an-axis/21693)

<div class="topic-metadata">

**Author:** [@rkdnson](https://discourse.processing.org/u/rkdnson)\
**Replies:** 4\
**Last updated:** [June 9, 2020, 3:04pm UTC](https://discourse.processing.org/t/how-to-create-a-slider-locked-to-an-axis/21693 "2020-06-09T15:04:15Z")

</div>

Hello, I am trying to figure out how to lock the position of a slider to a specific axis. The slider starts at a point on the edge of a circle and needs to end in the center. The user should be able to move the slider (…

---

## [Ayuda con un proyecto](https://discourse.processing.org/t/ayuda-con-un-proyecto/21650)

<div class="topic-metadata">

**Author:** [@Txispas3](https://discourse.processing.org/u/Txispas3)\
**Replies:** 0\
**Last updated:** [June 7, 2020, 10:44am UTC](https://discourse.processing.org/t/ayuda-con-un-proyecto/21650 "2020-06-07T10:44:50Z")

</div>

Hola a tod@s os escribo para ver si podeis echarme una mano con un proyecto que tengo que hacer. Veréis tengo un dispositivo que se conecta a un pc con win10 por bluetooth mediante un programa que solo funciona en ese s…

---

## [Encoding 2 integers into RGBA without bitwise](https://discourse.processing.org/t/encoding-2-integers-into-rgba-without-bitwise/21718)

<div class="topic-metadata">

**Author:** [@zenglenn](https://discourse.processing.org/u/zenglenn)\
**Replies:** 1\
**Last updated:** [June 9, 2020, 9:16pm UTC](https://discourse.processing.org/t/encoding-2-integers-into-rgba-without-bitwise/21718 "2020-06-09T21:16:35Z")

</div>

I’m using Processing(Java) to write shaders that do lots of fancy code art. In my shader code I’m trying to get 2 integers (x,y positions) into an RGBA so I can send this colored pixel back to my Java program - and from …

---

## [Sabattier effect in processing](https://discourse.processing.org/t/sabattier-effect-in-processing/21553)

<div class="topic-metadata">

**Author:** [@gatz\_gaz](https://discourse.processing.org/u/gatz_gaz)\
**Replies:** 9\
**Last updated:** [June 9, 2020, 5:05pm UTC](https://discourse.processing.org/t/sabattier-effect-in-processing/21553 "2020-06-09T17:05:43Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hi, does anyone know how to do the Sabattier effect in processing? Example:

---

## [mouseClicked to get mouseX and mouseY](https://discourse.processing.org/t/mouseclicked-to-get-mousex-and-mousey/21704)

<div class="topic-metadata">

**Author:** [@Ciaran](https://discourse.processing.org/u/Ciaran)\
**Replies:** 9\
**Last updated:** [June 9, 2020, 3:46pm UTC](https://discourse.processing.org/t/mouseclicked-to-get-mousex-and-mousey/21704 "2020-06-09T15:46:16Z")

</div>

I want to be able to log the position of the mouse when it is clicked on the canvas, I can get it to work with mousePressed but the function mouseClicked() is not working can anyone point me in the right direction? Code…

---

## [(Windows 10) How to use DirectShow to read camera image](https://discourse.processing.org/t/windows-10-how-to-use-directshow-to-read-camera-image/21689)

<div class="topic-metadata">

**Author:** [@marianalimoes](https://discourse.processing.org/u/marianalimoes)\
**Replies:** 4\
**Last updated:** [June 9, 2020, 2:43pm UTC](https://discourse.processing.org/t/windows-10-how-to-use-directshow-to-read-camera-image/21689 "2020-06-09T14:43:49Z")

</div>

Hello, I am new here in the forum, so I hope I’m posting this issue correctly. As it is already known in the microsoft surface community, some programs don’t read the camera correctly. Before, it used to happen with vid…

---

## [Posiciones especificas de cuadrados](https://discourse.processing.org/t/posiciones-especificas-de-cuadrados/21668)

<div class="topic-metadata">

**Author:** [@aylen2000](https://discourse.processing.org/u/aylen2000)\
**Replies:** 0\
**Last updated:** [June 7, 2020, 7:41pm UTC](https://discourse.processing.org/t/posiciones-especificas-de-cuadrados/21668 "2020-06-07T19:41:45Z")

</div>

Holaa, necesito ayuda para un trabajo de la facultad. Consiste en generar con el movimiento y velocidad del mouse, diferentes obras de arte abstractas, en mi caso seleccione unas que contienen diferentes cuadrados cada u…

---

## [Implementing Shiffman Box 2D Library For p5js](https://discourse.processing.org/t/implementing-shiffman-box-2d-library-for-p5js/21676)

<div class="topic-metadata">

**Author:** [@noah1211](https://discourse.processing.org/u/noah1211)\
**Replies:** 4\
**Last updated:** [June 8, 2020, 5:18pm UTC](https://discourse.processing.org/t/implementing-shiffman-box-2d-library-for-p5js/21676 "2020-06-08T17:18:54Z")

</div>

Hello, I recently watched the nature of code video on the box2d library, and it looks very useful! I am having quite the tough time setting up the library for p5js (I am trying to use shiffman’s library). Is this library…

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

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