# Processing

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

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

**Page:** 119

---

## [Applying power by amount of time passed?](https://discourse.processing.org/t/applying-power-by-amount-of-time-passed/30295)

<div class="topic-metadata">

**Author:** [@int](https://discourse.processing.org/u/int)\
**Replies:** 5\
**Last updated:** [August 16, 2021, 12:35pm UTC](https://discourse.processing.org/t/applying-power-by-amount-of-time-passed/30295 "2021-08-16T12:35:15Z")

</div>

Hi, I’m struggling to figure out how you can set the speed/power of a moving object based on time. For example, When you press a key, a ball is thrown from one end to the other. the time taken to press the key is calcula…

---

## [Video library not working for exported application of the sketch](https://discourse.processing.org/t/video-library-not-working-for-exported-application-of-the-sketch/25264)

<div class="topic-metadata">

**Author:** [@aditya1](https://discourse.processing.org/u/aditya1)\
**Replies:** 11\
**Last updated:** [August 16, 2021, 7:57am UTC](https://discourse.processing.org/t/video-library-not-working-for-exported-application-of-the-sketch/25264 "2021-08-16T07:57:14Z")

</div>

My sketch works totally fine when I run in the Processing software containing the Processing video library. But when I export the sketch as exe application the same code doesn’t work. To try I removed the movie from the…

---

## [Exporting application Crashes on Mac Big Sug 11.4](https://discourse.processing.org/t/exporting-application-crashes-on-mac-big-sug-11-4/31202)

<div class="topic-metadata">

**Author:** [@manu](https://discourse.processing.org/u/manu)\
**Replies:** 9\
**Last updated:** [August 16, 2021, 6:08am UTC](https://discourse.processing.org/t/exporting-application-crashes-on-mac-big-sug-11-4/31202 "2021-08-16T06:08:02Z")

</div>

Hi Everyone! I am in a bit of a bind and wanted to see if anyone else ran into this problem. When I publish sketches from processing (3.4 or Alpha) as exported applications, the process goes ok. But when I try and open…

---

## [How to copy an array](https://discourse.processing.org/t/how-to-copy-an-array/5170)

<div class="topic-metadata">

**Author:** [@sLucas](https://discourse.processing.org/u/sLucas)\
**Replies:** 10\
**Last updated:** [August 16, 2021, 3:50am UTC](https://discourse.processing.org/t/how-to-copy-an-array/5170 "2021-08-16T03:50:45Z")

</div>

A bug has been found… (No bug has been found (edit)) Explanation follows void setup() { double\[\] a = {1, 2, 3}; double\[\] b = {1, 2, 3}; for (double print : b) { print(print + ", "); } println(); b = new…

---

## [A caught exception occured on thread](https://discourse.processing.org/t/a-caught-exception-occured-on-thread/31713)

<div class="topic-metadata">

**Author:** [@LuckSmith](https://discourse.processing.org/u/LuckSmith)\
**Replies:** 4\
**Last updated:** [August 15, 2021, 11:49am UTC](https://discourse.processing.org/t/a-caught-exception-occured-on-thread/31713 "2021-08-15T11:49:40Z")

</div>

Hi guys, I got the following error message running my sketch. Tried both 4.01 and 3.5.4 versions. What is wrong? RunnableTask.run(): A caught exception occured on thread main-Display-.windows\_nil-1-EDT-1: RunnableTask…

---

## [Why updating sand simulation in grid doesn't work?](https://discourse.processing.org/t/why-updating-sand-simulation-in-grid-doesnt-work/31722)

<div class="topic-metadata">

**Author:** [@Rafsing](https://discourse.processing.org/u/Rafsing)\
**Replies:** 2\
**Last updated:** [August 15, 2021, 1:19am UTC](https://discourse.processing.org/t/why-updating-sand-simulation-in-grid-doesnt-work/31722 "2021-08-15T01:19:17Z")

</div>

I want to make a falling sand simulation using cellular automata, but when I update it, nothing happens, and when I want to do a line of diffrent material using lineDrawing() this material appear in random cells. This is…

---

## [Odd behaviour with Processing 3 and Processing 4 installed](https://discourse.processing.org/t/odd-behaviour-with-processing-3-and-processing-4-installed/31725)

<div class="topic-metadata">

**Author:** [@PhilHaw](https://discourse.processing.org/u/PhilHaw)\
**Replies:** 3\
**Last updated:** [August 14, 2021, 9:22pm UTC](https://discourse.processing.org/t/odd-behaviour-with-processing-3-and-processing-4-installed/31725 "2021-08-14T21:22:08Z")

</div>

I have Processing 3 (3.5.4) and Processing 4.0b1 installed on a Windows 10 PC. Here’s an odd thing! If I have Processing 3 open and I try to run Processing 4, the Processing 4 splash screen appears briefly but the new s…

---

## [Calling different draw functions](https://discourse.processing.org/t/calling-different-draw-functions/31709)

<div class="topic-metadata">

**Author:** [@odecode](https://discourse.processing.org/u/odecode)\
**Replies:** 15\
**Last updated:** [August 14, 2021, 6:38pm UTC](https://discourse.processing.org/t/calling-different-draw-functions/31709 "2021-08-14T18:38:34Z")

</div>

Hello! I followed TheCodingTrain’s youtube video for the Rubik’s cube, and am now adding some functionality which I need help with. I am using java mode. I created a simple solver (brute force), and now I want to create …

---

## [Sound and Acceleration](https://discourse.processing.org/t/sound-and-acceleration/31710)

<div class="topic-metadata">

**Author:** [@G03TH3](https://discourse.processing.org/u/G03TH3)\
**Replies:** 3\
**Last updated:** [August 14, 2021, 4:36pm UTC](https://discourse.processing.org/t/sound-and-acceleration/31710 "2021-08-14T16:36:47Z")

</div>

I have been bombarding this post with many questions and I’m sorry that I have to rely so much on the help of you guys, I may assure that everything I’m asking it took me at least 1-2 hours of attempt and failure by myse…

---

## [Playing multiple videos with transparent backgrounds](https://discourse.processing.org/t/playing-multiple-videos-with-transparent-backgrounds/8990)

<div class="topic-metadata">

**Author:** [@blue](https://discourse.processing.org/u/blue)\
**Replies:** 4\
**Last updated:** [August 14, 2021, 12:58pm UTC](https://discourse.processing.org/t/playing-multiple-videos-with-transparent-backgrounds/8990 "2021-08-14T12:58:38Z")

</div>

Hi, I would like to layer multiple videos that I’ve made in processing sketches on top of each other. They all have black backgrounds, which is necessary to create the initial sketch but when i play them back on top of …

---

## [How to create a line in a grid using Bresenham's line algorithm](https://discourse.processing.org/t/how-to-create-a-line-in-a-grid-using-bresenhams-line-algorithm/31721)

<div class="topic-metadata">

**Author:** [@Rafsing](https://discourse.processing.org/u/Rafsing)\
**Replies:** 1\
**Last updated:** [August 14, 2021, 12:43am UTC](https://discourse.processing.org/t/how-to-create-a-line-in-a-grid-using-bresenhams-line-algorithm/31721 "2021-08-14T00:43:20Z")

</div>

I want to create a line using Bresenham’s algorithm , but the only line that works is a horizontal line from left to right, lines pointing upwards do not work at all and lines drawn diagonally downwards appear in the wro…

---

## [How to save frames with many transparent images?](https://discourse.processing.org/t/how-to-save-frames-with-many-transparent-images/30522)

<div class="topic-metadata">

**Author:** [@noodleSystem](https://discourse.processing.org/u/noodleSystem)\
**Replies:** 10\
**Last updated:** [August 13, 2021, 7:45pm UTC](https://discourse.processing.org/t/how-to-save-frames-with-many-transparent-images/30522 "2021-08-13T19:45:35Z")

</div>

This is kind of a weird question, please forgive the longwinded explanation: There must be an easier way to do this. I’m trying to save each frame (as it appears on the screen) and make a movie, but the frame captures t…

---

## [I need random shapes to appear in a random order](https://discourse.processing.org/t/i-need-random-shapes-to-appear-in-a-random-order/31716)

<div class="topic-metadata">

**Author:** [@maroslan](https://discourse.processing.org/u/maroslan)\
**Replies:** 2\
**Last updated:** [August 13, 2021, 6:17pm UTC](https://discourse.processing.org/t/i-need-random-shapes-to-appear-in-a-random-order/31716 "2021-08-13T18:17:36Z")

</div>

Hi everyone For an assignment I am trying to make two shapes (ellipse and rectangle) appear in a random order (with random color and position). The color and position I got down, but I cannot seem to seperate the ellip…

---

## [Would you call this way to measure velocity "correct"?](https://discourse.processing.org/t/would-you-call-this-way-to-measure-velocity-correct/31697)

<div class="topic-metadata">

**Author:** [@G03TH3](https://discourse.processing.org/u/G03TH3)\
**Replies:** 3\
**Last updated:** [August 13, 2021, 9:27am UTC](https://discourse.processing.org/t/would-you-call-this-way-to-measure-velocity-correct/31697 "2021-08-13T09:27:50Z")

</div>

float x; float playbackSpeed; float x\_po, pr\_x, pa\_x, x\_d; float prevTime = 0; float dt, velocity = 1; float currTime; void setup() { size(640, 360); background(255); } void draw() { x\_po+=10; // X1-POSITION if…

---

## [Writing Processing in Kotlin](https://discourse.processing.org/t/writing-processing-in-kotlin/3957)

<div class="topic-metadata">

**Author:** [@hamoid](https://discourse.processing.org/u/hamoid)\
**Replies:** 48\
**Last updated:** [August 12, 2021, 8:32pm UTC](https://discourse.processing.org/t/writing-processing-in-kotlin/3957 "2021-08-12T20:32:00Z")

</div>

Hi there, I just tried running a Processing program written in the Kotlin language, and I thought I would share here the steps in case anyone wants to try. This may not be very interesting if you are happy using the Pro…

---

## [Making my float increase then decrease so that my ellipses grows and then shrinks](https://discourse.processing.org/t/making-my-float-increase-then-decrease-so-that-my-ellipses-grows-and-then-shrinks/31701)

<div class="topic-metadata">

**Author:** [@Kenga123456](https://discourse.processing.org/u/Kenga123456)\
**Replies:** 7\
**Last updated:** [August 13, 2021, 8:00am UTC](https://discourse.processing.org/t/making-my-float-increase-then-decrease-so-that-my-ellipses-grows-and-then-shrinks/31701 "2021-08-13T08:00:51Z")

</div>

Here is the code I use to make ellipses grow and then shrink. I have already declared vision as a float with the starting value 0; if (circleIsShrinking) vision = vision -0,2; else vision = vision +0,2; if (…

---

## [Can I safely install both Processing 4 and Processing 3.5.4?](https://discourse.processing.org/t/can-i-safely-install-both-processing-4-and-processing-3-5-4/31700)

<div class="topic-metadata">

**Author:** [@PhilHaw](https://discourse.processing.org/u/PhilHaw)\
**Replies:** 2\
**Last updated:** [August 12, 2021, 5:52pm UTC](https://discourse.processing.org/t/can-i-safely-install-both-processing-4-and-processing-3-5-4/31700 "2021-08-12T17:52:41Z")

</div>

Can Processing 4 and Processing 3.5.4 co-exist on the same PC (Windows 10)? I know I should create a new sketchbook folder for Processing 4 to avoid making unwanted changes to older sketches but what about Java 11 versu…

---

## [Give sound to AI paths](https://discourse.processing.org/t/give-sound-to-ai-paths/31660)

<div class="topic-metadata">

**Author:** [@markelloskolofotias](https://discourse.processing.org/u/markelloskolofotias)\
**Replies:** 4\
**Last updated:** [August 12, 2021, 5:48pm UTC](https://discourse.processing.org/t/give-sound-to-ai-paths/31660 "2021-08-12T17:48:43Z")

</div>

Dear community, I am a postgraduate fine art student from Greece and I have a question for you. I designed the following symbols in Adobe Illustrator and I would like to give them sound. So, could you please tell me i…

---

## [OpenGL and Big Sur](https://discourse.processing.org/t/opengl-and-big-sur/30045)

<div class="topic-metadata">

**Author:** [@Christian](https://discourse.processing.org/u/Christian)\
**Replies:** 4\
**Last updated:** [August 12, 2021, 2:07pm UTC](https://discourse.processing.org/t/opengl-and-big-sur/30045 "2021-08-12T14:07:19Z")

</div>

Hello! I realised that the P2D and P3D renderers don’t work on Big Sur, however some users suggested to add frameRate(XX) to make the Sketch run. Thanks a lot for that! As an exported application it still crashes thoug…

---

## [Migrated Processing to new MacBook Pro - OSX 11.1 - sketches fail](https://discourse.processing.org/t/migrated-processing-to-new-macbook-pro-osx-11-1-sketches-fail/27105)

<div class="topic-metadata">

**Author:** [@RetProf](https://discourse.processing.org/u/RetProf)\
**Replies:** 1\
**Last updated:** [August 12, 2021, 1:31pm UTC](https://discourse.processing.org/t/migrated-processing-to-new-macbook-pro-osx-11-1-sketches-fail/27105 "2021-08-12T13:31:10Z")

</div>

Still no responses - but I have discovered that the problem/failure indicated below appears to be the result of using either the P2D or P3D renderers. When using the default (i.e. no renderer indicated), sketches functio…

---

## [Broken website tutorials](https://discourse.processing.org/t/broken-website-tutorials/31683)

<div class="topic-metadata">

**Author:** [@username2](https://discourse.processing.org/u/username2)\
**Replies:** 7\
**Last updated:** [August 12, 2021, 1:19pm UTC](https://discourse.processing.org/t/broken-website-tutorials/31683 "2021-08-12T13:19:13Z")

</div>

hello, after the website has migrated, most of the tutorial links don’t work anymore and it’s really difficult to look up reference and examples (for example https://processing.org/learning/pshape/ or https://processin…

---

## [Processing 4.0 uses more Memory](https://discourse.processing.org/t/processing-4-0-uses-more-memory/31672)

<div class="topic-metadata">

**Author:** [@CosmicCrowMC](https://discourse.processing.org/u/CosmicCrowMC)\
**Replies:** 2\
**Last updated:** [August 12, 2021, 10:31am UTC](https://discourse.processing.org/t/processing-4-0-uses-more-memory/31672 "2021-08-12T10:31:01Z")

</div>

Today I updated to Processing 4.0. In 3.5.4, my Dev Environment averaged at around 450 MB of usage and its corresponding program averaged at around 1500 MB. In 4.0, the environment averages 600 MB and the program average…

---

## [Trying to make a animation where it gradually grows and then shrinks but it bugs](https://discourse.processing.org/t/trying-to-make-a-animation-where-it-gradually-grows-and-then-shrinks-but-it-bugs/31690)

<div class="topic-metadata">

**Author:** [@Kenga123456](https://discourse.processing.org/u/Kenga123456)\
**Replies:** 3\
**Last updated:** [August 12, 2021, 8:20am UTC](https://discourse.processing.org/t/trying-to-make-a-animation-where-it-gradually-grows-and-then-shrinks-but-it-bugs/31690 "2021-08-12T08:20:54Z")

</div>

if (vision \< 150) { vision\_speed = 1; } if (vision \> 250) { vision\_speed = -1; } vision = vision + vision\_speed; //////////////////////////////////////////// The growing and shrinking par…

---

## [Can't use the original functions in processing 4.0's class?](https://discourse.processing.org/t/cant-use-the-original-functions-in-processing-4-0s-class/31694)

<div class="topic-metadata">

**Author:** [@LOOOOOOOOP](https://discourse.processing.org/u/LOOOOOOOOP)\
**Replies:** 2\
**Last updated:** [August 12, 2021, 7:06am UTC](https://discourse.processing.org/t/cant-use-the-original-functions-in-processing-4-0s-class/31694 "2021-08-12T07:06:41Z")

</div>

When I use rect(),or line() in classes, it works in processing 3. But I don’t know what is going on in processing 4. class t{ t(){} void test(){ rect(0,0,30,50); } } The function rect(int, int, int, int) do…

---

## [New Processing Website](https://discourse.processing.org/t/new-processing-website/31674)

<div class="topic-metadata">

**Author:** [@glv](https://discourse.processing.org/u/glv)\
**Replies:** 0\
**Last updated:** [August 10, 2021, 10:50pm UTC](https://discourse.processing.org/t/new-processing-website/31674 "2021-08-10T22:50:12Z")

</div>

Oh my! Update: And now it’s gone… back to original. Maybe they were testing… no spoilers from me. Keep on checking it! Something official: :)

---

## [Close the full screen second window through keyboard or through parent window?](https://discourse.processing.org/t/close-the-full-screen-second-window-through-keyboard-or-through-parent-window/10571)

<div class="topic-metadata">

**Author:** [@stan\_11](https://discourse.processing.org/u/stan_11)\
**Replies:** 3\
**Last updated:** [August 11, 2021, 8:55am UTC](https://discourse.processing.org/t/close-the-full-screen-second-window-through-keyboard-or-through-parent-window/10571 "2021-08-11T08:55:08Z")

</div>

Here is my code PWindow win; public void settings() { size(320, 240); } void setup() { surface.setLocation(20,20); //win = new PWindow(); } void draw() { background(255, 0, 0); fill(255); rect(10, 10…

---

## [Get-the-average-rgb-from-pixels (revisited)](https://discourse.processing.org/t/get-the-average-rgb-from-pixels-revisited/31661)

<div class="topic-metadata">

**Author:** [@paulstgeorge](https://discourse.processing.org/u/paulstgeorge)\
**Replies:** 4\
**Last updated:** [August 11, 2021, 12:48am UTC](https://discourse.processing.org/t/get-the-average-rgb-from-pixels-revisited/31661 "2021-08-11T00:48:25Z")

</div>

@GoToLoop answered this but which of the two methods is better? Is there a reason to change the int for each of the three RGB channels to color??? Both methods work, I just want to understand. get-the-average-rgb-from-…

---

## [Detect shapes split by intersecting lines](https://discourse.processing.org/t/detect-shapes-split-by-intersecting-lines/31641)

<div class="topic-metadata">

**Author:** [@hkjung](https://discourse.processing.org/u/hkjung)\
**Replies:** 4\
**Last updated:** [August 10, 2021, 6:47pm UTC](https://discourse.processing.org/t/detect-shapes-split-by-intersecting-lines/31641 "2021-08-10T18:47:00Z")

</div>

I want to detect separate shapes as lines split the canvas. I saved line intersection points in the list of PVectors, but don’t know how to connect points that complete split shapes separately. Here’s a sample image tha…

---

## [Processing for Android](https://discourse.processing.org/t/processing-for-android/31668)

<div class="topic-metadata">

**Author:** [@markcosmic](https://discourse.processing.org/u/markcosmic)\
**Replies:** 0\
**Last updated:** [August 10, 2021, 6:32pm UTC](https://discourse.processing.org/t/processing-for-android/31668 "2021-08-10T18:32:57Z")

</div>

Can anyone tell me when Processing for Android will be compatible with Processing 4? Thanks

---

## [How to copy the contents of a website](https://discourse.processing.org/t/how-to-copy-the-contents-of-a-website/31646)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 2\
**Last updated:** [August 10, 2021, 11:48am UTC](https://discourse.processing.org/t/how-to-copy-the-contents-of-a-website/31646 "2021-08-10T11:48:50Z")

</div>

Hi! I want to open a link and copy the contents of the website. I do not care if it is HTML code or if I just copy the contents with right click, the only thing I need is automation. I want to copy everything between St…

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

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