# Processing

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

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

**Page:** 264

---

## [Create random circles in a grid](https://discourse.processing.org/t/create-random-circles-in-a-grid/14976)

<div class="topic-metadata">

**Author:** [@Fantassy](https://discourse.processing.org/u/Fantassy)\
**Replies:** 15\
**Last updated:** [October 30, 2019, 3:25pm UTC](https://discourse.processing.org/t/create-random-circles-in-a-grid/14976 "2019-10-30T15:25:37Z")

</div>

Hello, I’m fairly new to this and for a game I’m trying to create red circles randomly in a grid with the amount that is given in the variable. For example I have made a grid with this: void setup() { size (1200, 80…

---

## [Generate random numbers in array and sort without predefined sort function](https://discourse.processing.org/t/generate-random-numbers-in-array-and-sort-without-predefined-sort-function/15055)

<div class="topic-metadata">

**Author:** [@NewbCoder](https://discourse.processing.org/u/NewbCoder)\
**Replies:** 4\
**Last updated:** [October 30, 2019, 6:56pm UTC](https://discourse.processing.org/t/generate-random-numbers-in-array-and-sort-without-predefined-sort-function/15055 "2019-10-30T18:56:51Z")

</div>

Help! I’m trying to generate random numbers in two arrays and then merge them without the predefined function. Any suggestions would be great. Having issues converting between int \[\] and int…This is what i have so far: v…

---

## [Water simulation updating asymetrically](https://discourse.processing.org/t/water-simulation-updating-asymetrically/10885)

<div class="topic-metadata">

**Author:** [@halsfasda](https://discourse.processing.org/u/halsfasda)\
**Replies:** 3\
**Last updated:** [October 30, 2019, 6:22pm UTC](https://discourse.processing.org/t/water-simulation-updating-asymetrically/10885 "2019-10-30T18:22:23Z")

</div>

Hey So I have been working on simulation of water in 2 dimensions. It is comprised of nodes that are attached by “springs” to their neighbors and to the “water level”. it works fine, but it behaves differently on either…

---

## [keyPressed and keyReleased with java(eclipse)](https://discourse.processing.org/t/keypressed-and-keyreleased-with-java-eclipse/12994)

<div class="topic-metadata">

**Author:** [@vincentstrebelle](https://discourse.processing.org/u/vincentstrebelle)\
**Replies:** 21\
**Last updated:** [October 30, 2019, 3:45pm UTC](https://discourse.processing.org/t/keypressed-and-keyreleased-with-java-eclipse/12994 "2019-10-30T15:45:41Z")

</div>

Hi i found the code “Player Move” from @GoToLoop and i have several questions. i put some of my question in the code: static final int DIAM = 48, SPD = 4, FPS = 60; static final color BG = 0350; Player p; void setu…

---

## [Battleships game in processing](https://discourse.processing.org/t/battleships-game-in-processing/15050)

<div class="topic-metadata">

**Author:** [@aDavid903](https://discourse.processing.org/u/aDavid903)\
**Replies:** 1\
**Last updated:** [October 30, 2019, 3:35pm UTC](https://discourse.processing.org/t/battleships-game-in-processing/15050 "2019-10-30T15:35:45Z")

</div>

So I’m pretty new to Processing 3, and I need to make a game of battleships for an assignment. I have come to the part where I need to make a grid and be able to check which grid is being clicked. This is where I have a …

---

## [Key events (how to stop keyPressed() repeating)](https://discourse.processing.org/t/key-events-how-to-stop-keypressed-repeating/15042)

<div class="topic-metadata">

**Author:** [@paulstgeorge](https://discourse.processing.org/u/paulstgeorge)\
**Replies:** 3\
**Last updated:** [October 30, 2019, 2:54pm UTC](https://discourse.processing.org/t/key-events-how-to-stop-keypressed-repeating/15042 "2019-10-30T14:54:07Z")

</div>

Help please. In the following code I want to change the value of varH and so the color of the letter H once and only once. So, when the H or h key is pressed the value of varH should increase by 1. If the key is kept pre…

---

## [Get array of vertex's from loaded 3D Model?](https://discourse.processing.org/t/get-array-of-vertexs-from-loaded-3d-model/15029)

<div class="topic-metadata">

**Author:** [@KeirMeDear](https://discourse.processing.org/u/KeirMeDear)\
**Replies:** 2\
**Last updated:** [October 30, 2019, 2:33am UTC](https://discourse.processing.org/t/get-array-of-vertexs-from-loaded-3d-model/15029 "2019-10-30T02:33:34Z")

</div>

So, I was wondering if there is a function or a library which allows you to access an array of vertex’s from a loaded object. For instance if you used the LoadShape() function to import a .obj file of a cube, you could …

---

## [Rotation in relations to another object](https://discourse.processing.org/t/rotation-in-relations-to-another-object/14990)

<div class="topic-metadata">

**Author:** [@volous](https://discourse.processing.org/u/volous)\
**Replies:** 2\
**Last updated:** [October 30, 2019, 2:00am UTC](https://discourse.processing.org/t/rotation-in-relations-to-another-object/14990 "2019-10-30T02:00:51Z")

</div>

Hi, so i’m trying to rotate another shape in relations to another shape. but im not able to do so, how should i go about it(object/class based)?.

---

## [Typographic Mirror!](https://discourse.processing.org/t/typographic-mirror/15034)

<div class="topic-metadata">

**Author:** [@madiMcD](https://discourse.processing.org/u/madiMcD)\
**Replies:** 2\
**Last updated:** [October 30, 2019, 1:34am UTC](https://discourse.processing.org/t/typographic-mirror/15034 "2019-10-30T01:34:41Z")

</div>

Hi all!! I am a graphic designer using Processing for creative coding art projects, and right now I am part of an exhibition on typography. I am trying to create a mirror out of type. BOOM, cool right I am taking insp…

---

## [Making of: Tetris](https://discourse.processing.org/t/making-of-tetris/15024)

<div class="topic-metadata">

**Author:** [@ImDaGr3en](https://discourse.processing.org/u/ImDaGr3en)\
**Replies:** 1\
**Last updated:** [October 29, 2019, 4:44pm UTC](https://discourse.processing.org/t/making-of-tetris/15024 "2019-10-29T16:44:51Z")

</div>

Hey all! Today at school I started coding a Tetris-like mini game, based on shapes which fall to the ground and land on the bottom of the window… but I’m now stuck! The fact is, everything goes right when I create a ne…

---

## [Save Function not quite right](https://discourse.processing.org/t/save-function-not-quite-right/15027)

<div class="topic-metadata">

**Author:** [@ozman](https://discourse.processing.org/u/ozman)\
**Replies:** 5\
**Last updated:** [October 29, 2019, 5:36pm UTC](https://discourse.processing.org/t/save-function-not-quite-right/15027 "2019-10-29T17:36:02Z")

</div>

Hi! i’m trying to have a save function that allows you to name the file and choose where you would like your save to go. So far with the code I have, its allows you to save and make/choose a folder but then places it o…

---

## [Error with this save function](https://discourse.processing.org/t/error-with-this-save-function/15026)

<div class="topic-metadata">

**Author:** [@ozman](https://discourse.processing.org/u/ozman)\
**Replies:** 2\
**Last updated:** [October 29, 2019, 4:50pm UTC](https://discourse.processing.org/t/error-with-this-save-function/15026 "2019-10-29T16:50:38Z")

</div>

Hi! Im trying to have a save function that allows you to select the folder it goes into. void keyPressed() { if(key == 'r'){ { setup(); } if(key ==' ') { selectFolder("select a folder to process","folderS…

---

## [Need help - very beginner](https://discourse.processing.org/t/need-help-very-beginner/14964)

<div class="topic-metadata">

**Author:** [@actuallyagod](https://discourse.processing.org/u/actuallyagod)\
**Replies:** 14\
**Last updated:** [October 29, 2019, 3:52pm UTC](https://discourse.processing.org/t/need-help-very-beginner/14964 "2019-10-29T15:52:53Z")

</div>

I have gotten a little school project, should be rather easy but i am completely lost. hope to find some help here. I am supposed to make something like this: https://gyazo.com/d9f0a1921c3eea3fc2fe6c691838be37 On the …

---

## [Display 2 succesive images](https://discourse.processing.org/t/display-2-succesive-images/14966)

<div class="topic-metadata">

**Author:** [@Y4niS](https://discourse.processing.org/u/Y4niS)\
**Replies:** 21\
**Last updated:** [October 29, 2019, 12:05pm UTC](https://discourse.processing.org/t/display-2-succesive-images/14966 "2019-10-29T12:05:02Z")

</div>

Hi, I aim to display, using Processing, two successive images separated by a time interval. After trying many methods I still can’t get a decent result.:pleading\_face: Here is how I proceeded : int maxImages = 2; PIm…

---

## [Processing versions](https://discourse.processing.org/t/processing-versions/14998)

<div class="topic-metadata">

**Author:** [@clementinagrillo](https://discourse.processing.org/u/clementinagrillo)\
**Replies:** 6\
**Last updated:** [October 29, 2019, 11:27am UTC](https://discourse.processing.org/t/processing-versions/14998 "2019-10-29T11:27:48Z")

</div>

Hello, I´m looking for processing old versions, I have an old macbook pro and the last version of Processing is not running. Does anyone know if it is possible to get one of these old versions?

---

## [Putting a point to the nearest grid intersection](https://discourse.processing.org/t/putting-a-point-to-the-nearest-grid-intersection/14999)

<div class="topic-metadata">

**Author:** [@johnsmith17](https://discourse.processing.org/u/johnsmith17)\
**Replies:** 1\
**Last updated:** [October 29, 2019, 10:31am UTC](https://discourse.processing.org/t/putting-a-point-to-the-nearest-grid-intersection/14999 "2019-10-29T10:31:28Z")

</div>

Hi im trying to make a grid with 10 columns and 10 rows and when mouse pressed a circle is placed to the nearest grid intersection. any idea how i can do this using arrays and loops to compare the distance between each c…

---

## [\[OSX\] runSketch from P3D only works for P3D subsketches](https://discourse.processing.org/t/osx-runsketch-from-p3d-only-works-for-p3d-subsketches/14949)

<div class="topic-metadata">

**Author:** [@onimatrix](https://discourse.processing.org/u/onimatrix)\
**Replies:** 3\
**Last updated:** [October 29, 2019, 4:00am UTC](https://discourse.processing.org/t/osx-runsketch-from-p3d-only-works-for-p3d-subsketches/14949 "2019-10-29T04:00:45Z")

</div>

Main sketch uses P3D. Second sketch uses default renderer. App freezes if using runSketch to spawn the second sketch, no console output. This happens in Processing 3.4 and OSX Mojave (10.14.6) All other combinations …

---

## [Using PoseNet/Runway on Processing](https://discourse.processing.org/t/using-posenet-runway-on-processing/14979)

<div class="topic-metadata">

**Author:** [@natttyk](https://discourse.processing.org/u/natttyk)\
**Replies:** 2\
**Last updated:** [October 28, 2019, 9:27pm UTC](https://discourse.processing.org/t/using-posenet-runway-on-processing/14979 "2019-10-28T21:27:00Z")

</div>

Hello! Newbie here. I’m using the PoseNet Library for Runway on Processing (https://github.com/runwayml/processing/blob/master/posenet/posenet.pde). The current examples only map out the joints in ellipses, but I want t…

---

## [Changing images with input key](https://discourse.processing.org/t/changing-images-with-input-key/14988)

<div class="topic-metadata">

**Author:** [@Kitty](https://discourse.processing.org/u/Kitty)\
**Replies:** 1\
**Last updated:** [October 28, 2019, 8:29pm UTC](https://discourse.processing.org/t/changing-images-with-input-key/14988 "2019-10-28T20:29:34Z")

</div>

I’m working with this java code and I would like to know how to change a displayed image with an input key. For example, change my currently display from im\[0\] to im\[2\]

---

## [Instances of classes always updating](https://discourse.processing.org/t/instances-of-classes-always-updating/14985)

<div class="topic-metadata">

**Author:** [@WeinSim](https://discourse.processing.org/u/WeinSim)\
**Replies:** 7\
**Last updated:** [October 28, 2019, 5:38pm UTC](https://discourse.processing.org/t/instances-of-classes-always-updating/14985 "2019-10-28T17:38:30Z")

</div>

Alright, so usually, when you have two variables, e.g. int i1 and int 2, and then you set i1 equal to i2 and change i2, the value in i1 stays put. int i1 = 5; int i2 = i1; i1 = 3; println(i1); //would print 5 But now …

---

## [Sending dmx output? (not enttec)](https://discourse.processing.org/t/sending-dmx-output-not-enttec/14984)

<div class="topic-metadata">

**Author:** [@bananana](https://discourse.processing.org/u/bananana)\
**Replies:** 0\
**Last updated:** [October 28, 2019, 4:07pm UTC](https://discourse.processing.org/t/sending-dmx-output-not-enttec/14984 "2019-10-28T16:07:56Z")

</div>

Anyone have suggestions for usb devices that can send DMX and work with Processing? I have an enttec usb pro which works well but looking for something cheaper that I can use. Thanks!

---

## [Poisson-disc Sampling](https://discourse.processing.org/t/poisson-disc-sampling/14869)

<div class="topic-metadata">

**Author:** [@TimoL](https://discourse.processing.org/u/TimoL)\
**Replies:** 8\
**Last updated:** [October 28, 2019, 1:28pm UTC](https://discourse.processing.org/t/poisson-disc-sampling/14869 "2019-10-28T13:28:12Z")

</div>

Hi there, I’ve been working from one of Daniel Shiffman’s coding challenges and have been trying to implement it from P5.js to Processing. Im almost there but I always get an Array Index Out Of Bounds error (line 68). …

---

## [Resizing Kinect depth image for use as 'reveal mask'](https://discourse.processing.org/t/resizing-kinect-depth-image-for-use-as-reveal-mask/14764)

<div class="topic-metadata">

**Author:** [@dbvm](https://discourse.processing.org/u/dbvm)\
**Replies:** 2\
**Last updated:** [October 28, 2019, 10:09am UTC](https://discourse.processing.org/t/resizing-kinect-depth-image-for-use-as-reveal-mask/14764 "2019-10-28T10:09:12Z")

</div>

Hello all I’ve been programming interactive apps using a Kinect v2 model 1520 using Processing 3.5.3. This app will be for a top-down projection that uses a persons blob to reveal an image below another. In effect, the …

---

## [Color pixel spread algorithms](https://discourse.processing.org/t/color-pixel-spread-algorithms/14947)

<div class="topic-metadata">

**Author:** [@rojele](https://discourse.processing.org/u/rojele)\
**Replies:** 8\
**Last updated:** [October 27, 2019, 2:50pm UTC](https://discourse.processing.org/t/color-pixel-spread-algorithms/14947 "2019-10-27T14:50:49Z")

</div>

Hi, everyone, I’m trying to find an efficient algorithm that would allow me to expand a color in a non-regular and more organic way than a growing ellipse. What I would like to achieve is like a color getting disolved …

---

## [Random video generated for every mouse click](https://discourse.processing.org/t/random-video-generated-for-every-mouse-click/14958)

<div class="topic-metadata">

**Author:** [@szb1](https://discourse.processing.org/u/szb1)\
**Replies:** 6\
**Last updated:** [October 27, 2019, 1:51am UTC](https://discourse.processing.org/t/random-video-generated-for-every-mouse-click/14958 "2019-10-27T01:51:12Z")

</div>

Hi, I am trying to get a random video to play from an array but a selected number only for when I press the left or right click. For this I created two seperate variables to generate a random number. Every time I click…

---

## [Noise Buffering](https://discourse.processing.org/t/noise-buffering/14640)

<div class="topic-metadata">

**Author:** [@LordCacops](https://discourse.processing.org/u/LordCacops)\
**Replies:** 5\
**Last updated:** [October 26, 2019, 7:51pm UTC](https://discourse.processing.org/t/noise-buffering/14640 "2019-10-26T19:51:54Z")

</div>

Hey there! I am in a necessity to know how to create a buffer of perlin noise so that I can access that same stable noise data in different scenarios, and across different runs of the same program. In another thread som…

---

## [Creating Snake Game](https://discourse.processing.org/t/creating-snake-game/14954)

<div class="topic-metadata">

**Author:** [@Ephilorex](https://discourse.processing.org/u/Ephilorex)\
**Replies:** 3\
**Last updated:** [October 26, 2019, 2:30pm UTC](https://discourse.processing.org/t/creating-snake-game/14954 "2019-10-26T14:30:51Z")

</div>

Hi everyone! I am a beginner in Processing and for my assignment I would like to create a snake game. Here are my steps: Draw background Create apple system; spawn one in on the grid when another is eaten Death system…

---

## [Rendering issues drawing primitives with stroke()](https://discourse.processing.org/t/rendering-issues-drawing-primitives-with-stroke/5921)

<div class="topic-metadata">

**Author:** [@stixan](https://discourse.processing.org/u/stixan)\
**Replies:** 4\
**Last updated:** [October 25, 2019, 5:22pm UTC](https://discourse.processing.org/t/rendering-issues-drawing-primitives-with-stroke/5921 "2019-10-25T17:22:48Z")

</div>

I am experiencing rendering issues when I try to draw lines between sub-pixel positions (i.e., specifying start-end-coordinates using float values). Lines drawn with a regular interval using a for loop should appear even…

---

## [NullPointerException when after 2 secconds](https://discourse.processing.org/t/nullpointerexception-when-after-2-secconds/14871)

<div class="topic-metadata">

**Author:** [@DatSoi](https://discourse.processing.org/u/DatSoi)\
**Replies:** 4\
**Last updated:** [October 23, 2019, 7:57am UTC](https://discourse.processing.org/t/nullpointerexception-when-after-2-secconds/14871 "2019-10-23T07:57:57Z")

</div>

Hi so my code seems to give me NullPointerException when i get to the 86th line. Im not sure why could you help. import gab.opencv.\*; import processing.video.\*; import java.awt.\*; int maxImages = 61; //61 Frames int im…

---

## [Snake Game in Processing](https://discourse.processing.org/t/snake-game-in-processing/14921)

<div class="topic-metadata">

**Author:** [@Ephilorex](https://discourse.processing.org/u/Ephilorex)\
**Replies:** 10\
**Last updated:** [October 25, 2019, 2:14pm UTC](https://discourse.processing.org/t/snake-game-in-processing/14921 "2019-10-25T14:14:30Z")

</div>

Hello! I’m a complete beginner with Processing. For my assignment, I want to make a snake game in Processing. Here is what I want to do; Draw background Create apple system; spawn one in on the grid when another is eat…

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

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