# Processing

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

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

**Page:** 154

---

## [Game of life not working](https://discourse.processing.org/t/game-of-life-not-working/27012)

<div class="topic-metadata">

**Author:** [@FrigittyFrog](https://discourse.processing.org/u/FrigittyFrog)\
**Replies:** 6\
**Last updated:** [January 27, 2021, 4:03pm UTC](https://discourse.processing.org/t/game-of-life-not-working/27012 "2021-01-27T16:03:25Z")

</div>

Can anyone tell me why my code is not working? There isn’t a syntax error, but everytime I run the code, the screen immeadiatelly turns white. I’m trying to create the game of life \[https://en.wikipedia.org/wiki/Conway’s…

---

## [Urgent Code help (Draw Program)](https://discourse.processing.org/t/urgent-code-help-draw-program/27280)

<div class="topic-metadata">

**Author:** [@Prxt.3k](https://discourse.processing.org/u/Prxt.3k)\
**Replies:** 31\
**Last updated:** [January 27, 2021, 6:11am UTC](https://discourse.processing.org/t/urgent-code-help-draw-program/27280 "2021-01-27T06:11:36Z")

</div>

I need to change the location of the buttons from the side to at the top and beside each other. Also, I have the class for the fill button and Spray Paint. I need help determining which code I need so I can make it that…

---

## [How to create new map shapes for default PShapes Sphere box etc](https://discourse.processing.org/t/how-to-create-new-map-shapes-for-default-pshapes-sphere-box-etc/27386)

<div class="topic-metadata">

**Author:** [@kp443](https://discourse.processing.org/u/kp443)\
**Replies:** 1\
**Last updated:** [January 27, 2021, 2:11pm UTC](https://discourse.processing.org/t/how-to-create-new-map-shapes-for-default-pshapes-sphere-box-etc/27386 "2021-01-27T14:11:18Z")

</div>

Tryna create planar mapping xy for a sphere. How to change the default mapping? Some tutorial link?

---

## [Issues with Delaunay triangulation (Bowyer-Watson)](https://discourse.processing.org/t/issues-with-delaunay-triangulation-bowyer-watson/27255)

<div class="topic-metadata">

**Author:** [@Althos](https://discourse.processing.org/u/Althos)\
**Replies:** 3\
**Last updated:** [January 27, 2021, 1:56pm UTC](https://discourse.processing.org/t/issues-with-delaunay-triangulation-bowyer-watson/27255 "2021-01-27T13:56:17Z")

</div>

Hi, as the name says, I’m currently trying to code a simple Delaunay triangulation, using the Bowyer-Watson algorithm, I found great tutorials to help me along the way and my code is nearly working fine, except for one i…

---

## [Object &Pixel Collision detection](https://discourse.processing.org/t/object-pixel-collision-detection/27384)

<div class="topic-metadata">

**Author:** [@cicekselen](https://discourse.processing.org/u/cicekselen)\
**Replies:** 2\
**Last updated:** [January 27, 2021, 1:43pm UTC](https://discourse.processing.org/t/object-pixel-collision-detection/27384 "2021-01-27T13:43:01Z")

</div>

Hey, I am a real newbie in coding in processing and I need help for my hw. I am trying to develop an agent-based simulation in which, the agents move in a closed space with obstacles. For the obstacles I am trying to use…

---

## [Size() ignored and window goes full screen](https://discourse.processing.org/t/size-ignored-and-window-goes-full-screen/13932)

<div class="topic-metadata">

**Author:** [@thunderball](https://discourse.processing.org/u/thunderball)\
**Replies:** 9\
**Last updated:** [January 27, 2021, 9:07am UTC](https://discourse.processing.org/t/size-ignored-and-window-goes-full-screen/13932 "2021-01-27T09:07:10Z")

</div>

Hi, I just installed P3 on my desktop, which has two monitors, when running a sketch, my own or an example, the sketch is displayed larger than full screen, I can’t even view the content. Processing 2 works fine. Why i…

---

## [Exported application copyright](https://discourse.processing.org/t/exported-application-copyright/27391)

<div class="topic-metadata">

**Author:** [@what42](https://discourse.processing.org/u/what42)\
**Replies:** 0\
**Last updated:** [January 26, 2021, 7:57pm UTC](https://discourse.processing.org/t/exported-application-copyright/27391 "2021-01-26T19:57:41Z")

</div>

I was looking through some files in an exported application I made and I found a copyright file in application.windows16/java. It says I’m not allowed to distribute it, but the whole reason I’m making it is so I can give…

---

## [How to split image into several ones (spirtes)](https://discourse.processing.org/t/how-to-split-image-into-several-ones-spirtes/27365)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 1\
**Last updated:** [January 25, 2021, 6:03pm UTC](https://discourse.processing.org/t/how-to-split-image-into-several-ones-spirtes/27365 "2021-01-25T18:03:12Z")

</div>

Hi! I am trying to make the basics for chess and I am interested how to turn an image into an array of sprites. CodePImage source = loadImage("chessPieces2.png"); println(source.width, source.height); size(12…

---

## [Stroke Decrease isnt working](https://discourse.processing.org/t/stroke-decrease-isnt-working/27349)

<div class="topic-metadata">

**Author:** [@Prxt.3k](https://discourse.processing.org/u/Prxt.3k)\
**Replies:** 6\
**Last updated:** [January 25, 2021, 4:51pm UTC](https://discourse.processing.org/t/stroke-decrease-isnt-working/27349 "2021-01-25T16:51:38Z")

</div>

//Minim Library import ddf.minim.\*; import ddf.minim.analysis.\*; import ddf.minim.effects.\*; import ddf.minim.signals.\*; import ddf.minim.spi.\*; import ddf.minim.ugens.\*; //Global Variables \<--------------------------…

---

## [How to parse this string?](https://discourse.processing.org/t/how-to-parse-this-string/27362)

<div class="topic-metadata">

**Author:** [@SNICKRS](https://discourse.processing.org/u/SNICKRS)\
**Replies:** 3\
**Last updated:** [January 25, 2021, 2:53pm UTC](https://discourse.processing.org/t/how-to-parse-this-string/27362 "2021-01-25T14:53:36Z")

</div>

I have this string: "0000A000" How would I be able to group the zeros to get a string like this: 4A3

---

## [How would you import an external library into processing?](https://discourse.processing.org/t/how-would-you-import-an-external-library-into-processing/27337)

<div class="topic-metadata">

**Author:** [@SNICKRS](https://discourse.processing.org/u/SNICKRS)\
**Replies:** 1\
**Last updated:** [January 25, 2021, 2:29pm UTC](https://discourse.processing.org/t/how-would-you-import-an-external-library-into-processing/27337 "2021-01-25T14:29:52Z")

</div>

I have this game in which I want to use an AI engine for the opponent, but it requires I use an external file as making an AI for this game is VERY complicated. However, I found a great java library that has everything I…

---

## [Effect not applying on a image in array](https://discourse.processing.org/t/effect-not-applying-on-a-image-in-array/27200)

<div class="topic-metadata">

**Author:** [@anarts\_3](https://discourse.processing.org/u/anarts_3)\
**Replies:** 2\
**Last updated:** [January 25, 2021, 9:56am UTC](https://discourse.processing.org/t/effect-not-applying-on-a-image-in-array/27200 "2021-01-25T09:56:33Z")

</div>

Hello everyone! I have this code that has a dot effect on the images and has code to change said image into the next one when the mouse is pressed. int numFrames = 18; // The number of frames in the animation int frame…

---

## [How to fix the positions of lines (Math related)](https://discourse.processing.org/t/how-to-fix-the-positions-of-lines-math-related/27344)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 1\
**Last updated:** [January 24, 2021, 9:45pm UTC](https://discourse.processing.org/t/how-to-fix-the-positions-of-lines-math-related/27344 "2021-01-24T21:45:35Z")

</div>

(I am trying to do this with a n-sided shape) but it is not working. The program works by having a position of the corner and giving a dir and r. How do I get the correct position? The current program only works for…

---

## [How to check if there is an image with the same file name?](https://discourse.processing.org/t/how-to-check-if-there-is-an-image-with-the-same-file-name/27336)

<div class="topic-metadata">

**Author:** [@Lukerfull](https://discourse.processing.org/u/Lukerfull)\
**Replies:** 6\
**Last updated:** [January 24, 2021, 8:44pm UTC](https://discourse.processing.org/t/how-to-check-if-there-is-an-image-with-the-same-file-name/27336 "2021-01-24T20:44:12Z")

</div>

I want to save images without overwriting them. This is my code: if (controlDown) { if (keyCode == 83) { PImage partialSave = get(0,0,1098,650); nimg++; partialSave.save("drawings/draw"+nimg+".…

---

## [Open close windows](https://discourse.processing.org/t/open-close-windows/27312)

<div class="topic-metadata">

**Author:** [@jafal](https://discourse.processing.org/u/jafal)\
**Replies:** 3\
**Last updated:** [January 24, 2021, 6:51pm UTC](https://discourse.processing.org/t/open-close-windows/27312 "2021-01-24T18:51:44Z")

</div>

hi is there away to call one window from other window ? void setup() { String\[\] args = {"TwoFrameTest"}; SecondApplet sa = new SecondApplet(); PApplet.runSketch(args, sa); } void settings() { size(300, 100);…

---

## [For structure not generating shapes](https://discourse.processing.org/t/for-structure-not-generating-shapes/27153)

<div class="topic-metadata">

**Author:** [@Townhaus](https://discourse.processing.org/u/Townhaus)\
**Replies:** 3\
**Last updated:** [January 24, 2021, 9:32am UTC](https://discourse.processing.org/t/for-structure-not-generating-shapes/27153 "2021-01-24T09:32:28Z")

</div>

/\* the first for structure generates rectangles but I’m not sure why the second for structure doesn’t generate rectangles \*/ size (500, 600); background (115, 10, 125); int x = 0; noStroke (); for (int i = 250; i \<=…

---

## [Bonjour je suis debutant au.processing](https://discourse.processing.org/t/bonjour-je-suis-debutant-au-processing/27315)

<div class="topic-metadata">

**Author:** [@Douhane](https://discourse.processing.org/u/Douhane)\
**Replies:** 3\
**Last updated:** [January 23, 2021, 9:41pm UTC](https://discourse.processing.org/t/bonjour-je-suis-debutant-au-processing/27315 "2021-01-23T21:41:53Z")

</div>

bonjour je suis nouveau et debutant a processing alors g reussi a allumer 3 led de mon arduino… via processing c mon premier programe la je veux utilisé le bleutooth de mon pc sur processing pour les allumer via bleu…

---

## [Find the second occurrence of an object in an array](https://discourse.processing.org/t/find-the-second-occurrence-of-an-object-in-an-array/27309)

<div class="topic-metadata">

**Author:** [@SNICKRS](https://discourse.processing.org/u/SNICKRS)\
**Replies:** 2\
**Last updated:** [January 23, 2021, 8:05pm UTC](https://discourse.processing.org/t/find-the-second-occurrence-of-an-object-in-an-array/27309 "2021-01-23T20:05:43Z")

</div>

Hello, I am doing a coding project but it requires me to get the second occurrence of an object in an array. int\[\]\[\] array = {1, 2, 3, 4}, {5, 6, 7, 8}, {1, 2, 3, 4}; How would you get the second occurrence of “1” in …

---

## [Brushstroke for Drawing Program](https://discourse.processing.org/t/brushstroke-for-drawing-program/27300)

<div class="topic-metadata">

**Author:** [@Prxt.3k](https://discourse.processing.org/u/Prxt.3k)\
**Replies:** 3\
**Last updated:** [January 23, 2021, 6:39pm UTC](https://discourse.processing.org/t/brushstroke-for-drawing-program/27300 "2021-01-23T18:39:04Z")

</div>

Anyone know whats the code for a Crayon and Paintbrush-like stroke? Thanks,

---

## [GPanel object position using G4P](https://discourse.processing.org/t/gpanel-object-position-using-g4p/27311)

<div class="topic-metadata">

**Author:** [@R2processing](https://discourse.processing.org/u/R2processing)\
**Replies:** 2\
**Last updated:** [January 23, 2021, 5:49pm UTC](https://discourse.processing.org/t/gpanel-object-position-using-g4p/27311 "2021-01-23T17:49:36Z")

</div>

Hello, I’m using the useful G4P library. using lblTest.setText(“XXX”); I’m able to change the text of a GLAbel object. I’d like to change the location of a GLabel object inside a Panel with G4P. I didn’t succeed on t…

---

## [15 coins game - pls help im stuck](https://discourse.processing.org/t/15-coins-game-pls-help-im-stuck/27268)

<div class="topic-metadata">

**Author:** [@Grave](https://discourse.processing.org/u/Grave)\
**Replies:** 2\
**Last updated:** [January 23, 2021, 6:56am UTC](https://discourse.processing.org/t/15-coins-game-pls-help-im-stuck/27268 "2021-01-23T06:56:47Z")

</div>

How can I make the class Candy disappear when Eyeball touch it? String gameState; PImage sc; // SCARLET FOREST void setup() { size(810, 810); eyeballSetup(); for(int i=0;i\<candies.length;i++){ candies\[i\] = new Can…

---

## [Undo and Redo Button](https://discourse.processing.org/t/undo-and-redo-button/27301)

<div class="topic-metadata">

**Author:** [@Prxt.3k](https://discourse.processing.org/u/Prxt.3k)\
**Replies:** 4\
**Last updated:** [January 23, 2021, 5:59am UTC](https://discourse.processing.org/t/undo-and-redo-button/27301 "2021-01-23T05:59:57Z")

</div>

// Press CTRL+Z to undo, CTRL+SHIFT+Z to redo // We need these to know if CTRL/SHIFT are pressed boolean controlDown = false; boolean shiftDown = false; Undo undo; void setup() { size(500, 500); background(255); …

---

## [Adding a Start Screen to my drawing program](https://discourse.processing.org/t/adding-a-start-screen-to-my-drawing-program/27290)

<div class="topic-metadata">

**Author:** [@Prxt.3k](https://discourse.processing.org/u/Prxt.3k)\
**Replies:** 5\
**Last updated:** [January 23, 2021, 5:18am UTC](https://discourse.processing.org/t/adding-a-start-screen-to-my-drawing-program/27290 "2021-01-23T05:18:14Z")

</div>

Can someone let me know how it’s possible to add this to my code, for example, I want to add a start game button in this code and this screen should pop up every time I start a canvas and to enter the program I would nee…

---

## [Length in milliseconds of .wav from Sampler class](https://discourse.processing.org/t/length-in-milliseconds-of-wav-from-sampler-class/27299)

<div class="topic-metadata">

**Author:** [@dangerousclive](https://discourse.processing.org/u/dangerousclive)\
**Replies:** 0\
**Last updated:** [January 23, 2021, 12:31am UTC](https://discourse.processing.org/t/length-in-milliseconds-of-wav-from-sampler-class/27299 "2021-01-23T00:31:08Z")

</div>

Hi, I’m having a bit of a problem trying to get the length of time in milliseconds of a .wav loaded into the Sampler class in Minim. I’m probably over looking something but can it be found by something as simple as .le…

---

## [Different function to every ellipse](https://discourse.processing.org/t/different-function-to-every-ellipse/27289)

<div class="topic-metadata">

**Author:** [@Karrajo](https://discourse.processing.org/u/Karrajo)\
**Replies:** 3\
**Last updated:** [January 22, 2021, 10:04pm UTC](https://discourse.processing.org/t/different-function-to-every-ellipse/27289 "2021-01-22T22:04:04Z")

</div>

Hi, I’m doing this thing, trying to make every ellipse appear and disappear with the same function but in a different time, like if every ellipse is in a different moment of the sine function. I can write the function a…

---

## [How to pull an image from a website](https://discourse.processing.org/t/how-to-pull-an-image-from-a-website/27285)

<div class="topic-metadata">

**Author:** [@skypickle](https://discourse.processing.org/u/skypickle)\
**Replies:** 3\
**Last updated:** [January 22, 2021, 5:25pm UTC](https://discourse.processing.org/t/how-to-pull-an-image-from-a-website/27285 "2021-01-22T17:25:15Z")

</div>

I want to use an image from a website as the basis for an interactive artwork. For example, this page “https://www.google.de/images/branding/googlelogo/2x/googlelogo\_color\_272x92dp.png” is a google logo. This script j…

---

## [Where do these methods... live?](https://discourse.processing.org/t/where-do-these-methods-live/27286)

<div class="topic-metadata">

**Author:** [@yoHill](https://discourse.processing.org/u/yoHill)\
**Replies:** 2\
**Last updated:** [January 22, 2021, 2:31pm UTC](https://discourse.processing.org/t/where-do-these-methods-live/27286 "2021-01-22T14:31:09Z")

</div>

Hi, I have a question that may be really stupid but I just can’t quite wrap my head around what’s happening here. When using methods like void draw() or void mousePressed()… are these part of an interface somewhere? I …

---

## [How can I web scrape to get images from different websites using processing?](https://discourse.processing.org/t/how-can-i-web-scrape-to-get-images-from-different-websites-using-processing/22052)

<div class="topic-metadata">

**Author:** [@usr-pyth](https://discourse.processing.org/u/usr-pyth)\
**Replies:** 2\
**Last updated:** [January 22, 2021, 12:19am UTC](https://discourse.processing.org/t/how-can-i-web-scrape-to-get-images-from-different-websites-using-processing/22052 "2021-01-22T00:19:52Z")

</div>

Hi! I’m trying to get images from reddit and load them into my processing sketch. How do I do this?

---

## [PG Graphics not working - bet you can't work this out!](https://discourse.processing.org/t/pg-graphics-not-working-bet-you-cant-work-this-out/27250)

<div class="topic-metadata">

**Author:** [@IRIGIMA](https://discourse.processing.org/u/IRIGIMA)\
**Replies:** 9\
**Last updated:** [January 21, 2021, 6:32pm UTC](https://discourse.processing.org/t/pg-graphics-not-working-bet-you-cant-work-this-out/27250 "2021-01-21T18:32:37Z")

</div>

I want to create pg graphics size x,y in black. In middle I want a non black point. Randomly searching through all pg graphics, I want to find this point in a routine iterating over and over. Once found - return that …

---

## [Issues with a simple pathfinder](https://discourse.processing.org/t/issues-with-a-simple-pathfinder/27265)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 0\
**Last updated:** [January 21, 2021, 1:53pm UTC](https://discourse.processing.org/t/issues-with-a-simple-pathfinder/27265 "2021-01-21T13:53:57Z")

</div>

Hi! I decided to remake a simple pathfinder algorithm (every “found” slot tries to find slots adjacent to itself that have not been found and are not “blocked” (it is meant to be used as a wall) The issue is the path ge…

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

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