# Processing

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

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

**Page:** 265

---

## [Turning Depth Buffer into a PGraphics element](https://discourse.processing.org/t/turning-depth-buffer-into-a-pgraphics-element/14184)

<div class="topic-metadata">

**Author:** [@dehyde](https://discourse.processing.org/u/dehyde)\
**Replies:** 8\
**Last updated:** [October 25, 2019, 11:10am UTC](https://discourse.processing.org/t/turning-depth-buffer-into-a-pgraphics-element/14184 "2019-10-25T11:10:04Z")

</div>

I want to create 2d outlines for objects on 3d space, to simulate some sort of “technical illustration” or Ikea instructions style rendering, similar to what SolidWorks Composer is doing (notice how external stroke is h…

---

## [Shape from Stroke](https://discourse.processing.org/t/shape-from-stroke/14893)

<div class="topic-metadata">

**Author:** [@dehyde](https://discourse.processing.org/u/dehyde)\
**Replies:** 7\
**Last updated:** [October 25, 2019, 11:02am UTC](https://discourse.processing.org/t/shape-from-stroke/14893 "2019-10-25T11:02:44Z")

</div>

Is there a known way to take the stroke of a bezier curve or PShape and turn it into a closed path / shape? for example:

---

## [Concurrent Modification Exception question](https://discourse.processing.org/t/concurrent-modification-exception-question/14905)

<div class="topic-metadata">

**Author:** [@robbyc23](https://discourse.processing.org/u/robbyc23)\
**Replies:** 5\
**Last updated:** [October 25, 2019, 10:43am UTC](https://discourse.processing.org/t/concurrent-modification-exception-question/14905 "2019-10-25T10:43:04Z")

</div>

Hello, I’ve been figuring out the cause of my issue (adding to an array while simultaneously deleting from it), but can’t figure out how to work around it…yet. I’ve repurposed some code from Shiffman’s Nature of Code t…

---

## [Metadata-extractor](https://discourse.processing.org/t/metadata-extractor/14798)

<div class="topic-metadata">

**Author:** [@m47k0](https://discourse.processing.org/u/m47k0)\
**Replies:** 6\
**Last updated:** [October 24, 2019, 7:34pm UTC](https://discourse.processing.org/t/metadata-extractor/14798 "2019-10-24T19:34:28Z")

</div>

hi looking to read exif data & found: which led to metadata-extractor. https://drewnoakes.com/code/exif/ I appear to be able to import the jar after setting it up in the Processing library, but then it fails at…

---

## [Is there a way to tell if an element is being hovered in G4P?](https://discourse.processing.org/t/is-there-a-way-to-tell-if-an-element-is-being-hovered-in-g4p/14897)

<div class="topic-metadata">

**Author:** [@carbonne](https://discourse.processing.org/u/carbonne)\
**Replies:** 2\
**Last updated:** [October 24, 2019, 9:33am UTC](https://discourse.processing.org/t/is-there-a-way-to-tell-if-an-element-is-being-hovered-in-g4p/14897 "2019-10-24T09:33:16Z")

</div>

I’m using this amazing library for the first time and the only thing it doesn’t have is a menu. So I’m trying to build my own menu using the elements provided by the library and I’m wondering if there is a simple way th…

---

## [Webcam doesn't work on OSX Sierra 10.12.6](https://discourse.processing.org/t/webcam-doesnt-work-on-osx-sierra-10-12-6/14903)

<div class="topic-metadata">

**Author:** [@yrd214](https://discourse.processing.org/u/yrd214)\
**Replies:** 1\
**Last updated:** [October 23, 2019, 8:43pm UTC](https://discourse.processing.org/t/webcam-doesnt-work-on-osx-sierra-10-12-6/14903 "2019-10-23T20:43:51Z")

</div>

I’m trying to capture my webcam in Processing, but it doesn’t work. I’m using Processing 3.5.3 OSX Sierra 10.12.6 I used the code from the reference: import processing.video.\*; Capture cam; void setup() { size(640…

---

## [Synchronize access to array](https://discourse.processing.org/t/synchronize-access-to-array/14895)

<div class="topic-metadata">

**Author:** [@pcremades](https://discourse.processing.org/u/pcremades)\
**Replies:** 3\
**Last updated:** [October 23, 2019, 8:16pm UTC](https://discourse.processing.org/t/synchronize-access-to-array/14895 "2019-10-23T20:16:37Z")

</div>

Hi, I’m having problems with an array being updated inside SerialEvent handler. This is the case: I’m using grafica library I get some data from an Arduino through the serial port. I handle this through a SerialEvent …

---

## [Get class variables from another class](https://discourse.processing.org/t/get-class-variables-from-another-class/14866)

<div class="topic-metadata">

**Author:** [@HoboGreed](https://discourse.processing.org/u/HoboGreed)\
**Replies:** 6\
**Last updated:** [October 23, 2019, 5:23pm UTC](https://discourse.processing.org/t/get-class-variables-from-another-class/14866 "2019-10-23T17:23:41Z")

</div>

How do I get a variable from the class that created the class ? One a; void setup() { a=new One(); } void draw() {} public class One { Two b; int num; One() { num=9; println(num); b=new Two(); }…

---

## [Rotate and zoom question](https://discourse.processing.org/t/rotate-and-zoom-question/14891)

<div class="topic-metadata">

**Author:** [@companje](https://discourse.processing.org/u/companje)\
**Replies:** 3\
**Last updated:** [October 23, 2019, 4:53pm UTC](https://discourse.processing.org/t/rotate-and-zoom-question/14891 "2019-10-23T16:53:30Z")

</div>

Hi everyone, I’m trying to zoom in on a sphere. Instead of zooming in from the center I would like to zoom in such a way that the red square stays in the yellow ellipse. What would be a good way to achieve this do you …

---

## [Spawning Enemies](https://discourse.processing.org/t/spawning-enemies/14875)

<div class="topic-metadata">

**Author:** [@OrangeJuice](https://discourse.processing.org/u/OrangeJuice)\
**Replies:** 3\
**Last updated:** [October 23, 2019, 3:33pm UTC](https://discourse.processing.org/t/spawning-enemies/14875 "2019-10-23T15:33:35Z")

</div>

I’m trying to create a side scrolling shoot 'em up type game and I’m having trouble spawning the enemies, this is my code right now. if (r==1 && enemy==true) buggieY+=5; buggieX=750; buggieY=300; if (buggieY\>600 || …

---

## [Help with functions](https://discourse.processing.org/t/help-with-functions/14885)

<div class="topic-metadata">

**Author:** [@JackBarrie1341](https://discourse.processing.org/u/JackBarrie1341)\
**Replies:** 1\
**Last updated:** [October 23, 2019, 1:36am UTC](https://discourse.processing.org/t/help-with-functions/14885 "2019-10-23T01:36:00Z")

</div>

Hello, I am trying to make a function that returns the string str in all lowercase. The console is saying that String allLowercase (String str) must return a result of type string. I’m stumped and obviously a little lo…

---

## [Extending PGraphicsJava2D: Space between triangles / vertices](https://discourse.processing.org/t/extending-pgraphicsjava2d-space-between-triangles-vertices/14797)

<div class="topic-metadata">

**Author:** [@companje](https://discourse.processing.org/u/companje)\
**Replies:** 3\
**Last updated:** [October 23, 2019, 1:34am UTC](https://discourse.processing.org/t/extending-pgraphicsjava2d-space-between-triangles-vertices/14797 "2019-10-23T01:34:15Z")

</div>

Hello, When extending PGraphicsJava2D (as described by @GoToLoop on the old forum https://forum.processing.org/two/discussion/16314/pshape-inside-a-class-or-extend-pshape#Item\_4 from) and drawing a TRIANGLE\_STRIP I ge…

---

## [List of global properties of processing](https://discourse.processing.org/t/list-of-global-properties-of-processing/14879)

<div class="topic-metadata">

**Author:** [@Jean-Michel](https://discourse.processing.org/u/Jean-Michel)\
**Replies:** 2\
**Last updated:** [October 22, 2019, 7:56pm UTC](https://discourse.processing.org/t/list-of-global-properties-of-processing/14879 "2019-10-22T19:56:03Z")

</div>

Hi all, Is there a list all global properties served by processing, width, heigth, mouseX, mouseY, key, keyCode … Thanks, Yours

---

## [Beginner Color Help](https://discourse.processing.org/t/beginner-color-help/14873)

<div class="topic-metadata">

**Author:** [@FilDomInteractive](https://discourse.processing.org/u/FilDomInteractive)\
**Replies:** 2\
**Last updated:** [October 22, 2019, 3:14pm UTC](https://discourse.processing.org/t/beginner-color-help/14873 "2019-10-22T15:14:18Z")

</div>

How do I make something happen when like a line is on a specific colour?

---

## [Unwanted Color Changes](https://discourse.processing.org/t/unwanted-color-changes/14855)

<div class="topic-metadata">

**Author:** [@Ozhan](https://discourse.processing.org/u/Ozhan)\
**Replies:** 1\
**Last updated:** [October 22, 2019, 4:13am UTC](https://discourse.processing.org/t/unwanted-color-changes/14855 "2019-10-22T04:13:50Z")

</div>

Hi All. I wrote the following codes to follow my mouse when I pressed the left button with red and when I pressed the right button with green colors but color of all the shapes changes when I changed the mouse buttons. …

---

## [Create filename from variables](https://discourse.processing.org/t/create-filename-from-variables/14861)

<div class="topic-metadata">

**Author:** [@paulstgeorge](https://discourse.processing.org/u/paulstgeorge)\
**Replies:** 4\
**Last updated:** [October 21, 2019, 8:57pm UTC](https://discourse.processing.org/t/create-filename-from-variables/14861 "2019-10-21T20:57:38Z")

</div>

I want to save an image from the display window using save(). For example: save(“filename.tif”); I want, though, to create the filename using the values of some variables in my sketch. so int var1 = 290; float var2…

---

## [keyPressed Help](https://discourse.processing.org/t/keypressed-help/14807)

<div class="topic-metadata">

**Author:** [@TandemMISMI](https://discourse.processing.org/u/TandemMISMI)\
**Replies:** 9\
**Last updated:** [October 21, 2019, 8:54pm UTC](https://discourse.processing.org/t/keypressed-help/14807 "2019-10-21T20:54:46Z")

</div>

Hello all , I just begin with processing few days ago and I need help about the function keyPressed I want to change the position of my man’s arms when I press a key but when I press the key I have the position before a…

---

## [Waiting for mousePressed() in draw](https://discourse.processing.org/t/waiting-for-mousepressed-in-draw/14795)

<div class="topic-metadata">

**Author:** [@stefan\_98](https://discourse.processing.org/u/stefan_98)\
**Replies:** 8\
**Last updated:** [October 21, 2019, 5:39pm UTC](https://discourse.processing.org/t/waiting-for-mousepressed-in-draw/14795 "2019-10-21T17:39:49Z")

</div>

Hello, I’m very new to programming with Processing, and I just wanted to know, how I can force the program in draw() to wait for the mousePressed() function. Nice greetings

---

## [I can\`t load an Image as background](https://discourse.processing.org/t/i-can-t-load-an-image-as-background/14849)

<div class="topic-metadata">

**Author:** [@CyberDodo](https://discourse.processing.org/u/CyberDodo)\
**Replies:** 4\
**Last updated:** [October 21, 2019, 9:54am UTC](https://discourse.processing.org/t/i-can-t-load-an-image-as-background/14849 "2019-10-21T09:54:32Z")

</div>

I can\`t load an Image as background. Exception in thread “Thread-212” void setup() { size( 1366, 768); PImage bg; bg = loadImage("qrC6FvL.jpg"); } void draw() { background(bg); fill(0, 255, 0); rect (300, …

---

## [Wrap the text and Change the specific word colour in a text file](https://discourse.processing.org/t/wrap-the-text-and-change-the-specific-word-colour-in-a-text-file/14814)

<div class="topic-metadata">

**Author:** [@do11134](https://discourse.processing.org/u/do11134)\
**Replies:** 2\
**Last updated:** [October 21, 2019, 3:53am UTC](https://discourse.processing.org/t/wrap-the-text-and-change-the-specific-word-colour-in-a-text-file/14814 "2019-10-21T03:53:04Z")

</div>

the first thing I want to do is wrap the text and the second thing is to make the color change of specific words, but I found it is hard to do. Please somebody can help me!!! void setup() { size(600, 600); background(…

---

## [Text that is not affected by rotations](https://discourse.processing.org/t/text-that-is-not-affected-by-rotations/14800)

<div class="topic-metadata">

**Author:** [@biran4454](https://discourse.processing.org/u/biran4454)\
**Replies:** 4\
**Last updated:** [October 21, 2019, 3:43am UTC](https://discourse.processing.org/t/text-that-is-not-affected-by-rotations/14800 "2019-10-21T03:43:40Z")

</div>

I am writing a piece of code that draws 3D objects onto the canvas using P3D render. I have coded it such that one can rotate the camera and pan and zoom, etc. I want to write some info text onto the screen, but when I…

---

## [My infinity watch project](https://discourse.processing.org/t/my-infinity-watch-project/14743)

<div class="topic-metadata">

**Author:** [@andi](https://discourse.processing.org/u/andi)\
**Replies:** 1\
**Last updated:** [October 18, 2019, 2:21pm UTC](https://discourse.processing.org/t/my-infinity-watch-project/14743 "2019-10-18T14:21:50Z")

</div>

Hi guys, I want to create a watch wich runs on an infinity symbol (24 h one whole turn). Therefore I created some code with a friend. (you can see below) main: float amp = 0.0; float amp\_offset = 150.0; float amp\_stre…

---

## [Limiting draw() to run a limited amount of times!](https://discourse.processing.org/t/limiting-draw-to-run-a-limited-amount-of-times/14809)

<div class="topic-metadata">

**Author:** [@tsunii](https://discourse.processing.org/u/tsunii)\
**Replies:** 20\
**Last updated:** [October 20, 2019, 9:14pm UTC](https://discourse.processing.org/t/limiting-draw-to-run-a-limited-amount-of-times/14809 "2019-10-20T21:14:53Z")

</div>

Hello, i’m trying to make a application that works like this: We have a certain amount on “Main Circles” the black one, and “Secondary Circles” the white ones, what i want is to have a fixed number of Main Circles and a …

---

## [Painting with pixels using PVector](https://discourse.processing.org/t/painting-with-pixels-using-pvector/14829)

<div class="topic-metadata">

**Author:** [@JoseBri93](https://discourse.processing.org/u/JoseBri93)\
**Replies:** 5\
**Last updated:** [October 20, 2019, 8:38pm UTC](https://discourse.processing.org/t/painting-with-pixels-using-pvector/14829 "2019-10-20T20:38:20Z")

</div>

Hi people, I want ths image to be drawn by the forms i created. So they all will start at one point and then expand to all directions. The PVector function gives me the curvature i like them to have while i’m hoping the …

---

## [Kinect getting raw data and value](https://discourse.processing.org/t/kinect-getting-raw-data-and-value/14737)

<div class="topic-metadata">

**Author:** [@luonglinhle](https://discourse.processing.org/u/luonglinhle)\
**Replies:** 2\
**Last updated:** [October 20, 2019, 6:52pm UTC](https://discourse.processing.org/t/kinect-getting-raw-data-and-value/14737 "2019-10-20T18:52:45Z")

</div>

Hello! I am a newbie. I was wondering if anyone know how to get raw values that measure distance in Kinect V1 and V2? I am also working via MacBook so I wonder if it makes much different in processing program. My purpo…

---

## [Changing the PImage colour if images overlap](https://discourse.processing.org/t/changing-the-pimage-colour-if-images-overlap/14817)

<div class="topic-metadata">

**Author:** [@DatSoi](https://discourse.processing.org/u/DatSoi)\
**Replies:** 0\
**Last updated:** [October 20, 2019, 8:39am UTC](https://discourse.processing.org/t/changing-the-pimage-colour-if-images-overlap/14817 "2019-10-20T08:39:26Z")

</div>

How do i change the tint() of an PImage if the detected face is next to the PImage. import gab.opencv.\*; import processing.video.\*; import java.awt.\*; PImage img; PImage background; PImage imgCoral; color colCoral; …

---

## [Firework: Circle with cosine & sine but in 3D....?](https://discourse.processing.org/t/firework-circle-with-cosine-sine-but-in-3d/14670)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 5\
**Last updated:** [October 20, 2019, 12:23pm UTC](https://discourse.processing.org/t/firework-circle-with-cosine-sine-but-in-3d/14670 "2019-10-20T12:23:52Z")

</div>

Hello all, I made a fire work in 2D (its movement is 2D anyway) with a simple formula using cos and sin. void move() { // Spark move // move x = centerX+cos(angle)\*radius; y = centerY+sin(angle)\*r…

---

## [Decimal point or comma](https://discourse.processing.org/t/decimal-point-or-comma/14819)

<div class="topic-metadata">

**Author:** [@micha](https://discourse.processing.org/u/micha)\
**Replies:** 2\
**Last updated:** [October 20, 2019, 11:25am UTC](https://discourse.processing.org/t/decimal-point-or-comma/14819 "2019-10-20T11:25:46Z")

</div>

I am working with Processing 3.5.3 on a Mac with german system osx 10.11.6 When I say float number = 0.2; println(nf(number, 1, 2)); it prints 0,20 with decimal comma (common in everyday german life) Is there a wa…

---

## [Changing colour depending on location](https://discourse.processing.org/t/changing-colour-depending-on-location/14799)

<div class="topic-metadata">

**Author:** [@DatSoi](https://discourse.processing.org/u/DatSoi)\
**Replies:** 10\
**Last updated:** [October 20, 2019, 7:11am UTC](https://discourse.processing.org/t/changing-colour-depending-on-location/14799 "2019-10-20T07:11:25Z")

</div>

Hi there, im a huge beginner to processing, but i was wondering how you could go about changin the colour of an image depending on the location of an object, (a users face location which is being located by OpenCV). Tha…

---

## [Changing a child classes characteristics](https://discourse.processing.org/t/changing-a-child-classes-characteristics/14731)

<div class="topic-metadata">

**Author:** [@SLINKYMAN](https://discourse.processing.org/u/SLINKYMAN)\
**Replies:** 3\
**Last updated:** [October 19, 2019, 5:04pm UTC](https://discourse.processing.org/t/changing-a-child-classes-characteristics/14731 "2019-10-19T17:04:08Z")

</div>

I need to use inheritance for a project of mine. Currently, I Have been looking at this example code to create a person. class Human implements Drawable{ int armAngle = 0; int angleChange = 5; final int ANGLE\_L…

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

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