# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?page=82

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

**Page:** 83

---

## [Use Mouse-funktions in classes](https://discourse.processing.org/t/use-mouse-funktions-in-classes/29673)

<div class="topic-metadata">

**Author:** [@TimeLex](https://discourse.processing.org/u/TimeLex)\
**Replies:** 7\
**Last updated:** [April 29, 2022, 5:09pm UTC](https://discourse.processing.org/t/use-mouse-funktions-in-classes/29673 "2022-04-29T17:09:11Z")

</div>

I want to write a class that is able to use Mouse-funktions like mousePressed() but the funktion is not triggered in a class: myClass c; void setup() { size(500, 500); c = new myClass(); } void draw() { c.upd…

---

## [Creating a static variable from a non-static method (like color())](https://discourse.processing.org/t/creating-a-static-variable-from-a-non-static-method-like-color/36641)

<div class="topic-metadata">

**Author:** [@GuyInFridge](https://discourse.processing.org/u/GuyInFridge)\
**Replies:** 6\
**Last updated:** [April 29, 2022, 4:02pm UTC](https://discourse.processing.org/t/creating-a-static-variable-from-a-non-static-method-like-color/36641 "2022-04-29T16:02:15Z")

</div>

I would like to create a class which has a static field “c\_DEFAULT” that stores a default color for all objects of that class. The problem is that I can’t do the following: static final color c\_DEFAULT = color(175); //…

---

## [Arduino Firmata wont register Arduino](https://discourse.processing.org/t/arduino-firmata-wont-register-arduino/31358)

<div class="topic-metadata">

**Author:** [@TitanNikola](https://discourse.processing.org/u/TitanNikola)\
**Replies:** 24\
**Last updated:** [April 29, 2022, 3:06pm UTC](https://discourse.processing.org/t/arduino-firmata-wont-register-arduino/31358 "2022-04-29T15:06:21Z")

</div>

Hello, I’m actually not very experienced with coding but my friend who wrote this is out of town and i was hoping i could find a solution soon. So the basic part of the issue is that this code has always been problemati…

---

## [Cannot find a class or type named "Box"](https://discourse.processing.org/t/cannot-find-a-class-or-type-named-box/36587)

<div class="topic-metadata">

**Author:** [@jiajia](https://discourse.processing.org/u/jiajia)\
**Replies:** 4\
**Last updated:** [April 29, 2022, 2:20pm UTC](https://discourse.processing.org/t/cannot-find-a-class-or-type-named-box/36587 "2022-04-29T14:20:49Z")

</div>

import shiffman.box2d.\*; ArrayList\<Box\>boxes; PBox2D box2d; void setup(){ size(400,300); boxes = new ArrayList\<Box\>(); box2d = new PBox2D(this); box2d.createWorld(); } void draw(){ box2d.step(); background…

---

## [Is it possible to 'offset' an object, e.g concentric circles?](https://discourse.processing.org/t/is-it-possible-to-offset-an-object-e-g-concentric-circles/36586)

<div class="topic-metadata">

**Author:** [@GoodJuJu](https://discourse.processing.org/u/GoodJuJu)\
**Replies:** 2\
**Last updated:** [April 29, 2022, 1:18pm UTC](https://discourse.processing.org/t/is-it-possible-to-offset-an-object-e-g-concentric-circles/36586 "2022-04-29T13:18:49Z")

</div>

In AutoCAD, there is a command to ‘offset’ an object. You select the object (line, circle, rectangle, arc etc.), specify either a positive or a negative value and the object will be ‘offset’ according to the entered val…

---

## [Does Processing have a system random type](https://discourse.processing.org/t/does-processing-have-a-system-random-type/36642)

<div class="topic-metadata">

**Author:** [@AntiViral\_Builder](https://discourse.processing.org/u/AntiViral_Builder)\
**Replies:** 3\
**Last updated:** [April 29, 2022, 8:15am UTC](https://discourse.processing.org/t/does-processing-have-a-system-random-type/36642 "2022-04-29T08:15:36Z")

</div>

Is there anything that is secure enough to generate encryption codes?

---

## [Processing and leapmotion](https://discourse.processing.org/t/processing-and-leapmotion/36643)

<div class="topic-metadata">

**Author:** [@Parinaz](https://discourse.processing.org/u/Parinaz)\
**Replies:** 0\
**Last updated:** [April 28, 2022, 11:30pm UTC](https://discourse.processing.org/t/processing-and-leapmotion/36643 "2022-04-28T23:30:37Z")

</div>

Dear I want to attach leap motion to my code and replace the function of mouse with the leap ,however I couldn’t.May I kindly ask you to help me This is my code without leap motion: google drive link : my problem thr…

---

## [PGraphics freezing when rendering to second PGraphics](https://discourse.processing.org/t/pgraphics-freezing-when-rendering-to-second-pgraphics/36616)

<div class="topic-metadata">

**Author:** [@lack\_ofa\_better\_name](https://discourse.processing.org/u/lack_ofa_better_name)\
**Replies:** 1\
**Last updated:** [April 26, 2022, 10:58pm UTC](https://discourse.processing.org/t/pgraphics-freezing-when-rendering-to-second-pgraphics/36616 "2022-04-26T22:58:29Z")

</div>

I have a piece of code that requires two offscreen buffers. When i draw the first buffer into the second one with image(), the first buffer “freezes”. I draw both graphics to the window in main, void draw() { updateB…

---

## [Function KeyTyped () and draw function](https://discourse.processing.org/t/function-keytyped-and-draw-function/36633)

<div class="topic-metadata">

**Author:** [@JessJess](https://discourse.processing.org/u/JessJess)\
**Replies:** 1\
**Last updated:** [April 28, 2022, 7:16pm UTC](https://discourse.processing.org/t/function-keytyped-and-draw-function/36633 "2022-04-28T19:16:17Z")

</div>

Hi, I want to create a code where when I click a key on the keyboard it will play music and draw a rectangle. I have managed to add music using the keyTyped() function but I am not sure how to add a rectangle to the canv…

---

## [Circles with polar coordinates](https://discourse.processing.org/t/circles-with-polar-coordinates/36593)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 13\
**Last updated:** [April 28, 2022, 8:51am UTC](https://discourse.processing.org/t/circles-with-polar-coordinates/36593 "2022-04-28T08:51:40Z")

</div>

Hi there! I am really interested on Katharina Brunner’s work with circles made with thousand of points. I have read that she made them using a polar coordinate system. I think that she has a package to create them with R…

---

## [Why cannot find a class or type named "Box"](https://discourse.processing.org/t/why-cannot-find-a-class-or-type-named-box/36596)

<div class="topic-metadata">

**Author:** [@jiajia](https://discourse.processing.org/u/jiajia)\
**Replies:** 1\
**Last updated:** [April 28, 2022, 4:23am UTC](https://discourse.processing.org/t/why-cannot-find-a-class-or-type-named-box/36596 "2022-04-28T04:23:59Z")

</div>

import shiffman.box2d.\*; ArrayList\<Box\>boxes; PBox2D box2d; void setup(){ size(400,300); boxes = new ArrayList\<Box\>(); box2d = new PBox2D(this); box2d.createWorld(); } void draw(){ box2d.step(); background…

---

## [Use "Ctrl+A" After Run](https://discourse.processing.org/t/use-ctrl-a-after-run/36627)

<div class="topic-metadata">

**Author:** [@king\_B99](https://discourse.processing.org/u/king_B99)\
**Replies:** 1\
**Last updated:** [April 27, 2022, 7:34pm UTC](https://discourse.processing.org/t/use-ctrl-a-after-run/36627 "2022-04-27T19:34:31Z")

</div>

How can I use Ctrl+A to highlight everything in my code String typing = “”; void setup() { textSize(16); fill(#12F9FF); size(700, 900); } void draw() { background(255, 255, 255); text(typing, 20, 20); } void k…

---

## [How to contribute a new library for Processing 4?](https://discourse.processing.org/t/how-to-contribute-a-new-library-for-processing-4/36617)

<div class="topic-metadata">

**Author:** [@GuilhermeSilveira](https://discourse.processing.org/u/GuilhermeSilveira)\
**Replies:** 3\
**Last updated:** [April 27, 2022, 3:56pm UTC](https://discourse.processing.org/t/how-to-contribute-a-new-library-for-processing-4/36617 "2022-04-27T15:56:06Z")

</div>

I have extracted a library with support for easy timed events suchs as, “invoke hello every 1 second, 10 times”. void setup() { new Timers(this).add(1000, 10, this::hello); } void hello(int k) { println("Hello " + k)…

---

## [Why is PGraphics.g2 null](https://discourse.processing.org/t/why-is-pgraphics-g2-null/36623)

<div class="topic-metadata">

**Author:** [@Rico](https://discourse.processing.org/u/Rico)\
**Replies:** 4\
**Last updated:** [April 27, 2022, 1:49pm UTC](https://discourse.processing.org/t/why-is-pgraphics-g2-null/36623 "2022-04-27T13:49:11Z")

</div>

I’m having trouble rendering PShapes into a PGraphics object. Here is the simplest version of the code that demonstrates the issue: PGraphics g; void setup() { size(850, 850); g = createGraphics(800, 800); PShape…

---

## [Processing VS OpenSCAD?](https://discourse.processing.org/t/processing-vs-openscad/36501)

<div class="topic-metadata">

**Author:** [@amundsen](https://discourse.processing.org/u/amundsen)\
**Replies:** 2\
**Last updated:** [April 27, 2022, 10:32am UTC](https://discourse.processing.org/t/processing-vs-openscad/36501 "2022-04-27T10:32:07Z")

</div>

Hello, To those who know OpenSCAD: is it as esay to use Processing to generate 3d models algorithmically and export them as .STL files? which libraries would you recommend for such purpose? Also, I really like OpenSCAD …

---

## [Parsing points from a text file](https://discourse.processing.org/t/parsing-points-from-a-text-file/36611)

<div class="topic-metadata">

**Author:** [@Aaron\_Barber272](https://discourse.processing.org/u/Aaron_Barber272)\
**Replies:** 1\
**Last updated:** [April 27, 2022, 12:54am UTC](https://discourse.processing.org/t/parsing-points-from-a-text-file/36611 "2022-04-27T00:54:22Z")

</div>

PVector\[\] globe; float x = 0; float y = 0; float z = 0; import peasy.\*; PeasyCam cam; void setup() { size(600, 600, P3D); cam = new PeasyCam(this, 500); globe = new PVector\[30\]; stroke(255); lights(); } void…

---

## [How to animate the size of the rectangles](https://discourse.processing.org/t/how-to-animate-the-size-of-the-rectangles/36602)

<div class="topic-metadata">

**Author:** [@Alllukaht](https://discourse.processing.org/u/Alllukaht)\
**Replies:** 6\
**Last updated:** [April 26, 2022, 6:56pm UTC](https://discourse.processing.org/t/how-to-animate-the-size-of-the-rectangles/36602 "2022-04-26T18:56:22Z")

</div>

\< void setup() { size(800, 620); } void draw() { background(#000000); int lw = 40; fill(#fee445); noStroke(); for (int i = 20; i \< width; i += 60) { for (int j = 20; j \< height; j += 60) { if (dist(25, 25, mou…

---

## [How to make random bubbles falling down and fill up the screen without overlapping?](https://discourse.processing.org/t/how-to-make-random-bubbles-falling-down-and-fill-up-the-screen-without-overlapping/36606)

<div class="topic-metadata">

**Author:** [@hau4302](https://discourse.processing.org/u/hau4302)\
**Replies:** 0\
**Last updated:** [April 26, 2022, 11:08am UTC](https://discourse.processing.org/t/how-to-make-random-bubbles-falling-down-and-fill-up-the-screen-without-overlapping/36606 "2022-04-26T11:08:16Z")

</div>

I can’t really figure out how to make the images display randomly in different bubbles and also how to make them not overlapping each other. Does anybody know what should I do to make these effects? PImage bubble1; PI…

---

## [How to use "DropdownList bringToFront()" in ControlP5?](https://discourse.processing.org/t/how-to-use-dropdownlist-bringtofront-in-controlp5/31934)

<div class="topic-metadata">

**Author:** [@jhsa](https://discourse.processing.org/u/jhsa)\
**Replies:** 2\
**Last updated:** [April 26, 2022, 9:59am UTC](https://discourse.processing.org/t/how-to-use-dropdownlist-bringtofront-in-controlp5/31934 "2022-04-26T09:59:16Z")

</div>

I am adding many drop down lists and when they are open, they overlap. But the one that is open stays behind the other ones. On the example code there is this line, but I cannot find out how to use it :frowning: control…

---

## [Weird background stroke of a growing circle](https://discourse.processing.org/t/weird-background-stroke-of-a-growing-circle/36588)

<div class="topic-metadata">

**Author:** [@hannymymy](https://discourse.processing.org/u/hannymymy)\
**Replies:** 5\
**Last updated:** [April 25, 2022, 9:34pm UTC](https://discourse.processing.org/t/weird-background-stroke-of-a-growing-circle/36588 "2022-04-25T21:34:55Z")

</div>

Hello everyone! I’m very new to processing and have a few questions regarding this code: It is supposed to be a growing and a shrinking circle, and it works, but the background is such a weird black pattern, that I don’…

---

## [Exporting app for Mac OS](https://discourse.processing.org/t/exporting-app-for-mac-os/36517)

<div class="topic-metadata">

**Author:** [@Slien](https://discourse.processing.org/u/Slien)\
**Replies:** 4\
**Last updated:** [April 25, 2022, 5:02pm UTC](https://discourse.processing.org/t/exporting-app-for-mac-os/36517 "2022-04-25T17:02:40Z")

</div>

Exporting the code runs fine and as expected on Windows. However, trying to do the same on Mac is an entirely different story. While the .app file does work like normal when you run it on the device that exported it in t…

---

## [Anyone Paint Program](https://discourse.processing.org/t/anyone-paint-program/36585)

<div class="topic-metadata">

**Author:** [@king\_B99](https://discourse.processing.org/u/king_B99)\
**Replies:** 0\
**Last updated:** [April 25, 2022, 1:21pm UTC](https://discourse.processing.org/t/anyone-paint-program/36585 "2022-04-25T13:21:42Z")

</div>

Does anyone have a paint.net program that I can use as a reference looking to just be able to run the code see how it works and then make a copy with my own stuff.

---

## [My code lost. Help!](https://discourse.processing.org/t/my-code-lost-help/12721)

<div class="topic-metadata">

**Author:** [@Hammad](https://discourse.processing.org/u/Hammad)\
**Replies:** 10\
**Last updated:** [April 25, 2022, 12:55pm UTC](https://discourse.processing.org/t/my-code-lost-help/12721 "2022-04-25T12:55:09Z")

</div>

while I was editing my code for my application, i saved my code but just after saving it my computer’s power went off, i restarted my computer and my application’s file was there but when i opened it with the processing …

---

## [Create visuals from sound (wav file)](https://discourse.processing.org/t/create-visuals-from-sound-wav-file/33795)

<div class="topic-metadata">

**Author:** [@Pyo](https://discourse.processing.org/u/Pyo)\
**Replies:** 10\
**Last updated:** [April 25, 2022, 10:21am UTC](https://discourse.processing.org/t/create-visuals-from-sound-wav-file/33795 "2022-04-25T10:21:52Z")

</div>

Hi, i’m new here and just using Processing a little bit. Started by “messing” with existing code. : ) Now, what i’d like to do is generate statics visuals form the data contained in sound files. For exemple amplitude and…

---

## [I'm trying to find a WordPress theme Medio V1.0](https://discourse.processing.org/t/im-trying-to-find-a-wordpress-theme-medio-v1-0/36473)

<div class="topic-metadata">

**Author:** [@windnerawil1971](https://discourse.processing.org/u/windnerawil1971)\
**Replies:** 1\
**Last updated:** [April 20, 2022, 7:50pm UTC](https://discourse.processing.org/t/im-trying-to-find-a-wordpress-theme-medio-v1-0/36473 "2022-04-20T19:50:22Z")

</div>

Any one can tell me any website where I can download Medio V1.0 null wordpress theme. Please help me, thank you

---

## [\[UDP library\] Is it okay to have more UDP client users?](https://discourse.processing.org/t/udp-library-is-it-okay-to-have-more-udp-client-users/36516)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 2\
**Last updated:** [April 24, 2022, 10:52pm UTC](https://discourse.processing.org/t/udp-library-is-it-okay-to-have-more-udp-client-users/36516 "2022-04-24T22:52:42Z")

</div>

\[UDP library\] Is it okay to have more UDP client users? hello. nice to meet you. Please refer to the picture above. Multiple clients connect to one computer. Client continues to connect. Clients are still connecte…

---

## [Can someone explain to me what are, and why we use BITWISE operations?](https://discourse.processing.org/t/can-someone-explain-to-me-what-are-and-why-we-use-bitwise-operations/36576)

<div class="topic-metadata">

**Author:** [@animanoir](https://discourse.processing.org/u/animanoir)\
**Replies:** 3\
**Last updated:** [April 24, 2022, 7:37pm UTC](https://discourse.processing.org/t/can-someone-explain-to-me-what-are-and-why-we-use-bitwise-operations/36576 "2022-04-24T19:37:21Z")

</div>

I understand that they act inside the bits of some value, but exactly what’s the theory and purpose behind them?

---

## [Bad refresh rate on Linux when not moving mouse](https://discourse.processing.org/t/bad-refresh-rate-on-linux-when-not-moving-mouse/36554)

<div class="topic-metadata">

**Author:** [@sciss](https://discourse.processing.org/u/sciss)\
**Replies:** 3\
**Last updated:** [April 24, 2022, 7:10pm UTC](https://discourse.processing.org/t/bad-refresh-rate-on-linux-when-not-moving-mouse/36554 "2022-04-24T19:10:27Z")

</div>

Hi there, having a typical Java2D issue on Linux where window is not instantly repainted unless mouse is moved. In my own Scala code I usually try to get around it by calling component.toolkit.sync(). Has nobody experie…

---

## [Equivalent (PShape?) to Java2D Area subtract](https://discourse.processing.org/t/equivalent-pshape-to-java2d-area-subtract/36559)

<div class="topic-metadata">

**Author:** [@sciss](https://discourse.processing.org/u/sciss)\
**Replies:** 3\
**Last updated:** [April 24, 2022, 9:06am UTC](https://discourse.processing.org/t/equivalent-pshape-to-java2d-area-subtract/36559 "2022-04-24T09:06:27Z")

</div>

Hi there. I’m trying to grasp the relationship between PShape and java.awt.Shape. In particular, how can I subtract one PShape from another, or intersect them. E.g. new java.awt.geom.Area(shape1).subtract(new java.awt.ge…

---

## [I can't make a single shader run in Processing](https://discourse.processing.org/t/i-cant-make-a-single-shader-run-in-processing/36462)

<div class="topic-metadata">

**Author:** [@Amirk](https://discourse.processing.org/u/Amirk)\
**Replies:** 6\
**Last updated:** [April 24, 2022, 5:19am UTC](https://discourse.processing.org/t/i-cant-make-a-single-shader-run-in-processing/36462 "2022-04-24T05:19:42Z")

</div>

Someone please help me to get a single shader working in Processing. I am not totally new to Processing, and I have created many shaders in Shadertoy. Now I would like to use shaders to make my simulations in Processing …

[Previous page](https://discourse.processing.org/c/processing/6.md?page=81)

[Next page](https://discourse.processing.org/c/processing/6.md?page=83)
