# Processing

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

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

**Page:** 157

---

## [Limit window maximum size](https://discourse.processing.org/t/limit-window-maximum-size/27076)

<div class="topic-metadata">

**Author:** [@mgood7123](https://discourse.processing.org/u/mgood7123)\
**Replies:** 5\
**Last updated:** [January 16, 2021, 11:24am UTC](https://discourse.processing.org/t/limit-window-maximum-size/27076 "2021-01-16T11:24:21Z")

</div>

is there a way to set a maximum window size? in particular I am trying to prevent content overflow by limiting the maximum window size void setup() { // initial window size size(640, 360, P2D); // allow window t…

---

## [Image resetting after moving](https://discourse.processing.org/t/image-resetting-after-moving/27097)

<div class="topic-metadata">

**Author:** [@lancelot](https://discourse.processing.org/u/lancelot)\
**Replies:** 2\
**Last updated:** [January 16, 2021, 8:54am UTC](https://discourse.processing.org/t/image-resetting-after-moving/27097 "2021-01-16T08:54:13Z")

</div>

Hi everyone, I’ve been creating a map with a 2d array, and now i’m trying to get it to move (since the map is bigger than the screen), but I’m having some trouble with getting the field to stay where it is. The idea beh…

---

## [Make trail move in Z direction](https://discourse.processing.org/t/make-trail-move-in-z-direction/27037)

<div class="topic-metadata">

**Author:** [@noobcoder](https://discourse.processing.org/u/noobcoder)\
**Replies:** 12\
**Last updated:** [January 16, 2021, 8:10am UTC](https://discourse.processing.org/t/make-trail-move-in-z-direction/27037 "2021-01-16T08:10:04Z")

</div>

I am trying to set up an interaction between AntD and the trail it leaves behind. I want the trail to move up in the Z direction every time the AntD come within a certain distance of the trail. Right now i have just adde…

---

## [How to run concurrent sketches](https://discourse.processing.org/t/how-to-run-concurrent-sketches/26816)

<div class="topic-metadata">

**Author:** [@Cooper.Davies](https://discourse.processing.org/u/Cooper.Davies)\
**Replies:** 2\
**Last updated:** [January 16, 2021, 6:45am UTC](https://discourse.processing.org/t/how-to-run-concurrent-sketches/26816 "2021-01-16T06:45:36Z")

</div>

The question I have regarding processing is how would I go about managing multiple rendering frames concurrently. For more context, what I am trying to create is a genetic algorithm to play a game which I will create usi…

---

## [Sketches named "final" do not run](https://discourse.processing.org/t/sketches-named-final-do-not-run/27100)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 1\
**Last updated:** [January 15, 2021, 7:30pm UTC](https://discourse.processing.org/t/sketches-named-final-do-not-run/27100 "2021-01-15T19:30:09Z")

</div>

I know it is because of PApplet name (from what I heard processing sketch is just a PApplet running in java) when I copied the code on a blank sketch it worked. You don’t need to reply but keep that in mind if you ha…

---

## [Help with adding library function](https://discourse.processing.org/t/help-with-adding-library-function/26971)

<div class="topic-metadata">

**Author:** [@Ell123](https://discourse.processing.org/u/Ell123)\
**Replies:** 3\
**Last updated:** [January 15, 2021, 2:33pm UTC](https://discourse.processing.org/t/help-with-adding-library-function/26971 "2021-01-15T14:33:34Z")

</div>

Whenver I try to add a library it says I need to verify my internet and that there is no internet or something, I don’t know why it says it when I am connected to my wifi, please help, I just installed processor also and…

---

## [Ball to ball collision](https://discourse.processing.org/t/ball-to-ball-collision/27050)

<div class="topic-metadata">

**Author:** [@WasNeverHere](https://discourse.processing.org/u/WasNeverHere)\
**Replies:** 1\
**Last updated:** [January 15, 2021, 1:20pm UTC](https://discourse.processing.org/t/ball-to-ball-collision/27050 "2021-01-15T13:20:16Z")

</div>

I am trying to make it so that the circle that is moving (circleX) isn’t hit by the circles that are obstacles (circleD). I’ve tried a lot of different things and can’t find what’s wrong. float xspeed = 2.5; float x,y; …

---

## [Line Graph - ArrayIndexOutOfBoundsException: 570](https://discourse.processing.org/t/line-graph-arrayindexoutofboundsexception-570/27085)

<div class="topic-metadata">

**Author:** [@JennyMcCreadie](https://discourse.processing.org/u/JennyMcCreadie)\
**Replies:** 4\
**Last updated:** [January 15, 2021, 12:20pm UTC](https://discourse.processing.org/t/line-graph-arrayindexoutofboundsexception-570/27085 "2021-01-15T12:20:17Z")

</div>

Hello, I’m following a tutorial on making a dynamic linegraph whilst using my own data. I’ve come across an error which I’m unable to fix myself and would really appreciate some fresh eyes on this :slight\_smile: I know …

---

## [Virtual display: Extremely urgent](https://discourse.processing.org/t/virtual-display-extremely-urgent/27082)

<div class="topic-metadata">

**Author:** [@AbroChief](https://discourse.processing.org/u/AbroChief)\
**Replies:** 1\
**Last updated:** [January 15, 2021, 11:58am UTC](https://discourse.processing.org/t/virtual-display-extremely-urgent/27082 "2021-01-15T11:58:28Z")

</div>

Hello discourse forum. This is Abhigyan from Assam, India. I’m just a beginner (know nothing) regarding Processing. It’s a very important and urgent urge from me that please anybody help me regarding my problem. I act…

---

## [Bug with processing. After running a program for about 5 hours](https://discourse.processing.org/t/bug-with-processing-after-running-a-program-for-about-5-hours/26975)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 3\
**Last updated:** [January 15, 2021, 11:50am UTC](https://discourse.processing.org/t/bug-with-processing-after-running-a-program-for-about-5-hours/26975 "2021-01-15T11:50:45Z")

</div>

After I run the program for about 5 hours this happen; It is just a minor bug but yea : P, the total number of points probably exceeded the limits and so it started lagging. ArrayList\<PVector\> pos = new ArrayList\<PVe…

---

## [PGraphics - read pixels as they are drawn](https://discourse.processing.org/t/pgraphics-read-pixels-as-they-are-drawn/21837)

<div class="topic-metadata">

**Author:** [@mgood7123](https://discourse.processing.org/u/mgood7123)\
**Replies:** 21\
**Last updated:** [January 15, 2021, 6:28am UTC](https://discourse.processing.org/t/pgraphics-read-pixels-as-they-are-drawn/21837 "2021-01-15T06:28:10Z")

</div>

with the PGraphics class, is there a way to read pixles as they get drawn? for example PGraphics c; void settings() { size(100, 100, P3D); } void setup() { c = createGraphics(100,100, P3D); c.beginDraw();…

---

## [Generalisation of function](https://discourse.processing.org/t/generalisation-of-function/27061)

<div class="topic-metadata">

**Author:** [@Rafsing](https://discourse.processing.org/u/Rafsing)\
**Replies:** 6\
**Last updated:** [January 15, 2021, 12:25am UTC](https://discourse.processing.org/t/generalisation-of-function/27061 "2021-01-15T00:25:54Z")

</div>

How can I generalize pendulumManagement() to take as arguments the names of the functions to fire and the boolean to decide on? void pendulumManagement() { if (pendul) { singlePendulumManagement(); } else { …

---

## [\*URGENT\* Assistance with Drawing Program](https://discourse.processing.org/t/urgent-assistance-with-drawing-program/27046)

<div class="topic-metadata">

**Author:** [@Prxt.3k](https://discourse.processing.org/u/Prxt.3k)\
**Replies:** 11\
**Last updated:** [January 14, 2021, 6:45pm UTC](https://discourse.processing.org/t/urgent-assistance-with-drawing-program/27046 "2021-01-14T18:45:20Z")

</div>

I am creating a drawing program similar to paint for a school assignment, but I would like to know if someone has the code for the shape selector box similar to Microsoft paint because I would like to elevate my project.…

---

## [How do I import Pexels API library in Processing?](https://discourse.processing.org/t/how-do-i-import-pexels-api-library-in-processing/27004)

<div class="topic-metadata">

**Author:** [@eclipse](https://discourse.processing.org/u/eclipse)\
**Replies:** 1\
**Last updated:** [January 14, 2021, 6:26pm UTC](https://discourse.processing.org/t/how-do-i-import-pexels-api-library-in-processing/27004 "2021-01-14T18:26:25Z")

</div>

Hello, I am attempting to use an API for the first time but am having some trouble. Here is the API that I have chosen: Pexels API Documentation. I have already received an API key and tried to adapt the following Java…

---

## [Creating a list of random colors that does not update](https://discourse.processing.org/t/creating-a-list-of-random-colors-that-does-not-update/27041)

<div class="topic-metadata">

**Author:** [@jackeddielove](https://discourse.processing.org/u/jackeddielove)\
**Replies:** 7\
**Last updated:** [January 14, 2021, 3:56pm UTC](https://discourse.processing.org/t/creating-a-list-of-random-colors-that-does-not-update/27041 "2021-01-14T15:56:12Z")

</div>

I would like to create an array of 100 randomly chosen colors that I can pick from throughout my “draw” code. If I use color\[\] colors = new color\[100\]; for (int i = 0; i\<100; i++) { colors\[i\]= color(random(255), rand…

---

## [Finding the edges in an Image error](https://discourse.processing.org/t/finding-the-edges-in-an-image-error/27055)

<div class="topic-metadata">

**Author:** [@ELaN](https://discourse.processing.org/u/ELaN)\
**Replies:** 11\
**Last updated:** [January 14, 2021, 2:18pm UTC](https://discourse.processing.org/t/finding-the-edges-in-an-image-error/27055 "2021-01-14T14:18:49Z")

</div>

I’ve written this code to find the edges in my image which I have named properly in the correct file: \<PImage frog; void setup(){ size(1200,720); frog=loadImage(“frog.jpg”); } void draw(){ loadPixels(); frog.load…

---

## [Different behaviour between Processing and Arduino Serial Monitor](https://discourse.processing.org/t/different-behaviour-between-processing-and-arduino-serial-monitor/26973)

<div class="topic-metadata">

**Author:** [@kodibeni](https://discourse.processing.org/u/kodibeni)\
**Replies:** 6\
**Last updated:** [January 14, 2021, 11:32am UTC](https://discourse.processing.org/t/different-behaviour-between-processing-and-arduino-serial-monitor/26973 "2021-01-14T11:32:05Z")

</div>

Dear all, I have just started experiencing with Processing, and ran into the following problem. I am trying to blink the built-in LED on an Arduino board (Mega2560), and am experiencing different behavior between the P…

---

## [How can I fix my Timer Bug?](https://discourse.processing.org/t/how-can-i-fix-my-timer-bug/27044)

<div class="topic-metadata">

**Author:** [@Radioaktiv](https://discourse.processing.org/u/Radioaktiv)\
**Replies:** 2\
**Last updated:** [January 14, 2021, 9:50am UTC](https://discourse.processing.org/t/how-can-i-fix-my-timer-bug/27044 "2021-01-14T09:50:16Z")

</div>

the first second the timer does not work. is there any way to fix it? also is there a way to make it mor compact? String milliseconds; int second; int timer; int index; void setup() { size(500, 500); } void draw() {…

---

## [Could you please help with java.lang.NullPointerException](https://discourse.processing.org/t/could-you-please-help-with-java-lang-nullpointerexception/26666)

<div class="topic-metadata">

**Author:** [@digimages\_111](https://discourse.processing.org/u/digimages_111)\
**Replies:** 9\
**Last updated:** [January 14, 2021, 5:57am UTC](https://discourse.processing.org/t/could-you-please-help-with-java-lang-nullpointerexception/26666 "2021-01-14T05:57:13Z")

</div>

I downloaded but never successful to starting app; Please see the image, what was the reason, and how to fix? Thanks.

---

## [Fill() doesn't accept pattern](https://discourse.processing.org/t/fill-doesnt-accept-pattern/27035)

<div class="topic-metadata">

**Author:** [@j0b](https://discourse.processing.org/u/j0b)\
**Replies:** 1\
**Last updated:** [January 13, 2021, 10:45pm UTC](https://discourse.processing.org/t/fill-doesnt-accept-pattern/27035 "2021-01-13T22:45:18Z")

</div>

i am used to js canvas which accept any pattern (or image) as fillStyle() or strokeStyle(). p5js fill() apparently only works with colors. curious if there is any workaround?

---

## [Accessing processing data types from class of java package](https://discourse.processing.org/t/accessing-processing-data-types-from-class-of-java-package/27028)

<div class="topic-metadata">

**Author:** [@bhavya](https://discourse.processing.org/u/bhavya)\
**Replies:** 3\
**Last updated:** [January 13, 2021, 5:25pm UTC](https://discourse.processing.org/t/accessing-processing-data-types-from-class-of-java-package/27028 "2021-01-13T17:25:21Z")

</div>

I have learnt processing from The Coding Train. Recently I was working on some GUI functionality (i.e. Button, Slider, etc.) and thought to create a library. I know there are GUI library already exist, but I am doing for…

---

## [Image Processing With Pixels error](https://discourse.processing.org/t/image-processing-with-pixels-error/27030)

<div class="topic-metadata">

**Author:** [@ELaN](https://discourse.processing.org/u/ELaN)\
**Replies:** 2\
**Last updated:** [January 13, 2021, 4:24pm UTC](https://discourse.processing.org/t/image-processing-with-pixels-error/27030 "2021-01-13T16:24:31Z")

</div>

I’ve written this cose: \<void setup(){ size(337,450); frog=loadImage(“frog.jpg”); } void draw(){ image(frog,0,0); loadPixels(); frog.loadPixels(); for(int x=0; x\<width; x++){ for(int y=0; y\<height; y++){ int l…

---

## [Nature of Code: Drag Forces](https://discourse.processing.org/t/nature-of-code-drag-forces/27005)

<div class="topic-metadata">

**Author:** [@Divitiacus](https://discourse.processing.org/u/Divitiacus)\
**Replies:** 2\
**Last updated:** [January 13, 2021, 1:14pm UTC](https://discourse.processing.org/t/nature-of-code-drag-forces/27005 "2021-01-13T13:14:38Z")

</div>

This might be more a physics question then a programming question but because it is described in “The Nature of Code” somebody might have an answer as well. I am currently working on something, where I want to implement…

---

## [What do final / static / public / private tags mean?](https://discourse.processing.org/t/what-do-final-static-public-private-tags-mean/27002)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 2\
**Last updated:** [January 12, 2021, 10:43pm UTC](https://discourse.processing.org/t/what-do-final-static-public-private-tags-mean/27002 "2021-01-12T22:43:07Z")

</div>

Hi! In the last month, I’ve been active on the forum. I saw quite a lot of things like final int b = 3, which means that b does not change. But what do the others mean? I tried using public int b = 123 inside of setup, …

---

## [How are PShape contours stored?](https://discourse.processing.org/t/how-are-pshape-contours-stored/26997)

<div class="topic-metadata">

**Author:** [@micycle](https://discourse.processing.org/u/micycle)\
**Replies:** 2\
**Last updated:** [January 12, 2021, 8:38pm UTC](https://discourse.processing.org/t/how-are-pshape-contours-stored/26997 "2021-01-12T20:38:13Z")

</div>

Take the PShape above. Clearly it must know that the vertices of the inner region are not to be joined with the other vertices of the edge and represent a region that is “cut-out” from the shape. Processing calls such …

---

## [P2D, P3D & macOS Big Sur (11.1)](https://discourse.processing.org/t/p2d-p3d-macos-big-sur-11-1/26998)

<div class="topic-metadata">

**Author:** [@rapatski](https://discourse.processing.org/u/rapatski)\
**Replies:** 1\
**Last updated:** [January 12, 2021, 7:28pm UTC](https://discourse.processing.org/t/p2d-p3d-macos-big-sur-11-1/26998 "2021-01-12T19:28:24Z")

</div>

Hi friends, These are my least favourite posts, but again as I start Processing up after a bit of an hiatus, I seem to run straight into problems. Searched the forum but could not find any other reports… is no-one havin…

---

## [Put a picture on the walls of a box](https://discourse.processing.org/t/put-a-picture-on-the-walls-of-a-box/26919)

<div class="topic-metadata">

**Author:** [@julieturin](https://discourse.processing.org/u/julieturin)\
**Replies:** 1\
**Last updated:** [January 12, 2021, 7:20pm UTC](https://discourse.processing.org/t/put-a-picture-on-the-walls-of-a-box/26919 "2021-01-12T19:20:47Z")

</div>

hello, I would like to put a picture on the floor and walls of my box but I can’t do it with vertex. pushMatrix(); translate(0, 0, total/2); box(400, 200, total); PImage img = loadImage(“lol.jpg”); noStroke(); beg…

---

## [Compare data with recorded data](https://discourse.processing.org/t/compare-data-with-recorded-data/26922)

<div class="topic-metadata">

**Author:** [@bking](https://discourse.processing.org/u/bking)\
**Replies:** 3\
**Last updated:** [January 12, 2021, 12:22am UTC](https://discourse.processing.org/t/compare-data-with-recorded-data/26922 "2021-01-12T00:22:28Z")

</div>

I would like just to compare a value of a data that I have at the actual frame, with the former value I had at the previous frame. And do something like this if (formerData \> actualData+100) doSomething. Thank you. …

---

## [Compare the same data at the same frame](https://discourse.processing.org/t/compare-the-same-data-at-the-same-frame/26987)

<div class="topic-metadata">

**Author:** [@bking](https://discourse.processing.org/u/bking)\
**Replies:** 0\
**Last updated:** [January 11, 2021, 9:16pm UTC](https://discourse.processing.org/t/compare-the-same-data-at-the-same-frame/26987 "2021-01-11T21:16:24Z")

</div>

Hello! I don’t understand why my program record the same value whereas it shouldn’t? I want to record 3 different datas with 1 different frame each time one of my three value is different. I think, I compare datas not…

---

## [Stack boxes (questions / Tetris)](https://discourse.processing.org/t/stack-boxes-questions-tetris/26981)

<div class="topic-metadata">

**Author:** [@jeremy](https://discourse.processing.org/u/jeremy)\
**Replies:** 5\
**Last updated:** [January 11, 2021, 7:01pm UTC](https://discourse.processing.org/t/stack-boxes-questions-tetris/26981 "2021-01-11T19:01:19Z")

</div>

How to stack the boxes with class function,and use array to create 5 boxes

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

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