# Latest

**URL:** https://discourse.processing.org/latest.md?no_subcategories=false&page=207

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

**Page:** 208

---

## [Data from Muse 2 Headband into Processing](https://discourse.processing.org/t/data-from-muse-2-headband-into-processing/31240)

<div class="topic-metadata">

**Author:** [@marianne91](https://discourse.processing.org/u/marianne91)\
**Replies:** 1\
**Last updated:** [July 15, 2021, 2:52pm UTC](https://discourse.processing.org/t/data-from-muse-2-headband-into-processing/31240 "2021-07-15T14:52:49Z")

</div>

Hi there! Just looking for anyone with advice/info from anyone who may have used a Muse 2 Headband to send data into Processing - and best advice on how to do this? (Muse 2: Brain Sensing Headband - Technology Enhanced …

---

## [Barker Code using Bit Manipulation](https://discourse.processing.org/t/barker-code-using-bit-manipulation/31265)

<div class="topic-metadata">

**Author:** [@glv](https://discourse.processing.org/u/glv)\
**Replies:** 0\
**Last updated:** [July 15, 2021, 11:09am UTC](https://discourse.processing.org/t/barker-code-using-bit-manipulation/31265 "2021-07-15T11:09:54Z")

</div>

My efforts exploring Barker codes with bit manipulation. It is not quite there yet and a first pass at this as my morning coding workout. Reference image from here: https://www.radartutorial.eu/08.transmitters/pic/kor…

---

## [A little help is needed !?](https://discourse.processing.org/t/a-little-help-is-needed/31268)

<div class="topic-metadata">

**Author:** [@Peace](https://discourse.processing.org/u/Peace)\
**Replies:** 1\
**Last updated:** [July 15, 2021, 2:01pm UTC](https://discourse.processing.org/t/a-little-help-is-needed/31268 "2021-07-15T14:01:28Z")

</div>

Can anybody pls educate me how did the writer measure the following two rect () to produce (1,2, 4,3) ( I understood only 1,2 touching the coordinate 1 (x), 2 (y) part ). Rect () (3,2,4,2). I understood only (3,2) coord…

---

## [Jumping from Processing to p5.js... whaaa?](https://discourse.processing.org/t/jumping-from-processing-to-p5-js-whaaa/31249)

<div class="topic-metadata">

**Author:** [@Eamoex](https://discourse.processing.org/u/Eamoex)\
**Replies:** 2\
**Last updated:** [July 15, 2021, 6:09am UTC](https://discourse.processing.org/t/jumping-from-processing-to-p5-js-whaaa/31249 "2021-07-15T06:09:37Z")

</div>

Hi, getting into Javascript (p5.js) from Processing to embed sketches on my website. Right from the start there are two things I don’t get. variables have no declared type? arrays have no declared length? Here is a p…

---

## [Fill an imagined ellipse with dots](https://discourse.processing.org/t/fill-an-imagined-ellipse-with-dots/31221)

<div class="topic-metadata">

**Author:** [@k5221](https://discourse.processing.org/u/k5221)\
**Replies:** 5\
**Last updated:** [July 15, 2021, 8:44am UTC](https://discourse.processing.org/t/fill-an-imagined-ellipse-with-dots/31221 "2021-07-15T08:44:54Z")

</div>

Hi, what I would like to do is fill an imagined ellipse (x, y, w, h) with tiny dots whose size is specified by “dotSize” of the “drawHead” function. But I struggle coming up a way to fit dots inside an ellipse (so the nu…

---

## [How can I stretch individual letters?](https://discourse.processing.org/t/how-can-i-stretch-individual-letters/31239)

<div class="topic-metadata">

**Author:** [@tommyba](https://discourse.processing.org/u/tommyba)\
**Replies:** 1\
**Last updated:** [July 15, 2021, 8:40am UTC](https://discourse.processing.org/t/how-can-i-stretch-individual-letters/31239 "2021-07-15T08:40:53Z")

</div>

i have this code and i want to, for example, stretch the A to the right and and the rest of the letters get really little like they are being pushed, or stretch the C to both left and right and push the A B to the left a…

---

## [Can't use math functions inside class constructor](https://discourse.processing.org/t/cant-use-math-functions-inside-class-constructor/31251)

<div class="topic-metadata">

**Author:** [@seanc4s](https://discourse.processing.org/u/seanc4s)\
**Replies:** 4\
**Last updated:** [July 14, 2021, 11:16pm UTC](https://discourse.processing.org/t/cant-use-math-functions-inside-class-constructor/31251 "2021-07-14T23:16:13Z")

</div>

Can’t use math functions inside class constructor, and some other functions like print(“Hi”) for example. I don’t mind, but it kinda makes my code look ugly having to use JavaScript Math.random() for example. Which has …

---

## [Hi Guys! I just need help figuring out how to change the color of the bouncing ball every time the player circle collides with it](https://discourse.processing.org/t/hi-guys-i-just-need-help-figuring-out-how-to-change-the-color-of-the-bouncing-ball-every-time-the-player-circle-collides-with-it/31250)

<div class="topic-metadata">

**Author:** [@bopStu77](https://discourse.processing.org/u/bopStu77)\
**Replies:** 4\
**Last updated:** [July 14, 2021, 3:41pm UTC](https://discourse.processing.org/t/hi-guys-i-just-need-help-figuring-out-how-to-change-the-color-of-the-bouncing-ball-every-time-the-player-circle-collides-with-it/31250 "2021-07-14T15:41:26Z")

</div>

This is the code I was given to start with; int rad = 60; // Width of the shape float xpos, ypos; // Starting position of shape float xspeed = 2.8; // Speed of the shape float yspeed = 2.2; // Speed of th…

---

## [Randomly select file to preload (p5.js)](https://discourse.processing.org/t/randomly-select-file-to-preload-p5-js/31148)

<div class="topic-metadata">

**Author:** [@fleshcircuit](https://discourse.processing.org/u/fleshcircuit)\
**Replies:** 9\
**Last updated:** [July 14, 2021, 12:46pm UTC](https://discourse.processing.org/t/randomly-select-file-to-preload-p5-js/31148 "2021-07-14T12:46:31Z")

</div>

I am working on a project where I am using data from a json file, but I am wondering if it is possible to randomly select a file from the data folder for a sketch to use. I don’t want to load all the files, since I fear …

---

## [Not sure why my array is not allowed to use a function (OOP)](https://discourse.processing.org/t/not-sure-why-my-array-is-not-allowed-to-use-a-function-oop/31232)

<div class="topic-metadata">

**Author:** [@LuckyDots](https://discourse.processing.org/u/LuckyDots)\
**Replies:** 21\
**Last updated:** [July 14, 2021, 12:13pm UTC](https://discourse.processing.org/t/not-sure-why-my-array-is-not-allowed-to-use-a-function-oop/31232 "2021-07-14T12:13:35Z")

</div>

hello again, my problem is as follows. I am have tried and somewhat suceeded in creating a function which creates a fade from black to white after a random amount of time and then resets itself. i am trying to fill the…

---

## [Serial.write() blocks receive when written inside draw() function](https://discourse.processing.org/t/serial-write-blocks-receive-when-written-inside-draw-function/31203)

<div class="topic-metadata">

**Author:** [@mohitSingh](https://discourse.processing.org/u/mohitSingh)\
**Replies:** 2\
**Last updated:** [July 14, 2021, 11:02am UTC](https://discourse.processing.org/t/serial-write-blocks-receive-when-written-inside-draw-function/31203 "2021-07-14T11:02:22Z")

</div>

import processing.serial.\*; //\<\>// //\<\>// //import static javax.swing.JOptionPane.\*; import controlP5.\*; import java.util.\*; import javax.swing.JOptionPane; Serial myPort; // The serial port which will be opene…

---

## [Creating a shield for an enemy class](https://discourse.processing.org/t/creating-a-shield-for-an-enemy-class/31242)

<div class="topic-metadata">

**Author:** [@Gyrosis](https://discourse.processing.org/u/Gyrosis)\
**Replies:** 1\
**Last updated:** [July 14, 2021, 7:08am UTC](https://discourse.processing.org/t/creating-a-shield-for-an-enemy-class/31242 "2021-07-14T07:08:24Z")

</div>

So say if I want to create a shield so that you would have to take down the shield before killing the enemy. How would I code that?

---

## [Preview of p5.js Web Editor down or moved to new address](https://discourse.processing.org/t/preview-of-p5-js-web-editor-down-or-moved-to-new-address/31226)

<div class="topic-metadata">

**Author:** [@nikko](https://discourse.processing.org/u/nikko)\
**Replies:** 1\
**Last updated:** [July 13, 2021, 10:39pm UTC](https://discourse.processing.org/t/preview-of-p5-js-web-editor-down-or-moved-to-new-address/31226 "2021-07-13T22:39:17Z")

</div>

Hi all, Since I am an absolute beginner who just created my account, please remove my post if it is not relevant or belongs to another section or the forum. I just noticed a few minutes ago that the Preview in the p5.j…

---

## [Tips for Sharing My Work on Different Machines](https://discourse.processing.org/t/tips-for-sharing-my-work-on-different-machines/31241)

<div class="topic-metadata">

**Author:** [@dtools22](https://discourse.processing.org/u/dtools22)\
**Replies:** 2\
**Last updated:** [July 13, 2021, 10:09pm UTC](https://discourse.processing.org/t/tips-for-sharing-my-work-on-different-machines/31241 "2021-07-13T22:09:50Z")

</div>

Hello Everyone, I have been working on a project for the past several months and I am ready to show this version of it beyond just immediate friends and family. I don’t need coding help, I’m looking for people to actua…

---

## [Check if variable is a prime](https://discourse.processing.org/t/check-if-variable-is-a-prime/31216)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 24\
**Last updated:** [July 13, 2021, 7:47pm UTC](https://discourse.processing.org/t/check-if-variable-is-a-prime/31216 "2021-07-13T19:47:01Z")

</div>

how to check if x is a prime?

---

## [Allow User to Resize the Window](https://discourse.processing.org/t/allow-user-to-resize-the-window/31212)

<div class="topic-metadata">

**Author:** [@dtools22](https://discourse.processing.org/u/dtools22)\
**Replies:** 2\
**Last updated:** [July 13, 2021, 5:41pm UTC](https://discourse.processing.org/t/allow-user-to-resize-the-window/31212 "2021-07-13T17:41:17Z")

</div>

Hello All, I’m creating a program and I would like the user to be able to resize the screen at their convenience. I understand the basics of how to do this with objects and their positioning on the screen but I’m a litt…

---

## [A quick question about the 1st chapter of Processing](https://discourse.processing.org/t/a-quick-question-about-the-1st-chapter-of-processing/31230)

<div class="topic-metadata">

**Author:** [@Peace](https://discourse.processing.org/u/Peace)\
**Replies:** 5\
**Last updated:** [July 13, 2021, 2:49pm UTC](https://discourse.processing.org/t/a-quick-question-about-the-1st-chapter-of-processing/31230 "2021-07-13T14:49:01Z")

</div>

Can anybody also please help me with my following query ? In the page 6 of the Processing textbook, a line has been drawn ( as can be seen in the attached picture Figure 1-6) on a graph paper and I can’t understand how t…

---

## [I am beginner of Processing software and need help! (mouse example issue)](https://discourse.processing.org/t/i-am-beginner-of-processing-software-and-need-help-mouse-example-issue/31228)

<div class="topic-metadata">

**Author:** [@Peace](https://discourse.processing.org/u/Peace)\
**Replies:** 3\
**Last updated:** [July 13, 2021, 10:35am UTC](https://discourse.processing.org/t/i-am-beginner-of-processing-software-and-need-help-mouse-example-issue/31228 "2021-07-13T10:35:43Z")

</div>

Hi there, I have installed a software from Processing.org and it is responding the way as described in the text book. After installing the software, click on the File button, then Examples then Drawing then double click …

---

## [Where can I find thousands of sudokus of varying difficulty?](https://discourse.processing.org/t/where-can-i-find-thousands-of-sudokus-of-varying-difficulty/31229)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 0\
**Last updated:** [July 13, 2021, 10:41am UTC](https://discourse.processing.org/t/where-can-i-find-thousands-of-sudokus-of-varying-difficulty/31229 "2021-07-13T10:41:43Z")

</div>

Hi! I recently made a sudoku program. I need as many sudoku templates as possible (unsolved, no need for solution). It would be preferable for it to be written in a .txt file with a clear and simple format. Do any of you…

---

## [Draw() overlay shapes on the canvas](https://discourse.processing.org/t/draw-overlay-shapes-on-the-canvas/31222)

<div class="topic-metadata">

**Author:** [@k5221](https://discourse.processing.org/u/k5221)\
**Replies:** 1\
**Last updated:** [July 13, 2021, 7:08am UTC](https://discourse.processing.org/t/draw-overlay-shapes-on-the-canvas/31222 "2021-07-13T07:08:12Z")

</div>

Hi, I’m writing a code to call another custom render function I created inside the draw() to render shapes (which is essentially a bunch of ellipses) on the screen. But, it draws shapes on top of each other and doesn’t r…

---

## [Mitigating Periodicity in Perlin Noise](https://discourse.processing.org/t/mitigating-periodicity-in-perlin-noise/31211)

<div class="topic-metadata">

**Author:** [@javagar](https://discourse.processing.org/u/javagar)\
**Replies:** 4\
**Last updated:** [July 13, 2021, 6:13am UTC](https://discourse.processing.org/t/mitigating-periodicity-in-perlin-noise/31211 "2021-07-13T06:13:24Z")

</div>

I’m working on a Racing Eggs! animation, wherein four Egg objects race across the canvas from left to right. They each speed up and slow down independently of each other. When an Egg reaches the right edge of the canvas,…

---

## [Get a 3d cube made of cubes to expand from the center](https://discourse.processing.org/t/get-a-3d-cube-made-of-cubes-to-expand-from-the-center/31220)

<div class="topic-metadata">

**Author:** [@LuluLuna](https://discourse.processing.org/u/LuluLuna)\
**Replies:** 1\
**Last updated:** [July 13, 2021, 1:25am UTC](https://discourse.processing.org/t/get-a-3d-cube-made-of-cubes-to-expand-from-the-center/31220 "2021-07-13T01:25:41Z")

</div>

Hello, I made this sketch Link to sketch as you can see its a cube made of smaller cubes that expand and retract using sin. My problem is that the smaller cubes expand and retract from the corner cube and not from the…

---

## [Web editor jumps around when errors occur while im writing classes](https://discourse.processing.org/t/web-editor-jumps-around-when-errors-occur-while-im-writing-classes/31217)

<div class="topic-metadata">

**Author:** [@CattoKing](https://discourse.processing.org/u/CattoKing)\
**Replies:** 1\
**Last updated:** [July 13, 2021, 12:55am UTC](https://discourse.processing.org/t/web-editor-jumps-around-when-errors-occur-while-im-writing-classes/31217 "2021-07-13T00:55:43Z")

</div>

I don’t really know where to post this, but there is something i am REALLY annoyed by in the p5.js web editor. Whenever i am writing a class or extending a class, i have to pause to think of a name for the class (it hap…

---

## [X and y don't even out](https://discourse.processing.org/t/x-and-y-dont-even-out/31214)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 3\
**Last updated:** [July 12, 2021, 8:32pm UTC](https://discourse.processing.org/t/x-and-y-dont-even-out/31214 "2021-07-12T20:32:32Z")

</div>

i wrote a code that should, generate a random x, from 1-10 and then make a y the number that it needs to complete 10. it then should try to devide it by something it can be devided by. then it shows a visual for me to s…

---

## [How to read multiple sensors in Processing using Arduino I2C](https://discourse.processing.org/t/how-to-read-multiple-sensors-in-processing-using-arduino-i2c/30799)

<div class="topic-metadata">

**Author:** [@Halfrican911](https://discourse.processing.org/u/Halfrican911)\
**Replies:** 27\
**Last updated:** [July 12, 2021, 6:05pm UTC](https://discourse.processing.org/t/how-to-read-multiple-sensors-in-processing-using-arduino-i2c/30799 "2021-07-12T18:05:26Z")

</div>

hello everyone ive got 2 angle sensors that read accel gyro and mag o have all the code work done on arduino and i have both sensors working and feeding data to the serial monitor so i want to get 2 seperate tracking blo…

---

## [P5js blendmode is so strange](https://discourse.processing.org/t/p5js-blendmode-is-so-strange/30958)

<div class="topic-metadata">

**Author:** [@yang](https://discourse.processing.org/u/yang)\
**Replies:** 6\
**Last updated:** [July 12, 2021, 5:02pm UTC](https://discourse.processing.org/t/p5js-blendmode-is-so-strange/30958 "2021-07-12T17:02:00Z")

</div>

Hello guys,I’m trying to make an animation of rains flowing down a window, but there’s still some color left that doesn’t blend with the background. So I look up the blendMode() reference, and find a fomula for BLEND C…

---

## [A new beginners tutorial video](https://discourse.processing.org/t/a-new-beginners-tutorial-video/31206)

<div class="topic-metadata">

**Author:** [@Hapiel](https://discourse.processing.org/u/Hapiel)\
**Replies:** 3\
**Last updated:** [July 12, 2021, 1:17pm UTC](https://discourse.processing.org/t/a-new-beginners-tutorial-video/31206 "2021-07-12T13:17:46Z")

</div>

I made a new tutorial video that should teach a lot of the programming basics. I show functions, variables, loops, and use these to create a fun piece of generative art. I know you guys are all already experts with Proc…

---

## [How to use auto complete?](https://discourse.processing.org/t/how-to-use-auto-complete/31169)

<div class="topic-metadata">

**Author:** [@Hapiel](https://discourse.processing.org/u/Hapiel)\
**Replies:** 6\
**Last updated:** [July 12, 2021, 10:27am UTC](https://discourse.processing.org/t/how-to-use-auto-complete/31169 "2021-07-12T10:27:25Z")

</div>

Hi, I’ve never been able to use auto complete in processing. I had this issue with 3.5.4 and just now I tried 4.0a6 and still can’t get it working. I have autocomplete enabled in preferences, but whatever I type, it ne…

---

## [Drawing a flower-like shape](https://discourse.processing.org/t/drawing-a-flower-like-shape/31200)

<div class="topic-metadata">

**Author:** [@k5221](https://discourse.processing.org/u/k5221)\
**Replies:** 3\
**Last updated:** [July 12, 2021, 8:54am UTC](https://discourse.processing.org/t/drawing-a-flower-like-shape/31200 "2021-07-12T08:54:53Z")

</div>

Hi, I want to draw shapes like this. The function called “seed1” is supposed to take care of one of the curvy triangles, but when I call this function within the draw(), the second and third triangles look smashed (ma…

---

## [How can i animate the D so instead of having the D stretched i see how it stretches? (this is the code i have)](https://discourse.processing.org/t/how-can-i-animate-the-d-so-instead-of-having-the-d-stretched-i-see-how-it-stretches-this-is-the-code-i-have/31186)

<div class="topic-metadata">

**Author:** [@tommyba](https://discourse.processing.org/u/tommyba)\
**Replies:** 1\
**Last updated:** [July 12, 2021, 8:16am UTC](https://discourse.processing.org/t/how-can-i-animate-the-d-so-instead-of-having-the-d-stretched-i-see-how-it-stretches-this-is-the-code-i-have/31186 "2021-07-12T08:16:33Z")

</div>

PFont myFont; void setup() { size(1200, 1200); // Uncomment the following two lines to see the available fonts //String\[\] fontList = PFont.list(); //printArray(fontList); myFont = createFont(".SFNS-Bold", 125); fr…

[Previous page](https://discourse.processing.org/latest.md?no_subcategories=false&page=206)

[Next page](https://discourse.processing.org/latest.md?no_subcategories=false&page=208)
