# Processing

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

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

**Page:** 258

---

## [How to get a turnkey!](https://discourse.processing.org/t/how-to-get-a-turnkey/15716)

<div class="topic-metadata">

**Author:** [@O-O](https://discourse.processing.org/u/O-O)\
**Replies:** 1\
**Last updated:** [November 22, 2019, 1:06pm UTC](https://discourse.processing.org/t/how-to-get-a-turnkey/15716 "2019-11-22T13:06:45Z")

</div>

I’m going to adjust the angle of the cannon with the orientation key on the keyboard. How can I get a orientation key?:face\_with\_raised\_eyebrow:

---

## [Scale PShape object centered](https://discourse.processing.org/t/scale-pshape-object-centered/15710)

<div class="topic-metadata">

**Author:** [@lumicon9](https://discourse.processing.org/u/lumicon9)\
**Replies:** 2\
**Last updated:** [November 22, 2019, 10:34am UTC](https://discourse.processing.org/t/scale-pshape-object-centered/15710 "2019-11-22T10:34:54Z")

</div>

hi, how can i scale a PShape object centered? PShape square; float shrink; float sizeXY=100; void setup() { size(300, 300); square = createShape(RECT, 0, 0, sizeXY, sizeXY); } void draw() { shrink=shrink+0.0…

---

## [Need help to prevent Infinity to occur](https://discourse.processing.org/t/need-help-to-prevent-infinity-to-occur/15696)

<div class="topic-metadata">

**Author:** [@NumericPrime](https://discourse.processing.org/u/NumericPrime)\
**Replies:** 2\
**Last updated:** [November 21, 2019, 11:00pm UTC](https://discourse.processing.org/t/need-help-to-prevent-infinity-to-occur/15696 "2019-11-21T23:00:47Z")

</div>

I got following problem I’m creating a Neuronal Network class And for some strange reasons I don’t know there is one point in the learning process at wich there it suddenly becomes Infinity and then NaN. Here is code of …

---

## [What is boolean?](https://discourse.processing.org/t/what-is-boolean/15675)

<div class="topic-metadata">

**Author:** [@meow](https://discourse.processing.org/u/meow)\
**Replies:** 13\
**Last updated:** [November 21, 2019, 10:40pm UTC](https://discourse.processing.org/t/what-is-boolean/15675 "2019-11-21T22:40:52Z")

</div>

what is boolean and how do they work in processing

---

## [Classes and Arrays](https://discourse.processing.org/t/classes-and-arrays/15702)

<div class="topic-metadata">

**Author:** [@NewbCoder](https://discourse.processing.org/u/NewbCoder)\
**Replies:** 1\
**Last updated:** [November 21, 2019, 9:36pm UTC](https://discourse.processing.org/t/classes-and-arrays/15702 "2019-11-21T21:36:07Z")

</div>

Hello, I’m having issues with += operator to calculate the average of an array of type class. This is occurring in my Calculate\_Average function. For some reason, it does not agree with the object I’ve created. I was won…

---

## [How to make an animation appear for multiple seconds when collison happens?](https://discourse.processing.org/t/how-to-make-an-animation-appear-for-multiple-seconds-when-collison-happens/15698)

<div class="topic-metadata">

**Author:** [@legutierrez1](https://discourse.processing.org/u/legutierrez1)\
**Replies:** 1\
**Last updated:** [November 21, 2019, 8:31pm UTC](https://discourse.processing.org/t/how-to-make-an-animation-appear-for-multiple-seconds-when-collison-happens/15698 "2019-11-21T20:31:30Z")

</div>

Hello my name is Julio and i’m an undergraduate student that is new to processing. My question is about how can i make a variable inside of a collision appear for multiple seconds. The code part i need help with is the…

---

## [Strange behavior of code](https://discourse.processing.org/t/strange-behavior-of-code/15682)

<div class="topic-metadata">

**Author:** [@qwerty](https://discourse.processing.org/u/qwerty)\
**Replies:** 19\
**Last updated:** [November 21, 2019, 3:04pm UTC](https://discourse.processing.org/t/strange-behavior-of-code/15682 "2019-11-21T15:04:35Z")

</div>

Hello. Today i’ve searching the Internet for the new Processing tutorials and found this one: void setup() { size(400, 400); background(#3355CC); } void draw() { fill(#3355CC, 20); rect(0, 0, width, he…

---

## [Connect to node.js](https://discourse.processing.org/t/connect-to-node-js/15683)

<div class="topic-metadata">

**Author:** [@clankill3r](https://discourse.processing.org/u/clankill3r)\
**Replies:** 0\
**Last updated:** [November 21, 2019, 10:51am UTC](https://discourse.processing.org/t/connect-to-node-js/15683 "2019-11-21T10:51:29Z")

</div>

Is anyone able to connect processing with node.js? I get onError(EOFException: Reading WebSocket Upgrade response) import websockets.\*; WebsocketClient wsc; void setup() { size(200, 200); wsc = new WebsocketClie…

---

## [Responsive Image possible?](https://discourse.processing.org/t/responsive-image-possible/15686)

<div class="topic-metadata">

**Author:** [@lail](https://discourse.processing.org/u/lail)\
**Replies:** 4\
**Last updated:** [November 21, 2019, 12:14pm UTC](https://discourse.processing.org/t/responsive-image-possible/15686 "2019-11-21T12:14:20Z")

</div>

Hi :slight\_smile: I made a sketch on open processing.org and I wanted to send the link to different devices like Mobilephone or Computer with different resolutions. So I gave the canvas the fullScreen(); command. Now th…

---

## [How to draw a ring?](https://discourse.processing.org/t/how-to-draw-a-ring/3873)

<div class="topic-metadata">

**Author:** [@colaps](https://discourse.processing.org/u/colaps)\
**Replies:** 5\
**Last updated:** [November 21, 2019, 10:11am UTC](https://discourse.processing.org/t/how-to-draw-a-ring/3873 "2019-11-21T10:11:46Z")

</div>

Hi everybody, As a newbie in Processing, I try to draw a “ring”… (because English is not my native language I have to clarify what is a “ring” for me: a circle with a hole at the center, like a donut :slight\_smile:). M…

---

## [ControlP5 buttons - How to make them work](https://discourse.processing.org/t/controlp5-buttons-how-to-make-them-work/15550)

<div class="topic-metadata">

**Author:** [@dawn](https://discourse.processing.org/u/dawn)\
**Replies:** 5\
**Last updated:** [November 20, 2019, 10:15pm UTC](https://discourse.processing.org/t/controlp5-buttons-how-to-make-them-work/15550 "2019-11-20T22:15:44Z")

</div>

Hello, I’m trying to create a photo filter app using controlP5 buttons. How can I make it work? I have tried this (thinking how I built a filter app before using the keyboard), but it doesn’t work, seems like I still d…

---

## [Reading Data from Microsoft Access Files](https://discourse.processing.org/t/reading-data-from-microsoft-access-files/15622)

<div class="topic-metadata">

**Author:** [@Lehmoxy](https://discourse.processing.org/u/Lehmoxy)\
**Replies:** 10\
**Last updated:** [November 20, 2019, 4:03pm UTC](https://discourse.processing.org/t/reading-data-from-microsoft-access-files/15622 "2019-11-20T16:03:26Z")

</div>

Hello everyone. I am trying to make a custom interface tool/client for a Microsoft Access database, and I need to be able to read information from a Microsoft Access file. Are there any libraries or other tools available…

---

## [I am confused on why my code won't work](https://discourse.processing.org/t/i-am-confused-on-why-my-code-wont-work/15648)

<div class="topic-metadata">

**Author:** [@Silly\_bois](https://discourse.processing.org/u/Silly_bois)\
**Replies:** 2\
**Last updated:** [November 20, 2019, 1:09pm UTC](https://discourse.processing.org/t/i-am-confused-on-why-my-code-wont-work/15648 "2019-11-20T13:09:52Z")

</div>

int mode = 0; int INTRO = 0; int levelone = 1; int GAME\_OVER = 2; int fontcolor; float speed = 3; void setup () { background(0); size(1440, 900); fontcolor = color( 0, 225, 149); } void draw () { if (mode == IN…

---

## [Easily converting keycode to string](https://discourse.processing.org/t/easily-converting-keycode-to-string/15649)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 2\
**Last updated:** [November 19, 2019, 11:53pm UTC](https://discourse.processing.org/t/easily-converting-keycode-to-string/15649 "2019-11-19T23:53:59Z")

</div>

Is there a way to easily convert a keycode to a string, without having to create a case list for each letter?

---

## [Only countdown when mouse at a certain position](https://discourse.processing.org/t/only-countdown-when-mouse-at-a-certain-position/15635)

<div class="topic-metadata">

**Author:** [@kinglucas](https://discourse.processing.org/u/kinglucas)\
**Replies:** 1\
**Last updated:** [November 19, 2019, 2:21pm UTC](https://discourse.processing.org/t/only-countdown-when-mouse-at-a-certain-position/15635 "2019-11-19T14:21:08Z")

</div>

I want a countdown timer only when the mouse is on the bottom left rectangle the timer counts down and if you are not in that part it doesnt count down. Thank you in advance. // IMPORTANT!!! READ BELOW // Every scene is…

---

## [Using sound and mouse interaction](https://discourse.processing.org/t/using-sound-and-mouse-interaction/15441)

<div class="topic-metadata">

**Author:** [@JoseBri93](https://discourse.processing.org/u/JoseBri93)\
**Replies:** 6\
**Last updated:** [November 19, 2019, 6:41am UTC](https://discourse.processing.org/t/using-sound-and-mouse-interaction/15441 "2019-11-19T06:41:46Z")

</div>

Hi, Im currently working on this sketch. Overall, whenever i overlap the mouse on any ellipse, i get a color fill and a piece of sound that start playing. The problem was the sound started looping insanely fast (partly …

---

## [Text output in 3d using various rotations: text letters bounding box becomes not transparent](https://discourse.processing.org/t/text-output-in-3d-using-various-rotations-text-letters-bounding-box-becomes-not-transparent/15629)

<div class="topic-metadata">

**Author:** [@add02one](https://discourse.processing.org/u/add02one)\
**Replies:** 2\
**Last updated:** [November 19, 2019, 2:56am UTC](https://discourse.processing.org/t/text-output-in-3d-using-various-rotations-text-letters-bounding-box-becomes-not-transparent/15629 "2019-11-19T02:56:36Z")

</div>

hi, i’m trying to output text in 3d using various rotations and subsequent text’s bounding box starts hiding the text below. This is my code, very simple. Is there a way to fix this? Thanks in advance! void setup() …

---

## [How to print one rectangle at a time vs all at once?](https://discourse.processing.org/t/how-to-print-one-rectangle-at-a-time-vs-all-at-once/15617)

<div class="topic-metadata">

**Author:** [@ballinoates](https://discourse.processing.org/u/ballinoates)\
**Replies:** 4\
**Last updated:** [November 19, 2019, 2:53am UTC](https://discourse.processing.org/t/how-to-print-one-rectangle-at-a-time-vs-all-at-once/15617 "2019-11-19T02:53:54Z")

</div>

Hi all- n00b here, trying to learn this fantastic language but am having some trouble. I am taking this one step at a time but am missing something. My end idea is to have 100x100 pix rect’s fade in and fade out in rand…

---

## [Need help with supervised learning in neuronal networks](https://discourse.processing.org/t/need-help-with-supervised-learning-in-neuronal-networks/15585)

<div class="topic-metadata">

**Author:** [@NumericPrime](https://discourse.processing.org/u/NumericPrime)\
**Replies:** 5\
**Last updated:** [November 18, 2019, 11:58pm UTC](https://discourse.processing.org/t/need-help-with-supervised-learning-in-neuronal-networks/15585 "2019-11-18T23:58:18Z")

</div>

Hi I’m trying to programm a neuronal Network but as I looked for some functions for the change of weights to make the programm learn. Here is my code so far: class Neuron { int \_x, \_y; int id; float\[\] weights; f…

---

## [Null pointer exception on hashmap](https://discourse.processing.org/t/null-pointer-exception-on-hashmap/15627)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 1\
**Last updated:** [November 18, 2019, 10:58pm UTC](https://discourse.processing.org/t/null-pointer-exception-on-hashmap/15627 "2019-11-18T22:58:39Z")

</div>

I’m initialising a hashmap in a constructor Menu(float xx, float yy, float ww, float hh){ x = xx; y = yy; w = ww; h = hh; xoff = 0; yoff = 0; toggle =0; values = new HashMap\<String,B…

---

## [Custom Processing library doesn't compile (Missing "com.sun.tools.javac.Main")](https://discourse.processing.org/t/custom-processing-library-doesnt-compile-missing-com-sun-tools-javac-main/15618)

<div class="topic-metadata">

**Author:** [@Schred](https://discourse.processing.org/u/Schred)\
**Replies:** 3\
**Last updated:** [November 18, 2019, 8:50pm UTC](https://discourse.processing.org/t/custom-processing-library-doesnt-compile-missing-com-sun-tools-javac-main/15618 "2019-11-18T20:50:56Z")

</div>

I am currently following the amazing tutorial by Daniel Shiffman on how to create a library for Processing. I got everything setup and ready to compile, however, I got this error message: BUILD FAILED ProjectPath\\res…

---

## [Simple dialogue system](https://discourse.processing.org/t/simple-dialogue-system/15616)

<div class="topic-metadata">

**Author:** [@kinglucas](https://discourse.processing.org/u/kinglucas)\
**Replies:** 6\
**Last updated:** [November 18, 2019, 8:47pm UTC](https://discourse.processing.org/t/simple-dialogue-system/15616 "2019-11-18T20:47:47Z")

</div>

I wanted to have a symple dialogue system for my game but I don’t know how to make the first text appear on click and then the next piece of text if you click again. int scene = 1; void setup() { size(800, 600); } v…

---

## [Void draw() again?](https://discourse.processing.org/t/void-draw-again/15610)

<div class="topic-metadata">

**Author:** [@vanoevelenstef](https://discourse.processing.org/u/vanoevelenstef)\
**Replies:** 4\
**Last updated:** [November 18, 2019, 3:36pm UTC](https://discourse.processing.org/t/void-draw-again/15610 "2019-11-18T15:36:31Z")

</div>

Hey, I’ve created a composition in void draw and when I pressed ‘r’ I would like that void draw() goes again so that I can have some random examples before I save it. But can’t figure out how to run void draw() again. So…

---

## [QuadraticPoint?](https://discourse.processing.org/t/quadraticpoint/15604)

<div class="topic-metadata">

**Author:** [@Darkar25](https://discourse.processing.org/u/Darkar25)\
**Replies:** 5\
**Last updated:** [November 18, 2019, 2:47pm UTC](https://discourse.processing.org/t/quadraticpoint/15604 "2019-11-18T14:47:39Z")

</div>

We have beizerPoint and curvePoint…but we dont have quadraticPoint…why?..and there is any way to make this function?thx

---

## [Plotting Lissajous Figures](https://discourse.processing.org/t/plotting-lissajous-figures/15567)

<div class="topic-metadata">

**Author:** [@pandl](https://discourse.processing.org/u/pandl)\
**Replies:** 5\
**Last updated:** [November 18, 2019, 11:41am UTC](https://discourse.processing.org/t/plotting-lissajous-figures/15567 "2019-11-18T11:41:51Z")

</div>

Thank you for reading this. I’ve spent most of the day on this and although the code basically works the result is pretty rough. Can anyone suggest how I might smooth out the resulting curve? float a = 0.0; float inc =…

---

## [Interacting Objects (P3)](https://discourse.processing.org/t/interacting-objects-p3/15600)

<div class="topic-metadata">

**Author:** [@JigKSaw](https://discourse.processing.org/u/JigKSaw)\
**Replies:** 4\
**Last updated:** [November 18, 2019, 11:18am UTC](https://discourse.processing.org/t/interacting-objects-p3/15600 "2019-11-18T11:18:30Z")

</div>

Hi everyone. I am trying to build up a little game: a labyrinth in which two images move (both make the same move with the same input keyCode). I did make the labyrinth, uploaded the images and created the “joypad”. Now…

---

## [Colouring pixels](https://discourse.processing.org/t/colouring-pixels/15551)

<div class="topic-metadata">

**Author:** [@paulstgeorge](https://discourse.processing.org/u/paulstgeorge)\
**Replies:** 25\
**Last updated:** [November 18, 2019, 8:15am UTC](https://discourse.processing.org/t/colouring-pixels/15551 "2019-11-18T08:15:50Z")

</div>

I want to colour the pixels of a 255 px x 255 px square so the x axis (left to right) shows red from 0 to 255 and the y axis (top to bottom) shows green from 0 to 255. This is only the first step of an ambitious proje…

---

## [Control a shape using a game pad](https://discourse.processing.org/t/control-a-shape-using-a-game-pad/15453)

<div class="topic-metadata">

**Author:** [@DaviesSteve](https://discourse.processing.org/u/DaviesSteve)\
**Replies:** 7\
**Last updated:** [November 17, 2019, 11:17pm UTC](https://discourse.processing.org/t/control-a-shape-using-a-game-pad/15453 "2019-11-17T23:17:53Z")

</div>

Hello, I am very new to processing, and would like to try a project. Where on earth would I start to learn how to create something like this: (Credit: https://www.schultzschultz.com/free-works.html) I have a USB gam…

---

## [Processing Sound library, multiple plays, some annoying playing, noises, bad quality](https://discourse.processing.org/t/processing-sound-library-multiple-plays-some-annoying-playing-noises-bad-quality/15589)

<div class="topic-metadata">

**Author:** [@GeorgeJava](https://discourse.processing.org/u/GeorgeJava)\
**Replies:** 1\
**Last updated:** [November 17, 2019, 10:09pm UTC](https://discourse.processing.org/t/processing-sound-library-multiple-plays-some-annoying-playing-noises-bad-quality/15589 "2019-11-17T22:09:15Z")

</div>

Hello, i try to make some shooter game, and when i was clicking the mouse, the sound gets lags and some noisy, can you help me ? Try it yourself, why it is doing that ? I try to stop afrer if(!audio.isPlaying()) … end it…

---

## [Changing webcam-pixels to "nearest" color from color palette array](https://discourse.processing.org/t/changing-webcam-pixels-to-nearest-color-from-color-palette-array/14811)

<div class="topic-metadata">

**Author:** [@AndreasRef](https://discourse.processing.org/u/AndreasRef)\
**Replies:** 29\
**Last updated:** [November 17, 2019, 9:09pm UTC](https://discourse.processing.org/t/changing-webcam-pixels-to-nearest-color-from-color-palette-array/14811 "2019-11-17T21:09:56Z")

</div>

Hi Using my webcam and a predefined color palette array I want to change each pixels from the webcam into the closest matching color from the color palette array. I am having trouble finding an efficient and stable way…

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

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