# Processing

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

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

**Page:** 171

---

## [Collision detection Ball](https://discourse.processing.org/t/collision-detection-ball/25210)

<div class="topic-metadata">

**Author:** [@MitchMitch](https://discourse.processing.org/u/MitchMitch)\
**Replies:** 44\
**Last updated:** [November 15, 2020, 8:51pm UTC](https://discourse.processing.org/t/collision-detection-ball/25210 "2020-11-15T20:51:51Z")

</div>

import static javax.swing.JOptionPane.showMessageDialog; import java.util.Random; Random rand = new Random(); float x = 450; float Ball = 0; int RandomSpawnWidth; float speedBall = 3; int score = 0; float speedPl…

---

## [How to check a function for every single array](https://discourse.processing.org/t/how-to-check-a-function-for-every-single-array/25444)

<div class="topic-metadata">

**Author:** [@tea](https://discourse.processing.org/u/tea)\
**Replies:** 3\
**Last updated:** [November 15, 2020, 8:31pm UTC](https://discourse.processing.org/t/how-to-check-a-function-for-every-single-array/25444 "2020-11-15T20:31:31Z")

</div>

So I’m trying to make a platformer game where the platform is created in the set up in an array, and then I check the collision of the character and the platform with another function, like so: In the setup: void setup…

---

## [I just studied user defined function, got some trouble](https://discourse.processing.org/t/i-just-studied-user-defined-function-got-some-trouble/25405)

<div class="topic-metadata">

**Author:** [@mengtong](https://discourse.processing.org/u/mengtong)\
**Replies:** 17\
**Last updated:** [November 15, 2020, 7:59pm UTC](https://discourse.processing.org/t/i-just-studied-user-defined-function-got-some-trouble/25405 "2020-11-15T19:59:06Z")

</div>

I am trying to draw a picture like this. here is my code. I just start it. void setup() { size(800, 800); noStroke(); //No black outline around the circles } void draw() { final int CIRCLE\_SIZE = 20; final…

---

## [Creating a Pong using tutorials](https://discourse.processing.org/t/creating-a-pong-using-tutorials/25428)

<div class="topic-metadata">

**Author:** [@GalactusBR](https://discourse.processing.org/u/GalactusBR)\
**Replies:** 5\
**Last updated:** [November 15, 2020, 7:48pm UTC](https://discourse.processing.org/t/creating-a-pong-using-tutorials/25428 "2020-11-15T19:48:41Z")

</div>

homework policy \* asking questions I need help creating a Pong game that have Points system Victory and Loss condition “Ball” with physics simulation 2 player option 1 player option with a CPU Menu …

---

## [I need help with a code (timer)](https://discourse.processing.org/t/i-need-help-with-a-code-timer/25377)

<div class="topic-metadata">

**Author:** [@ruben89](https://discourse.processing.org/u/ruben89)\
**Replies:** 36\
**Last updated:** [November 15, 2020, 5:17pm UTC](https://discourse.processing.org/t/i-need-help-with-a-code-timer/25377 "2020-11-15T17:17:21Z")

</div>

I have this code and I want to make the square disappear when clicking a key and two seconds after clicking it, the square reappears in another position. Thanks! int cuadrado=60; float recX, recY; void setup() { fu…

---

## [Surface and length](https://discourse.processing.org/t/surface-and-length/25394)

<div class="topic-metadata">

**Author:** [@ala](https://discourse.processing.org/u/ala)\
**Replies:** 6\
**Last updated:** [November 15, 2020, 6:15am UTC](https://discourse.processing.org/t/surface-and-length/25394 "2020-11-15T06:15:43Z")

</div>

Hello, I have a problem. I have to write a program for designating the area and length of the edge of a color spot at the click of a mouse. I know that i must load a picture and and that the actions are after a click, …

---

## [Way to export regular executable files with Processing.js](https://discourse.processing.org/t/way-to-export-regular-executable-files-with-processing-js/25370)

<div class="topic-metadata">

**Author:** [@papaboo](https://discourse.processing.org/u/papaboo)\
**Replies:** 4\
**Last updated:** [November 15, 2020, 5:40am UTC](https://discourse.processing.org/t/way-to-export-regular-executable-files-with-processing-js/25370 "2020-11-15T05:40:49Z")

</div>

I know that Processing.js is no longer being developed but I must export my sketch as more like a regular executable program and less like an applet. First problem is what the system sees the sketch as on Windows: when …

---

## [Playing videos alternately](https://discourse.processing.org/t/playing-videos-alternately/25432)

<div class="topic-metadata">

**Author:** [@Johnny](https://discourse.processing.org/u/Johnny)\
**Replies:** 1\
**Last updated:** [November 15, 2020, 4:00am UTC](https://discourse.processing.org/t/playing-videos-alternately/25432 "2020-11-15T04:00:38Z")

</div>

Hello! I am trying to play two videos alternately depending on the distance measurement of the ultrasonic sensor. This is my first time using both Arduino and processing, and I’m lost in setting values properly. I don’t …

---

## [How can I rotate the Sketch in 3D while its drawing](https://discourse.processing.org/t/how-can-i-rotate-the-sketch-in-3d-while-its-drawing/25389)

<div class="topic-metadata">

**Author:** [@ssdesign](https://discourse.processing.org/u/ssdesign)\
**Replies:** 8\
**Last updated:** [November 15, 2020, 12:32am UTC](https://discourse.processing.org/t/how-can-i-rotate-the-sketch-in-3d-while-its-drawing/25389 "2020-11-15T00:32:00Z")

</div>

Hi, I am trying to draw points in 3D space and while the sketch draws it, I want to continuously rotate the sketch so that I can view the dots in 3D space. Somehow I am not able to figure out how to do this. Here is m…

---

## [Sound library error](https://discourse.processing.org/t/sound-library-error/25424)

<div class="topic-metadata">

**Author:** [@joe\_processing](https://discourse.processing.org/u/joe_processing)\
**Replies:** 9\
**Last updated:** [November 14, 2020, 9:57pm UTC](https://discourse.processing.org/t/sound-library-error/25424 "2020-11-14T21:57:41Z")

</div>

Hi there! i have a problem in import sound to a code I wrote. i know there a lot of topics around the network on this issue but non of them helped me. some notes: mac. processing, latest edition. download processing…

---

## [Motorbike contructor help](https://discourse.processing.org/t/motorbike-contructor-help/25421)

<div class="topic-metadata">

**Author:** [@TheGullible1](https://discourse.processing.org/u/TheGullible1)\
**Replies:** 1\
**Last updated:** [November 14, 2020, 2:37pm UTC](https://discourse.processing.org/t/motorbike-contructor-help/25421 "2020-11-14T14:37:55Z")

</div>

im trying to add a constructor to my code and I think I don’t understand how to do it my code: Motorbike redBike; Motorbike blueBike; void setup() //called only once at the start { size(500,100); Motorbike(30, RE…

---

## [How to organise git repository](https://discourse.processing.org/t/how-to-organise-git-repository/25393)

<div class="topic-metadata">

**Author:** [@enniofranco](https://discourse.processing.org/u/enniofranco)\
**Replies:** 4\
**Last updated:** [November 14, 2020, 10:02am UTC](https://discourse.processing.org/t/how-to-organise-git-repository/25393 "2020-11-14T10:02:37Z")

</div>

Hi all, I have seen git being used in the context of a single project. But my processing sketches are a collection of lots of small projects. With that in mind, could anyone help me with suggestions on how to structur…

---

## [java.lang.RuntimeException Java heap space error](https://discourse.processing.org/t/java-lang-runtimeexception-java-heap-space-error/25351)

<div class="topic-metadata">

**Author:** [@ahmed](https://discourse.processing.org/u/ahmed)\
**Replies:** 1\
**Last updated:** [November 14, 2020, 8:59am UTC](https://discourse.processing.org/t/java-lang-runtimeexception-java-heap-space-error/25351 "2020-11-14T08:59:20Z")

</div>

I am trying to import STL CAD file in processing but getting an error java.lang.outofmemoryerror java heap space. how to solve this issue ? i have increased my memory in Preferences tab to 10GB but issue still persist. …

---

## [I need help with my code(scale problem)](https://discourse.processing.org/t/i-need-help-with-my-code-scale-problem/25388)

<div class="topic-metadata">

**Author:** [@Fungineer1](https://discourse.processing.org/u/Fungineer1)\
**Replies:** 1\
**Last updated:** [November 14, 2020, 8:06am UTC](https://discourse.processing.org/t/i-need-help-with-my-code-scale-problem/25388 "2020-11-14T08:06:04Z")

</div>

please format code with \</\> button \* homework policy \* asking questions So I was working on my code, which is to draw three bees, and each time they bounce on to wall or hive, they would bounce back(aka change their …

---

## [Processing.js with java and html things](https://discourse.processing.org/t/processing-js-with-java-and-html-things/25409)

<div class="topic-metadata">

**Author:** [@candydope](https://discourse.processing.org/u/candydope)\
**Replies:** 1\
**Last updated:** [November 14, 2020, 7:05am UTC](https://discourse.processing.org/t/processing-js-with-java-and-html-things/25409 "2020-11-14T07:05:31Z")

</div>

referencing this page, (https://forum.processing.org/two/discussion/6179/why-does-not-it-run-clipboard) I made a project which can create short text(string) and copy the text to clipboard. I’m trying to post this sketch…

---

## [.JAVA source file operating in processing](https://discourse.processing.org/t/java-source-file-operating-in-processing/25402)

<div class="topic-metadata">

**Author:** [@Tomabi](https://discourse.processing.org/u/Tomabi)\
**Replies:** 2\
**Last updated:** [November 13, 2020, 11:17pm UTC](https://discourse.processing.org/t/java-source-file-operating-in-processing/25402 "2020-11-13T23:17:40Z")

</div>

Hello everyone, I am a newbie Processing… I wanna open a source file made by processing and that is based on JAVA. Link: https://bitbucket.org/hues/fast-fluid-dynamics/src/master/ I’ve tried to operate this code, but…

---

## [ControlP5 examples for separate control frames not working](https://discourse.processing.org/t/controlp5-examples-for-separate-control-frames-not-working/25404)

<div class="topic-metadata">

**Author:** [@snaders](https://discourse.processing.org/u/snaders)\
**Replies:** 2\
**Last updated:** [November 13, 2020, 7:36pm UTC](https://discourse.processing.org/t/controlp5-examples-for-separate-control-frames-not-working/25404 "2020-11-13T19:36:56Z")

</div>

I’ve seen a lot of posts and links about controlP5, but I can’t seem to find an answer anywhere. Also there are a lot of dead links everywhere, including on the Github page of the controlP5 library itself. I have the la…

---

## [Trying to use boolean and if statement to do colour collision detection (Tron)](https://discourse.processing.org/t/trying-to-use-boolean-and-if-statement-to-do-colour-collision-detection-tron/25399)

<div class="topic-metadata">

**Author:** [@TheGullible1](https://discourse.processing.org/u/TheGullible1)\
**Replies:** 3\
**Last updated:** [November 13, 2020, 2:51pm UTC](https://discourse.processing.org/t/trying-to-use-boolean-and-if-statement-to-do-colour-collision-detection-tron/25399 "2020-11-13T14:51:40Z")

</div>

So i have created the tron light bike and now I want it that when it crashes it I want it maybe to reset and then go again. for this I’m using of a crash detection function using get to check the pixel colour, a crash ha…

---

## [Tron Light Cycle project I'm making](https://discourse.processing.org/t/tron-light-cycle-project-im-making/25398)

<div class="topic-metadata">

**Author:** [@TheGullible1](https://discourse.processing.org/u/TheGullible1)\
**Replies:** 1\
**Last updated:** [November 13, 2020, 12:38pm UTC](https://discourse.processing.org/t/tron-light-cycle-project-im-making/25398 "2020-11-13T12:38:16Z")

</div>

JAVA\*\* so im trying to move my point continuously when a key is pressed it will only move that direction. //arrow keys to draw float x,y; int speedY = 0; int speedX = 1; void setup(){ size(500,500); background(255,…

---

## [Visualizing Lyrics?](https://discourse.processing.org/t/visualizing-lyrics/25383)

<div class="topic-metadata">

**Author:** [@dgoren1](https://discourse.processing.org/u/dgoren1)\
**Replies:** 3\
**Last updated:** [November 13, 2020, 12:36pm UTC](https://discourse.processing.org/t/visualizing-lyrics/25383 "2020-11-13T12:36:51Z")

</div>

Hi all! I’m trying to write a program that displays the lyrics to a song one at a time. Currently, I’ve written the program to display one word at a time and control when each word is displayed using a conditional state…

---

## [Is it possible to save any data produced with sketch on web?](https://discourse.processing.org/t/is-it-possible-to-save-any-data-produced-with-sketch-on-web/25386)

<div class="topic-metadata">

**Author:** [@candydope](https://discourse.processing.org/u/candydope)\
**Replies:** 5\
**Last updated:** [November 13, 2020, 7:27am UTC](https://discourse.processing.org/t/is-it-possible-to-save-any-data-produced-with-sketch-on-web/25386 "2020-11-13T07:27:17Z")

</div>

hello, I’m newbie for coding. I use processing mostly for art projects. now I’m working on coding for my friend’s project which is about writing a poem with limited words on web site. I managed to make sketch which seem…

---

## [Running any processing program freezes macbook](https://discourse.processing.org/t/running-any-processing-program-freezes-macbook/25381)

<div class="topic-metadata">

**Author:** [@Grimtin10](https://discourse.processing.org/u/Grimtin10)\
**Replies:** 2\
**Last updated:** [November 13, 2020, 12:25am UTC](https://discourse.processing.org/t/running-any-processing-program-freezes-macbook/25381 "2020-11-13T00:25:05Z")

</div>

Specs: MacBook Pro MacOS Catalina 10.15.7 8 GB Memory Any processing program (even a blank program that just makes a window) freezes macbook causing it to run slowly only updating mouse smoothly. (updating all other …

---

## [Playing +6 Audio Files Simultaneously, Without Delay or Lag](https://discourse.processing.org/t/playing-6-audio-files-simultaneously-without-delay-or-lag/25034)

<div class="topic-metadata">

**Author:** [@dgoren1](https://discourse.processing.org/u/dgoren1)\
**Replies:** 2\
**Last updated:** [November 12, 2020, 11:00pm UTC](https://discourse.processing.org/t/playing-6-audio-files-simultaneously-without-delay-or-lag/25034 "2020-11-12T23:00:17Z")

</div>

Hello! Quick Question: I’m building a program that visualizes multiple audio files together at once. My program was working fine with just 3 audio files, but now that I’m loading and playing 7 audio files at once, the …

---

## [Click Image to Make Sound Play](https://discourse.processing.org/t/click-image-to-make-sound-play/24668)

<div class="topic-metadata">

**Author:** [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Replies:** 16\
**Last updated:** [November 12, 2020, 9:50pm UTC](https://discourse.processing.org/t/click-image-to-make-sound-play/24668 "2020-11-12T21:50:51Z")

</div>

I’m trying to add a mouse press event to an image which I think is possible since I’ve seen may questions posted about it on the forum. However I have an image of a play button. I want to use this image as a button to pl…

---

## [Change object direction when reaching edges](https://discourse.processing.org/t/change-object-direction-when-reaching-edges/24761)

<div class="topic-metadata">

**Author:** [@lukeltw](https://discourse.processing.org/u/lukeltw)\
**Replies:** 16\
**Last updated:** [November 12, 2020, 7:40pm UTC](https://discourse.processing.org/t/change-object-direction-when-reaching-edges/24761 "2020-11-12T19:40:06Z")

</div>

How can I change the direction of my image? As you know, a fish has a head, unlike a ball, each side could be its head, so when my fish reach the right side, I want to let them turn around, and now they are just moving…

---

## [Gradient along a row of squares](https://discourse.processing.org/t/gradient-along-a-row-of-squares/25355)

<div class="topic-metadata">

**Author:** [@Pugsofwar](https://discourse.processing.org/u/Pugsofwar)\
**Replies:** 2\
**Last updated:** [November 12, 2020, 9:24am UTC](https://discourse.processing.org/t/gradient-along-a-row-of-squares/25355 "2020-11-12T09:24:00Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I’m trying to create a row of squares and the gradient from white to black using a for loop but I am struggling with it

---

## [Please Help me for Text Function ! I am noob](https://discourse.processing.org/t/please-help-me-for-text-function-i-am-noob/25356)

<div class="topic-metadata">

**Author:** [@AzizurRahman](https://discourse.processing.org/u/AzizurRahman)\
**Replies:** 5\
**Last updated:** [November 12, 2020, 8:39am UTC](https://discourse.processing.org/t/please-help-me-for-text-function-i-am-noob/25356 "2020-11-12T08:39:46Z")

</div>

Hi everyone I am A beginner. I wrote this code so far. And I want make output texts in way so that it is has only 5 column inside the screen and when the output is bigger than width it goes to new line under the previous…

---

## [I am a beginner, please help!](https://discourse.processing.org/t/i-am-a-beginner-please-help/25336)

<div class="topic-metadata">

**Author:** [@AzizurRahman](https://discourse.processing.org/u/AzizurRahman)\
**Replies:** 12\
**Last updated:** [November 12, 2020, 2:01am UTC](https://discourse.processing.org/t/i-am-a-beginner-please-help/25336 "2020-11-12T02:01:06Z")

</div>

i need to make something in which when user inputs some string it got converted into another sets of string

---

## [Spout + open cv](https://discourse.processing.org/t/spout-open-cv/25353)

<div class="topic-metadata">

**Author:** [@Heidacraft](https://discourse.processing.org/u/Heidacraft)\
**Replies:** 0\
**Last updated:** [November 11, 2020, 7:31pm UTC](https://discourse.processing.org/t/spout-open-cv/25353 "2020-11-11T19:31:49Z")

</div>

Hi, im trying to send this interactive code from open cv, to arkaos with spout. I dont know what im doing wrong, but i can´t make it works. Thanks for the help :slight\_smile: import gab.opencv.; import processing.video…

---

## [How to import STL CAD file in processing](https://discourse.processing.org/t/how-to-import-stl-cad-file-in-processing/25343)

<div class="topic-metadata">

**Author:** [@ahmed](https://discourse.processing.org/u/ahmed)\
**Replies:** 2\
**Last updated:** [November 11, 2020, 4:08pm UTC](https://discourse.processing.org/t/how-to-import-stl-cad-file-in-processing/25343 "2020-11-11T16:08:34Z")

</div>

I have tried two example code to import CAD model STL binary file. But did not succeed so far. Following are example 1 and example 2. Example 1: PShape s; int p; String sub; Float X,Y,Z; float rotX, rotY, camX, camY,…

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

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