# Processing

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

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

**Page:** 58

---

## [Frogger - Need help with moving obstacles](https://discourse.processing.org/t/frogger-need-help-with-moving-obstacles/39874)

<div class="topic-metadata">

**Author:** [@kemne](https://discourse.processing.org/u/kemne)\
**Replies:** 1\
**Last updated:** [November 26, 2022, 2:00pm UTC](https://discourse.processing.org/t/frogger-need-help-with-moving-obstacles/39874 "2022-11-26T14:00:56Z")

</div>

Hi, I’m currently working on an assignment about creating the game Frogger. So I got my frog and the obstacles that my frog will need to avoid. Regardings the movement of my obstacles, the requirement is that I need to …

---

## [Add sound instead microphone](https://discourse.processing.org/t/add-sound-instead-microphone/39880)

<div class="topic-metadata">

**Author:** [@vrtx](https://discourse.processing.org/u/vrtx)\
**Replies:** 2\
**Last updated:** [November 26, 2022, 10:21am UTC](https://discourse.processing.org/t/add-sound-instead-microphone/39880 "2022-11-26T10:21:33Z")

</div>

Hi there, I am here again… Learning, Tks to all of you! I found a code exemple and a have change it adding my images and resizing it, resizing as a tool to manage my picture and feet the window.and add some ellipse on …

---

## [NullPointerException by creating an object](https://discourse.processing.org/t/nullpointerexception-by-creating-an-object/39876)

<div class="topic-metadata">

**Author:** [@Exartyss](https://discourse.processing.org/u/Exartyss)\
**Replies:** 4\
**Last updated:** [November 26, 2022, 7:35am UTC](https://discourse.processing.org/t/nullpointerexception-by-creating-an-object/39876 "2022-11-26T07:35:24Z")

</div>

Hello ! I wrote a program in which I created a class called Ro with objects : circles who goes on a random X position But by running the program it craches. It writes " NullPointerException" and “c\[i++\] = new Ro(width1…

---

## [Beginner Needs help with Generative art](https://discourse.processing.org/t/beginner-needs-help-with-generative-art/39858)

<div class="topic-metadata">

**Author:** [@WingedOS](https://discourse.processing.org/u/WingedOS)\
**Replies:** 6\
**Last updated:** [November 26, 2022, 7:22am UTC](https://discourse.processing.org/t/beginner-needs-help-with-generative-art/39858 "2022-11-26T07:22:49Z")

</div>

Hello! I’m a beginner at coding and making art through technology. I watch the coding train to learn but I also like to experiment with existing code made by the community. Here, I wanted to make art, and Generate\_me …

---

## [Issues with loading fonts with CreateFonts](https://discourse.processing.org/t/issues-with-loading-fonts-with-createfonts/39862)

<div class="topic-metadata">

**Author:** [@bardo](https://discourse.processing.org/u/bardo)\
**Replies:** 11\
**Last updated:** [November 26, 2022, 12:54am UTC](https://discourse.processing.org/t/issues-with-loading-fonts-with-createfonts/39862 "2022-11-26T00:54:29Z")

</div>

Hi there, I am having issues loading fonts that I have installed on my Windows fonts folder . The message that I get every time is " “PPEiko-Medium” is not available, so another font will be used. Use PFont.list() to …

---

## [How can i capture face recognition image?](https://discourse.processing.org/t/how-can-i-capture-face-recognition-image/39869)

<div class="topic-metadata">

**Author:** [@chaotic.rabbit](https://discourse.processing.org/u/chaotic.rabbit)\
**Replies:** 1\
**Last updated:** [November 25, 2022, 4:36pm UTC](https://discourse.processing.org/t/how-can-i-capture-face-recognition-image/39869 "2022-11-25T16:36:53Z")

</div>

Hi, I have managed to set up a live video cam in my code and I used OpenCV for face detection. Ellipses are drawn on detected faces. Now how can I take that ellipse and display a still image of that when I press enter? I…

---

## [Processing3 problems with using a variable in draw and thread](https://discourse.processing.org/t/processing3-problems-with-using-a-variable-in-draw-and-thread/39856)

<div class="topic-metadata">

**Author:** [@t00cg](https://discourse.processing.org/u/t00cg)\
**Replies:** 4\
**Last updated:** [November 24, 2022, 6:19pm UTC](https://discourse.processing.org/t/processing3-problems-with-using-a-variable-in-draw-and-thread/39856 "2022-11-24T18:19:09Z")

</div>

hi there in my opinion, x should be counted till 20 and then reseted in the thread. but it is not happening. can someone help me? thanks for any help t00cg public int x = 0; void setup() { thread("threadcode");…

---

## [Error — Missing operator, semicolon, or ‘}’ near ‘setup’?](https://discourse.processing.org/t/error-missing-operator-semicolon-or-near-setup/39845)

<div class="topic-metadata">

**Author:** [@vrtx](https://discourse.processing.org/u/vrtx)\
**Replies:** 7\
**Last updated:** [November 24, 2022, 5:30pm UTC](https://discourse.processing.org/t/error-missing-operator-semicolon-or-near-setup/39845 "2022-11-24T17:30:58Z")

</div>

i’ve being days trying to solve this error… Erro - Missing operator, semicolon, or ‘}’ near ‘setup’? .Any help, please?! import ddf.minim.\*; import ddf.minim.analysis.\*; import ddf.minim.effects.\*; import ddf.minim.si…

---

## [Why do I need the IF when using two movies](https://discourse.processing.org/t/why-do-i-need-the-if-when-using-two-movies/39846)

<div class="topic-metadata">

**Author:** [@illus](https://discourse.processing.org/u/illus)\
**Replies:** 5\
**Last updated:** [November 24, 2022, 4:49pm UTC](https://discourse.processing.org/t/why-do-i-need-the-if-when-using-two-movies/39846 "2022-11-24T16:49:37Z")

</div>

Below is a direct copy from the processing reference guide. I’m sure it will work, but I’m pretty new here, so I would like to understand why I need the if statement in the movieEvent. Basically why can’t this be just m…

---

## [Can you help me making this game with codes](https://discourse.processing.org/t/can-you-help-me-making-this-game-with-codes/39849)

<div class="topic-metadata">

**Author:** [@processinglearner](https://discourse.processing.org/u/processinglearner)\
**Replies:** 4\
**Last updated:** [November 24, 2022, 11:26am UTC](https://discourse.processing.org/t/can-you-help-me-making-this-game-with-codes/39849 "2022-11-24T11:26:26Z")

</div>

Simulate two numbers of balls with a certain radius both colliding with the 4 sides of the screen and colliding with the balls themselves. At the moment of collision, the balls must move in the opposite direction. A prog…

---

## [Cloud of random letters](https://discourse.processing.org/t/cloud-of-random-letters/39837)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 19\
**Last updated:** [November 24, 2022, 8:45am UTC](https://discourse.processing.org/t/cloud-of-random-letters/39837 "2022-11-24T08:45:20Z")

</div>

Hi there I have done this chart with letters but what I really want yo do its a cloud with hundred of letters disorganized around the screen. How could I do something like that? Thanks size(1000,1000); background(255)…

---

## [Ensemble of points with noise](https://discourse.processing.org/t/ensemble-of-points-with-noise/39842)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 1\
**Last updated:** [November 24, 2022, 12:58am UTC](https://discourse.processing.org/t/ensemble-of-points-with-noise/39842 "2022-11-24T00:58:11Z")

</div>

Hi there I am using noise function as a beguinner and I would like to make this group of points bigger, beyond the size limits of the screen. Changing number 1000 here and there does not work, so could you please tell m…

---

## [Error - Missing “)”](https://discourse.processing.org/t/error-missing/39841)

<div class="topic-metadata">

**Author:** [@Imerso](https://discourse.processing.org/u/Imerso)\
**Replies:** 5\
**Last updated:** [November 23, 2022, 9:00pm UTC](https://discourse.processing.org/t/error-missing/39841 "2022-11-23T21:00:06Z")

</div>

Hello. I am newbie in programming. I’m trying to learn to use it in my work in photography and visual arts. I’m trying to run a code but it always gives Error - Missing “)” in the parts that I’ll put below and I don’t kn…

---

## [Multiple page PDF and draw to screen?](https://discourse.processing.org/t/multiple-page-pdf-and-draw-to-screen/3719)

<div class="topic-metadata">

**Author:** [@stirman](https://discourse.processing.org/u/stirman)\
**Replies:** 8\
**Last updated:** [November 23, 2022, 5:04pm UTC](https://discourse.processing.org/t/multiple-page-pdf-and-draw-to-screen/3719 "2022-11-23T17:04:10Z")

</div>

Is it possible to render a drawing to a multiple page PDF and draw the image to the screen? I can do either or, obviously, but the combination errors out on this line in the draw loop… PGraphicsPDF pdf = (PGraphicsPDF)…

---

## [Collision between rectangles](https://discourse.processing.org/t/collision-between-rectangles/39834)

<div class="topic-metadata">

**Author:** [@turke1034](https://discourse.processing.org/u/turke1034)\
**Replies:** 4\
**Last updated:** [November 23, 2022, 2:51am UTC](https://discourse.processing.org/t/collision-between-rectangles/39834 "2022-11-23T02:51:04Z")

</div>

I am trying to make collision between rectangles in my game. The player can move with W, A, S, D and there are ‘blocks’ that the player is supposed to collide with. I’m able to make it so the player can collide normally …

---

## [Websockets Library Issues (WebsocketClient constructor)](https://discourse.processing.org/t/websockets-library-issues-websocketclient-constructor/39823)

<div class="topic-metadata">

**Author:** [@Mattyjak](https://discourse.processing.org/u/Mattyjak)\
**Replies:** 5\
**Last updated:** [November 23, 2022, 1:29am UTC](https://discourse.processing.org/t/websockets-library-issues-websocketclient-constructor/39823 "2022-11-23T01:29:49Z")

</div>

Hello guys! I’m having some issue with the websockets library. In the “docs” (aka the github repo) the WebsocketClient class has several different constructor forms. The main one I’m trying to use, is the primary form: …

---

## [Text random position](https://discourse.processing.org/t/text-random-position/39571)

<div class="topic-metadata">

**Author:** [@Moonshiner](https://discourse.processing.org/u/Moonshiner)\
**Replies:** 2\
**Last updated:** [November 22, 2022, 7:37pm UTC](https://discourse.processing.org/t/text-random-position/39571 "2022-11-22T19:37:02Z")

</div>

Hey guys, I’m new to processing. I need a text at a random Position. But text(“Hello”,random(1,500)); isn’t allowed. How do i do that ? Thank you in Advance

---

## [Millis . How to calculate 80hz in millis%](https://discourse.processing.org/t/millis-how-to-calculate-80hz-in-millis/39774)

<div class="topic-metadata">

**Author:** [@vrtx](https://discourse.processing.org/u/vrtx)\
**Replies:** 13\
**Last updated:** [November 22, 2022, 6:30pm UTC](https://discourse.processing.org/t/millis-how-to-calculate-80hz-in-millis/39774 "2022-11-22T18:30:26Z")

</div>

Hi there… I have this exemple to learn how to calculate flash per second from hz to millis %. I know that it is 1/1000 seconds. What i want is to make the rect flashes 80hz or 80 x per second. tks //String\[\] sentenc…

---

## [Distort a time graph sample. Transform a shape recorded for 2 seconds into a perfect movement](https://discourse.processing.org/t/distort-a-time-graph-sample-transform-a-shape-recorded-for-2-seconds-into-a-perfect-movement/39828)

<div class="topic-metadata">

**Author:** [@bking](https://discourse.processing.org/u/bking)\
**Replies:** 0\
**Last updated:** [November 22, 2022, 2:46pm UTC](https://discourse.processing.org/t/distort-a-time-graph-sample-transform-a-shape-recorded-for-2-seconds-into-a-perfect-movement/39828 "2022-11-22T14:46:41Z")

</div>

Dear everyones :wink: The idea is to record any movement for 2 sec, transform it to loop it (so that the movement is ‘full’) and play it back for exactly 2 sec. To replay the transformed movement, the movement must be d…

---

## [How do I change mouseX, mouseY default origin positions](https://discourse.processing.org/t/how-do-i-change-mousex-mousey-default-origin-positions/39780)

<div class="topic-metadata">

**Author:** [@Siyue](https://discourse.processing.org/u/Siyue)\
**Replies:** 7\
**Last updated:** [November 22, 2022, 3:27pm UTC](https://discourse.processing.org/t/how-do-i-change-mousex-mousey-default-origin-positions/39780 "2022-11-22T15:27:07Z")

</div>

hey guys, this is a very small question. and here is my code: void setup() { size(600, 800); background(20, 40, 80); } void draw() { stroke(30,200,100,40); line(mouseX,mouseY,300,30); } void mousePressed(){back…

---

## [Duplicate method error after moving from v3 to v4](https://discourse.processing.org/t/duplicate-method-error-after-moving-from-v3-to-v4/36775)

<div class="topic-metadata">

**Author:** [@deisengard](https://discourse.processing.org/u/deisengard)\
**Replies:** 3\
**Last updated:** [November 22, 2022, 10:48am UTC](https://discourse.processing.org/t/duplicate-method-error-after-moving-from-v3-to-v4/36775 "2022-11-22T10:48:48Z")

</div>

Running Processing 4 beta 7 on Windows 11. I am attempting to run a sketch that runs fine in Processing 3 on the same machine. Loading it now in P4 with no changes results in a “duplicate method settings()” error even …

---

## [I want to add wind force on this code and also if possible changing the colours in every movement.Can someone help me or give a idea of that?](https://discourse.processing.org/t/i-want-to-add-wind-force-on-this-code-and-also-if-possible-changing-the-colours-in-every-movement-can-someone-help-me-or-give-a-idea-of-that/39819)

<div class="topic-metadata">

**Author:** [@rocky](https://discourse.processing.org/u/rocky)\
**Replies:** 1\
**Last updated:** [November 21, 2022, 10:22pm UTC](https://discourse.processing.org/t/i-want-to-add-wind-force-on-this-code-and-also-if-possible-changing-the-colours-in-every-movement-can-someone-help-me-or-give-a-idea-of-that/39819 "2022-11-21T22:22:01Z")

</div>

Flock flock; void setup() { size(500,500); flock = new Flock(); for (int i=0; i\<100; i++) { Boid b = new Boid(width/1, height/1); flock.addBoid(b); } } void draw() { background(100); flock.run(); } class Boi…

---

## [Processing - Serial Coms with Arduino - receiving mostly "nulls"](https://discourse.processing.org/t/processing-serial-coms-with-arduino-receiving-mostly-nulls/39816)

<div class="topic-metadata">

**Author:** [@Europa81](https://discourse.processing.org/u/Europa81)\
**Replies:** 1\
**Last updated:** [November 21, 2022, 11:50pm UTC](https://discourse.processing.org/t/processing-serial-coms-with-arduino-receiving-mostly-nulls/39816 "2022-11-21T23:50:29Z")

</div>

Trying to get an Arduino report Data to Processing with a sketch which sends a String (“abcd”) every second. On Processing side there is: import processing.serial.\*; Serial SerPort; String rx = ""; void setup () { …

---

## [Importing Java libraries into embed Processing sketch online](https://discourse.processing.org/t/importing-java-libraries-into-embed-processing-sketch-online/39693)

<div class="topic-metadata">

**Author:** [@zellwd](https://discourse.processing.org/u/zellwd)\
**Replies:** 4\
**Last updated:** [November 21, 2022, 6:08pm UTC](https://discourse.processing.org/t/importing-java-libraries-into-embed-processing-sketch-online/39693 "2022-11-21T18:08:06Z")

</div>

Hello, I’m trying to embed a Processing sketch onto an HTML page, which uses Java libraries, I’ve been following this guide. Processing on the web does not support imported libraries, which is probably why the program w…

---

## [How to record and playback samples using Minim library?](https://discourse.processing.org/t/how-to-record-and-playback-samples-using-minim-library/39814)

<div class="topic-metadata">

**Author:** [@jvolker](https://discourse.processing.org/u/jvolker)\
**Replies:** 0\
**Last updated:** [November 21, 2022, 5:26pm UTC](https://discourse.processing.org/t/how-to-record-and-playback-samples-using-minim-library/39814 "2022-11-21T17:26:31Z")

</div>

Hi, I’m trying to record and play back sound samples. I found this example using the Minim library: Minim : : Minim : : createRecorder However, the example requires saving the recorded audio to a file in order to play …

---

## [Random running continously (Card Game, deck of cards)](https://discourse.processing.org/t/random-running-continously-card-game-deck-of-cards/39784)

<div class="topic-metadata">

**Author:** [@BrokenSpace](https://discourse.processing.org/u/BrokenSpace)\
**Replies:** 7\
**Last updated:** [November 21, 2022, 1:18pm UTC](https://discourse.processing.org/t/random-running-continously-card-game-deck-of-cards/39784 "2022-11-21T13:18:03Z")

</div>

I’m making a deck of cards. I have each image of the cards in a 2D array with each value of the array representing suit\[4\] and rank\[13\]. I’m trying to use random to randomly pull an image from it but it just cycles throu…

---

## [Importing PSurfaceAWT](https://discourse.processing.org/t/importing-psurfaceawt/39777)

<div class="topic-metadata">

**Author:** [@Svedblen](https://discourse.processing.org/u/Svedblen)\
**Replies:** 5\
**Last updated:** [November 20, 2022, 11:43am UTC](https://discourse.processing.org/t/importing-psurfaceawt/39777 "2022-11-20T11:43:00Z")

</div>

Hi! I’m new to Processing and also to Java (but not to SW otherwise). I’m trying to piece together a WindowAdapter, and eventually an window listener, but have trouble getting this import to work: import processing.awt…

---

## [Serial Events and the which parameter](https://discourse.processing.org/t/serial-events-and-the-which-parameter/39638)

<div class="topic-metadata">

**Author:** [@GhostGlitch](https://discourse.processing.org/u/GhostGlitch)\
**Replies:** 4\
**Last updated:** [November 20, 2022, 1:58am UTC](https://discourse.processing.org/t/serial-events-and-the-which-parameter/39638 "2022-11-20T01:58:44Z")

</div>

In the Libraries Reference for serialEvents it mentions a “which” parameter but does not go into any details about it. I’ve search for any references on how to use this, but have come up short. How does this parameter …

---

## [Csv does not exist or could not be read (application)](https://discourse.processing.org/t/csv-does-not-exist-or-could-not-be-read-application/39763)

<div class="topic-metadata">

**Author:** [@Jean-no](https://discourse.processing.org/u/Jean-no)\
**Replies:** 11\
**Last updated:** [November 20, 2022, 12:44am UTC](https://discourse.processing.org/t/csv-does-not-exist-or-could-not-be-read-application/39763 "2022-11-20T00:44:25Z")

</div>

Hi ! My program is quite simple : Table base = loadTable("base.csv"); println(base.getRowCount() + " total rows in table"); And it works well while running it from Processing. The base.csv file is in the data fol…

---

## [Dividing two numbers results in int, even though it should be a float](https://discourse.processing.org/t/dividing-two-numbers-results-in-int-even-though-it-should-be-a-float/39794)

<div class="topic-metadata">

**Author:** [@Kalarila](https://discourse.processing.org/u/Kalarila)\
**Replies:** 3\
**Last updated:** [November 19, 2022, 9:23pm UTC](https://discourse.processing.org/t/dividing-two-numbers-results-in-int-even-though-it-should-be-a-float/39794 "2022-11-19T21:23:28Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Ok, so I’m writing an image editing program and would like to get the aspect ratio of the image. So I declared a float variable called “aspectRa…

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

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