# Latest

**URL:** https://discourse.processing.org/latest.md?page=296

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

**Page:** 297

---

## [Direction of Particles in simple physics engine interact in weird ways](https://discourse.processing.org/t/direction-of-particles-in-simple-physics-engine-interact-in-weird-ways/24579)

<div class="topic-metadata">

**Author:** [@hensn](https://discourse.processing.org/u/hensn)\
**Replies:** 2\
**Last updated:** [October 14, 2020, 3:23pm UTC](https://discourse.processing.org/t/direction-of-particles-in-simple-physics-engine-interact-in-weird-ways/24579 "2020-10-14T15:23:58Z")

</div>

Hi guys, I’m playing around with the simple physics engine from this video: https://www.youtube.com/watch?v=BjoM9oKOAKY What I wanted to do is to have two particles that just move in one direction. To do this I create …

---

## [Hello i Need you Help pls](https://discourse.processing.org/t/hello-i-need-you-help-pls/24597)

<div class="topic-metadata">

**Author:** [@Magical](https://discourse.processing.org/u/Magical)\
**Replies:** 1\
**Last updated:** [October 14, 2020, 2:53pm UTC](https://discourse.processing.org/t/hello-i-need-you-help-pls/24597 "2020-10-14T14:53:55Z")

</div>

hello, I wanted to ask if you can help me make an app for my first anniversary … so maybe a game or something … pls Help me​:pleading\_face::heart:

---

## [Embed .txt file in a sketch](https://discourse.processing.org/t/embed-txt-file-in-a-sketch/24542)

<div class="topic-metadata">

**Author:** [@kurtis452](https://discourse.processing.org/u/kurtis452)\
**Replies:** 4\
**Last updated:** [October 14, 2020, 12:48pm UTC](https://discourse.processing.org/t/embed-txt-file-in-a-sketch/24542 "2020-10-14T12:48:10Z")

</div>

I’m making a simple desktop app which links to a few websites, but I also want it to be able to display a .txt file embedded in the sketch if possible. I’d prefer not to rebuild the document by doing loadlines(), but ins…

---

## [Making shape change color with keys](https://discourse.processing.org/t/making-shape-change-color-with-keys/24584)

<div class="topic-metadata">

**Author:** [@karbon](https://discourse.processing.org/u/karbon)\
**Replies:** 1\
**Last updated:** [October 14, 2020, 7:12am UTC](https://discourse.processing.org/t/making-shape-change-color-with-keys/24584 "2020-10-14T07:12:27Z")

</div>

I am coding for an assignment and I am having a hard time. I want to make a shape, then particles, change between red. yellow and blue by hitting keys. I can’t tell what I’m doing wrong. Please help! float offset =180; …

---

## [Image Coordinate Detecter for Processing](https://discourse.processing.org/t/image-coordinate-detecter-for-processing/24586)

<div class="topic-metadata">

**Author:** [@charmypatel](https://discourse.processing.org/u/charmypatel)\
**Replies:** 1\
**Last updated:** [October 14, 2020, 6:50am UTC](https://discourse.processing.org/t/image-coordinate-detecter-for-processing/24586 "2020-10-14T06:50:58Z")

</div>

There are tools on the web where you can submit a picture and the website will detect ‘points’ and outline your image so you can use them for the canvas HTML tag to draw animation. Is there any type of tool like this for…

---

## [Create a image with hyperlink](https://discourse.processing.org/t/create-a-image-with-hyperlink/24582)

<div class="topic-metadata">

**Author:** [@robocopper](https://discourse.processing.org/u/robocopper)\
**Replies:** 2\
**Last updated:** [October 14, 2020, 2:41am UTC](https://discourse.processing.org/t/create-a-image-with-hyperlink/24582 "2020-10-14T02:41:46Z")

</div>

Hello everyone! I would like to know if it is possible to create an image (as in loadImage() function) that is a link to an URL. I looked at the reference section, other questions, googled it, and found nothing about it.…

---

## [Help, how to change the size](https://discourse.processing.org/t/help-how-to-change-the-size/24517)

<div class="topic-metadata">

**Author:** [@Ellie98](https://discourse.processing.org/u/Ellie98)\
**Replies:** 7\
**Last updated:** [October 13, 2020, 3:49pm UTC](https://discourse.processing.org/t/help-how-to-change-the-size/24517 "2020-10-13T15:49:25Z")

</div>

Hello, how do I make that the size of the green square gets bigger if I go up with the mouse and the red one gets smaller at the same time and if I go down with the mouse that the green one gets smaller and the red one …

---

## [Memory leak in PGraphics](https://discourse.processing.org/t/memory-leak-in-pgraphics/24500)

<div class="topic-metadata">

**Author:** [@NullPointer](https://discourse.processing.org/u/NullPointer)\
**Replies:** 10\
**Last updated:** [October 13, 2020, 6:48pm UTC](https://discourse.processing.org/t/memory-leak-in-pgraphics/24500 "2020-10-13T18:48:02Z")

</div>

Hi, I am working on a scientific visualization project for my degree and it requires us to draw many circles to the screen representing trees. This we did via the following code which runs as a thread and updates its PGr…

---

## [Screen flickering when running Particle system](https://discourse.processing.org/t/screen-flickering-when-running-particle-system/24540)

<div class="topic-metadata">

**Author:** [@Kachow095](https://discourse.processing.org/u/Kachow095)\
**Replies:** 1\
**Last updated:** [October 13, 2020, 6:33pm UTC](https://discourse.processing.org/t/screen-flickering-when-running-particle-system/24540 "2020-10-13T18:33:10Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I was coding a particle system that spews out fountains. I have been working to make the program more efficient, but now it starts flickering wh…

---

## [Box fixed in front of camera Processing](https://discourse.processing.org/t/box-fixed-in-front-of-camera-processing/24562)

<div class="topic-metadata">

**Author:** [@Faceless](https://discourse.processing.org/u/Faceless)\
**Replies:** 1\
**Last updated:** [October 13, 2020, 2:23pm UTC](https://discourse.processing.org/t/box-fixed-in-front-of-camera-processing/24562 "2020-10-13T14:23:45Z")

</div>

Hey, is there any way to fix a box in front of the camera? Im using this to move the camera with the mouse: rotationAngle = map(mouseX, 0, width, 0, TWO\_PI); elevationAngle = map(mouseY, 0, height, 0, PI); …

---

## [Randomly coloring x amount of tiles within a grid](https://discourse.processing.org/t/randomly-coloring-x-amount-of-tiles-within-a-grid/24549)

<div class="topic-metadata">

**Author:** [@arizona440](https://discourse.processing.org/u/arizona440)\
**Replies:** 7\
**Last updated:** [October 13, 2020, 12:02pm UTC](https://discourse.processing.org/t/randomly-coloring-x-amount-of-tiles-within-a-grid/24549 "2020-10-13T12:02:24Z")

</div>

Hey guys, Im working on a project for school where I have to randomly generate x amount of colored tiles within a grid. In my current code every tile in the grid randomly receives a red or blue color. What do I need to…

---

## [Help me make bullets for a game I'm trying to make](https://discourse.processing.org/t/help-me-make-bullets-for-a-game-im-trying-to-make/24555)

<div class="topic-metadata">

**Author:** [@Cal\_codes](https://discourse.processing.org/u/Cal_codes)\
**Replies:** 7\
**Last updated:** [October 13, 2020, 11:46am UTC](https://discourse.processing.org/t/help-me-make-bullets-for-a-game-im-trying-to-make/24555 "2020-10-13T11:46:19Z")

</div>

Hi! I’m trying to build a retro top down arena shooter game and I’m struggling to get shooting to work. What I want is to have an ArrayList of bullets that can be shot using a keypressed fucntion and that are shot in th…

---

## [How to make an ArrayList object "blink" without drawing the background](https://discourse.processing.org/t/how-to-make-an-arraylist-object-blink-without-drawing-the-background/24534)

<div class="topic-metadata">

**Author:** [@marianalimoes](https://discourse.processing.org/u/marianalimoes)\
**Replies:** 8\
**Last updated:** [October 13, 2020, 8:03am UTC](https://discourse.processing.org/t/how-to-make-an-arraylist-object-blink-without-drawing-the-background/24534 "2020-10-13T08:03:36Z")

</div>

Hello. I have this code I can’t solve. I’m using two arraylists that draw balls in a random location. The first one, “Bola” (= “Ball” in Portuguese), is random colored and placed on canvas with a timer. The second one, …

---

## [Click and point game with array - troubleshooting](https://discourse.processing.org/t/click-and-point-game-with-array-troubleshooting/24504)

<div class="topic-metadata">

**Author:** [@vlafortune](https://discourse.processing.org/u/vlafortune)\
**Replies:** 7\
**Last updated:** [October 12, 2020, 9:58pm UTC](https://discourse.processing.org/t/click-and-point-game-with-array-troubleshooting/24504 "2020-10-12T21:58:20Z")

</div>

Hi, I’m making a click and point type of game. I want to sort fishes by their color. I want to remove the blue fishes from the big aquarium and “store” them for further use in the small aquarium. I putting here what I’…

---

## [New update. Version not compatible](https://discourse.processing.org/t/new-update-version-not-compatible/24526)

<div class="topic-metadata">

**Author:** [@IRIGIMA](https://discourse.processing.org/u/IRIGIMA)\
**Replies:** 3\
**Last updated:** [October 12, 2020, 9:51pm UTC](https://discourse.processing.org/t/new-update-version-not-compatible/24526 "2020-10-12T21:51:50Z")

</div>

Am now getting this error due to recent update. Can anyone simplify solution?? ASAP !! (Was all K prior)

---

## [Tinting a shape in p5js isn't working, how could I tint it then?](https://discourse.processing.org/t/tinting-a-shape-in-p5js-isnt-working-how-could-i-tint-it-then/24550)

<div class="topic-metadata">

**Author:** [@olaf000olaf](https://discourse.processing.org/u/olaf000olaf)\
**Replies:** 1\
**Last updated:** [October 12, 2020, 7:56pm UTC](https://discourse.processing.org/t/tinting-a-shape-in-p5js-isnt-working-how-could-i-tint-it-then/24550 "2020-10-12T19:56:17Z")

</div>

I did a little bit of processing and now in p5js I’m trying to tint a shape using tint(); but it won’t work, how should I tint it?

---

## [Can someone help me create an energy bar for a game that gets higher when clicked](https://discourse.processing.org/t/can-someone-help-me-create-an-energy-bar-for-a-game-that-gets-higher-when-clicked/24543)

<div class="topic-metadata">

**Author:** [@Cal\_codes](https://discourse.processing.org/u/Cal_codes)\
**Replies:** 3\
**Last updated:** [October 12, 2020, 4:07pm UTC](https://discourse.processing.org/t/can-someone-help-me-create-an-energy-bar-for-a-game-that-gets-higher-when-clicked/24543 "2020-10-12T16:07:10Z")

</div>

Hi guys! I’ve been trying to teach myself coding and I wanted to try to make an energy bar that goes up when its clicked instead of just immediately displaying the entire energy bar. This is the code I have so far. Th…

---

## [Simple Complex Math Class for Processing](https://discourse.processing.org/t/simple-complex-math-class-for-processing/24554)

<div class="topic-metadata">

**Author:** [@monkstone](https://discourse.processing.org/u/monkstone)\
**Replies:** 0\
**Last updated:** [October 12, 2020, 4:01pm UTC](https://discourse.processing.org/t/simple-complex-math-class-for-processing/24554 "2020-10-12T16:01:50Z")

</div>

Previously I presented some Newton Fractal ruby-processing sketches. Here is an example using vanilla processing:- int imgx = 512; int imgy = 512; JComplex z; JComplex COMPLEX = new JComplex(1.0E-6, 1.0E-6); PImage img;…

---

## [Do these seem right? can't seem to make it work](https://discourse.processing.org/t/do-these-seem-right-cant-seem-to-make-it-work/24544)

<div class="topic-metadata">

**Author:** [@thughes](https://discourse.processing.org/u/thughes)\
**Replies:** 4\
**Last updated:** [October 12, 2020, 3:24pm UTC](https://discourse.processing.org/t/do-these-seem-right-cant-seem-to-make-it-work/24544 "2020-10-12T15:24:35Z")

</div>

Another if statement will check to see if the Blue and Red ball are within a certain distance of each other. This function will check to see if the x and y position of the BLUE ball is less than 20 from the x and y pos…

---

## [P5.js 2020 Showcase is Open for Submissions!](https://discourse.processing.org/t/p5-js-2020-showcase-is-open-for-submissions/22285)

<div class="topic-metadata">

**Author:** [@connieliu](https://discourse.processing.org/u/connieliu)\
**Replies:** 1\
**Last updated:** [October 12, 2020, 3:05pm UTC](https://discourse.processing.org/t/p5-js-2020-showcase-is-open-for-submissions/22285 "2020-10-12T15:05:07Z")

</div>

The p5.js 2020 showcase is open for submissions until August 3rd! #p5showcase Check out the submission form here: https://bit.ly/p5showcase and the showcase page here: https://p5js.org/showcase/ If you’d like to create…

---

## [Calculating with fractions](https://discourse.processing.org/t/calculating-with-fractions/24546)

<div class="topic-metadata">

**Author:** [@Superkid](https://discourse.processing.org/u/Superkid)\
**Replies:** 2\
**Last updated:** [October 12, 2020, 3:02pm UTC](https://discourse.processing.org/t/calculating-with-fractions/24546 "2020-10-12T15:02:56Z")

</div>

Hey! I got a problem in Processing. i want to define a variable to be 1/60. But if I look in the Console it always says, that the variable is 0. Last time I tried this (about one year ago) it worked perfectly. How do i …

---

## [What is the xRed position?](https://discourse.processing.org/t/what-is-the-xred-position/24527)

<div class="topic-metadata">

**Author:** [@thughes](https://discourse.processing.org/u/thughes)\
**Replies:** 3\
**Last updated:** [October 12, 2020, 12:34pm UTC](https://discourse.processing.org/t/what-is-the-xred-position/24527 "2020-10-12T12:34:22Z")

</div>

I’m a little confused on the xRed position?!?! xRed and yRed position for the RED ball . Remember this should be set to x anywhere and y will be a random between 200 and 400. The ball will be width and height of 3…

---

## [Wired Pixel Thing on Android Mode](https://discourse.processing.org/t/wired-pixel-thing-on-android-mode/24178)

<div class="topic-metadata">

**Author:** [@RyanUnicoen](https://discourse.processing.org/u/RyanUnicoen)\
**Replies:** 12\
**Last updated:** [October 12, 2020, 12:17pm UTC](https://discourse.processing.org/t/wired-pixel-thing-on-android-mode/24178 "2020-10-12T12:17:19Z")

</div>

I was writing an android watch face but when I run it, this happened. FATAL EXCEPTION: main Process: processing.test.star, PID: 27171 java.lang.RuntimeException: The pixels array is not available in this renderer wit…

---

## [How would I explore and identify random crashes](https://discourse.processing.org/t/how-would-i-explore-and-identify-random-crashes/24531)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 3\
**Last updated:** [October 12, 2020, 8:23am UTC](https://discourse.processing.org/t/how-would-i-explore-and-identify-random-crashes/24531 "2020-10-12T08:23:27Z")

</div>

I have a program which is rather large, and sometime with no warning it will just freeze. Now it doesnt crash with a spinning cursor which is the usual, no it just freezes, I can close it without any problem but cannot c…

---

## [Different background, Different item by mousePressed](https://discourse.processing.org/t/different-background-different-item-by-mousepressed/24530)

<div class="topic-metadata">

**Author:** [@fisher](https://discourse.processing.org/u/fisher)\
**Replies:** 1\
**Last updated:** [October 12, 2020, 7:15am UTC](https://discourse.processing.org/t/different-background-different-item-by-mousepressed/24530 "2020-10-12T07:15:05Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I’m making day/night animation where I use “mousePressed” on locating the sun on the blue sky according to the mouseX,mouseY. When the key ‘n’ i…

---

## [Code works correctly in p5, but translation to Processing outputs weird results](https://discourse.processing.org/t/code-works-correctly-in-p5-but-translation-to-processing-outputs-weird-results/24508)

<div class="topic-metadata">

**Author:** [@pablohotsauce](https://discourse.processing.org/u/pablohotsauce)\
**Replies:** 3\
**Last updated:** [October 12, 2020, 6:39am UTC](https://discourse.processing.org/t/code-works-correctly-in-p5-but-translation-to-processing-outputs-weird-results/24508 "2020-10-12T06:39:06Z")

</div>

I threw something together in p5, and it works as intended. Then I tried to translate it to (Java) Processing, and although it runs, the results are weird. I’ve checked everything I can think of, and I’m not sure what th…

---

## [How to detect trackpad actions like pinch, scroll, three finger actions etc](https://discourse.processing.org/t/how-to-detect-trackpad-actions-like-pinch-scroll-three-finger-actions-etc/23646)

<div class="topic-metadata">

**Author:** [@grege2](https://discourse.processing.org/u/grege2)\
**Replies:** 2\
**Last updated:** [October 12, 2020, 3:20am UTC](https://discourse.processing.org/t/how-to-detect-trackpad-actions-like-pinch-scroll-three-finger-actions-etc/23646 "2020-10-12T03:20:30Z")

</div>

Hi all, I recently had a need to detect a two-finger “pinch” action, on a Mac in p5.js, and had some trouble finding info. I found this … https://medium.com/@auchenberg/detecting-multi-touch-trackpad-gestures-in-javas…

---

## [Query on how effect on processing book created](https://discourse.processing.org/t/query-on-how-effect-on-processing-book-created/24522)

<div class="topic-metadata">

**Author:** [@dragodiv](https://discourse.processing.org/u/dragodiv)\
**Replies:** 2\
**Last updated:** [October 11, 2020, 6:38pm UTC](https://discourse.processing.org/t/query-on-how-effect-on-processing-book-created/24522 "2020-10-11T18:38:59Z")

</div>

Hi How is the effect on below page achieved ? http://learningprocessing.com/ Had checked on the javascript part of source, but didnt understand how it was achieved and if it could be done on processing?

---

## [Using keyboard events](https://discourse.processing.org/t/using-keyboard-events/24503)

<div class="topic-metadata">

**Author:** [@thughes](https://discourse.processing.org/u/thughes)\
**Replies:** 5\
**Last updated:** [October 11, 2020, 7:02am UTC](https://discourse.processing.org/t/using-keyboard-events/24503 "2020-10-11T07:02:11Z")

</div>

Advice please: public void change This function will increment the y2 of the 2nd ellipse by 2. Use the short cut operator for the assignment. If the y2 is greater than height, reset the y2 to 30. this is what i have so…

---

## [P2D/P3D sketches won’t start on Ubuntu 20.04](https://discourse.processing.org/t/p2d-p3d-sketches-won-t-start-on-ubuntu-20-04/22186)

<div class="topic-metadata">

**Author:** [@villares](https://discourse.processing.org/u/villares)\
**Replies:** 7\
**Last updated:** [October 11, 2020, 4:50pm UTC](https://discourse.processing.org/t/p2d-p3d-sketches-won-t-start-on-ubuntu-20-04/22186 "2020-10-11T16:50:35Z")

</div>

This looks similar to an older issue: https://discourse.processing.org/t/solved-p2d-p3d-sketches-wont-start-on-fresh-ubuntu-18-04-installation/3568 Profile GL4bc is not available on X11GraphicsDevice\[type .x11, connect…

[Previous page](https://discourse.processing.org/latest.md?page=295)

[Next page](https://discourse.processing.org/latest.md?page=297)
