# Processing

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

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

**Page:** 186

---

## [Why does empty draw() function change canvas?](https://discourse.processing.org/t/why-does-empty-draw-function-change-canvas/23679)

<div class="topic-metadata">

**Author:** [@mr\_riptano](https://discourse.processing.org/u/mr_riptano)\
**Replies:** 1\
**Last updated:** [September 4, 2020, 3:41pm UTC](https://discourse.processing.org/t/why-does-empty-draw-function-change-canvas/23679 "2020-09-04T15:41:53Z")

</div>

void setup(){ size(400,400); background(0); paint(200,200,150,10); } void draw() { } void paint(float x, float y, float r, float v){ noFill(); strokeWeight(v); stroke(250,180,0,10); ellipse(x,y,r,r); } P…

---

## [Box2d still the way to go?](https://discourse.processing.org/t/box2d-still-the-way-to-go/23677)

<div class="topic-metadata">

**Author:** [@arcadeperfect](https://discourse.processing.org/u/arcadeperfect)\
**Replies:** 0\
**Last updated:** [September 4, 2020, 2:00pm UTC](https://discourse.processing.org/t/box2d-still-the-way-to-go/23677 "2020-09-04T14:00:37Z")

</div>

Hi, I want to do some 2D physics based text stuff, ie rigid body simulations with gravity and collisions. Along the lines of Dan Schiffman’s examples with boxes falling onto static objects with box2d. Those examples ar…

---

## [Unable to load fonts using createFont()](https://discourse.processing.org/t/unable-to-load-fonts-using-createfont/23666)

<div class="topic-metadata">

**Author:** [@Lucianoinfanti](https://discourse.processing.org/u/Lucianoinfanti)\
**Replies:** 3\
**Last updated:** [September 4, 2020, 1:03pm UTC](https://discourse.processing.org/t/unable-to-load-fonts-using-createfont/23666 "2020-09-04T13:03:22Z")

</div>

I tried to load a few different fonts I have inside my data folder but to no success. This is my code: PGraphics pg; void setup() { PFont font = createFont("ZapfDingbats.ttf", 100); size(800,800, P2D); pg = creat…

---

## [Why backwards-for-loops don't work?](https://discourse.processing.org/t/why-backwards-for-loops-dont-work/23672)

<div class="topic-metadata">

**Author:** [@Tinkerer](https://discourse.processing.org/u/Tinkerer)\
**Replies:** 5\
**Last updated:** [September 4, 2020, 10:53am UTC](https://discourse.processing.org/t/why-backwards-for-loops-dont-work/23672 "2020-09-04T10:53:29Z")

</div>

Hello, How come a for-loop can’t run backwards? I sometimes need to run backwards through arrays and wanted something shorter than a while loop and reverse() doesnt seem to work for higher-D arrays e.g. reverse(array) …

---

## [strokeCap in P3D not working](https://discourse.processing.org/t/strokecap-in-p3d-not-working/23633)

<div class="topic-metadata">

**Author:** [@DaaWaan](https://discourse.processing.org/u/DaaWaan)\
**Replies:** 2\
**Last updated:** [September 4, 2020, 2:41am UTC](https://discourse.processing.org/t/strokecap-in-p3d-not-working/23633 "2020-09-04T02:41:21Z")

</div>

Just for a background, I’m currently using P3D for 2D animations instead of the default, P2D, and FX2D because of performance issues that I get with the customization of strokes. I assume this probably has something to d…

---

## [Ploting a shape along a path](https://discourse.processing.org/t/ploting-a-shape-along-a-path/23641)

<div class="topic-metadata">

**Author:** [@pandl](https://discourse.processing.org/u/pandl)\
**Replies:** 4\
**Last updated:** [September 3, 2020, 11:01pm UTC](https://discourse.processing.org/t/ploting-a-shape-along-a-path/23641 "2020-09-03T23:01:04Z")

</div>

I’ve able to have a shape follow a circular path and now I’d like to do the same thing with other paths starting with a straight line. I once had some BASIC code that plotted a line but that was 40 odd years ago and I ca…

---

## [Beginner having problems, for cycle, lines coordinates](https://discourse.processing.org/t/beginner-having-problems-for-cycle-lines-coordinates/23659)

<div class="topic-metadata">

**Author:** [@TabeaErre](https://discourse.processing.org/u/TabeaErre)\
**Replies:** 1\
**Last updated:** [September 3, 2020, 3:24pm UTC](https://discourse.processing.org/t/beginner-having-problems-for-cycle-lines-coordinates/23659 "2020-09-03T15:24:28Z")

</div>

Hi everybody, I’m very new to processing. I’m trying to finish this code, my uni professor told me I had to do a “for cycle” to draw all the lines using the coordinates. I don’t know how to do it, I’m stuck. Also after t…

---

## [There is an error, so I ask for advice: The program freezes. The program takes a lag](https://discourse.processing.org/t/there-is-an-error-so-i-ask-for-advice-the-program-freezes-the-program-takes-a-lag/23579)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 5\
**Last updated:** [September 3, 2020, 1:54pm UTC](https://discourse.processing.org/t/there-is-an-error-so-i-ask-for-advice-the-program-freezes-the-program-takes-a-lag/23579 "2020-09-03T13:54:02Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hello. Nice to meet you. I want to make a monitoring program through’processing tool’. There is an error in making, so I ask you for advice…

---

## [Menu toolbar and custom events](https://discourse.processing.org/t/menu-toolbar-and-custom-events/23653)

<div class="topic-metadata">

**Author:** [@MiguelSanches](https://discourse.processing.org/u/MiguelSanches)\
**Replies:** 0\
**Last updated:** [September 3, 2020, 8:22am UTC](https://discourse.processing.org/t/menu-toolbar-and-custom-events/23653 "2020-09-03T08:22:44Z")

</div>

Hi all, I have been trying to work and play with creating a menu toolbar. I recently found this post (https://forum.processing.org/two/discussion/21749/how-to-create-an-application-with-a-toolbar) and I have used some …

---

## [Moving a cursor with Robot makes it skip across the window?](https://discourse.processing.org/t/moving-a-cursor-with-robot-makes-it-skip-across-the-window/23373)

<div class="topic-metadata">

**Author:** [@CosmicCrowMC](https://discourse.processing.org/u/CosmicCrowMC)\
**Replies:** 5\
**Last updated:** [September 3, 2020, 2:11am UTC](https://discourse.processing.org/t/moving-a-cursor-with-robot-makes-it-skip-across-the-window/23373 "2020-09-03T02:11:21Z")

</div>

So, I’ve been working on a 3d game for quite a while now. It’s first-person, and you look around by moving the mouse - makes sense. I’ve sent the game to some friends to playtest, and it works fine for all but one of the…

---

## [Help with picking a webcam](https://discourse.processing.org/t/help-with-picking-a-webcam/23645)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 0\
**Last updated:** [September 3, 2020, 1:13am UTC](https://discourse.processing.org/t/help-with-picking-a-webcam/23645 "2020-09-03T01:13:23Z")

</div>

not sure if I’m missing something really obvious I’m using the stock camera code to extract an image from my webcam. Processing lists 33 camers total 33 Available cameras: 0 name=Integrated Camera,size=640x480,fps=15 …

---

## [Open Weather Maps using Multiple ID's](https://discourse.processing.org/t/open-weather-maps-using-multiple-ids/13444)

<div class="topic-metadata">

**Author:** [@zara2355](https://discourse.processing.org/u/zara2355)\
**Replies:** 2\
**Last updated:** [September 3, 2020, 12:10am UTC](https://discourse.processing.org/t/open-weather-maps-using-multiple-ids/13444 "2020-09-03T00:10:47Z")

</div>

Hey all- I’m still super new here, so apologies if this question is dumb… Im trying to use the Open Weather Maps API to Grab temperature data from multiple cities that i will eventually use with an Arduino As per the …

---

## [Display objects in their original size \[SOLVED\]](https://discourse.processing.org/t/display-objects-in-their-original-size-solved/23622)

<div class="topic-metadata">

**Author:** [@SamTech](https://discourse.processing.org/u/SamTech)\
**Replies:** 3\
**Last updated:** [September 2, 2020, 5:36pm UTC](https://discourse.processing.org/t/display-objects-in-their-original-size-solved/23622 "2020-09-02T17:36:54Z")

</div>

Hey there! I have programmed an P3D Simulation and need to display some objects in the size I have initialized them so they appear to stay the same size even if I move my camera away from them. I think there is somewhere…

---

## [PShape with transparent texture issue](https://discourse.processing.org/t/pshape-with-transparent-texture-issue/23608)

<div class="topic-metadata">

**Author:** [@raron](https://discourse.processing.org/u/raron)\
**Replies:** 0\
**Last updated:** [September 1, 2020, 5:07pm UTC](https://discourse.processing.org/t/pshape-with-transparent-texture-issue/23608 "2020-09-01T17:07:21Z")

</div>

Trying to get texture with transparency on a PShape. It seems some faces can’t see through to the face behind, but then apparently it still sees behind that again (background). Not to mention the texture is flipped on a…

---

## [RAM allocation of runtime in OSX](https://discourse.processing.org/t/ram-allocation-of-runtime-in-osx/23602)

<div class="topic-metadata">

**Author:** [@GSA\_IxD](https://discourse.processing.org/u/GSA_IxD)\
**Replies:** 5\
**Last updated:** [September 1, 2020, 4:50pm UTC](https://discourse.processing.org/t/ram-allocation-of-runtime-in-osx/23602 "2020-09-01T16:50:53Z")

</div>

Hi. I am building a bespoke application for use in an art installation. I’m using OSX Catalina and Processing 3.5.4. I am loading hundreds of 1920 x 1080 PNG files into an ArrayList and after loading, running through th…

---

## [Frequency Energy Beat Detection with the audio output](https://discourse.processing.org/t/frequency-energy-beat-detection-with-the-audio-output/23599)

<div class="topic-metadata">

**Author:** [@bking](https://discourse.processing.org/u/bking)\
**Replies:** 0\
**Last updated:** [September 1, 2020, 8:06am UTC](https://discourse.processing.org/t/frequency-energy-beat-detection-with-the-audio-output/23599 "2020-09-01T08:06:40Z")

</div>

Hello there, Just a simple question I hope. :grinning: I would like to adapt the program from the Minim example. Rather to detect the beat of a mp3 in the sketch folder as it has done in the example, I would like to …

---

## [Window resize (aka surface.resizable) not functioning in P2D and P3D modes](https://discourse.processing.org/t/window-resize-aka-surface-resizable-not-functioning-in-p2d-and-p3d-modes/23586)

<div class="topic-metadata">

**Author:** [@Tarik](https://discourse.processing.org/u/Tarik)\
**Replies:** 3\
**Last updated:** [September 1, 2020, 11:23am UTC](https://discourse.processing.org/t/window-resize-aka-surface-resizable-not-functioning-in-p2d-and-p3d-modes/23586 "2020-09-01T11:23:59Z")

</div>

Hi all, On windows, surface.setResizable(true) has no effect whatsoever when the sketch runs in P2D or P3D mode. In the default mode, everything runs as expected. Are there any known solutions? thanks! -t (and here’s…

---

## [How to make an operating system with processing?](https://discourse.processing.org/t/how-to-make-an-operating-system-with-processing/23139)

<div class="topic-metadata">

**Author:** [@Arnau](https://discourse.processing.org/u/Arnau)\
**Replies:** 8\
**Last updated:** [September 1, 2020, 10:39am UTC](https://discourse.processing.org/t/how-to-make-an-operating-system-with-processing/23139 "2020-09-01T10:39:13Z")

</div>

Hello, I think it isn’t posible but… Is there anyway to make an operating system with processing? And to use an executable as OS? Thanks

---

## [How to sequence or switch case automatically?](https://discourse.processing.org/t/how-to-sequence-or-switch-case-automatically/17464)

<div class="topic-metadata">

**Author:** [@bking](https://discourse.processing.org/u/bking)\
**Replies:** 22\
**Last updated:** [September 1, 2020, 7:31am UTC](https://discourse.processing.org/t/how-to-sequence-or-switch-case-automatically/17464 "2020-09-01T07:31:28Z")

</div>

Hi, I made a lot of cases to trigger them with the keyboard. Now, I wish I could sequence the cases in a special order and manage their duration. For example with the Arduino IDE, I made case ‘0’ and case ‘4’’ In void…

---

## [Bringing the composition back](https://discourse.processing.org/t/bringing-the-composition-back/23596)

<div class="topic-metadata">

**Author:** [@yhlaskerimov](https://discourse.processing.org/u/yhlaskerimov)\
**Replies:** 0\
**Last updated:** [September 1, 2020, 6:38am UTC](https://discourse.processing.org/t/bringing-the-composition-back/23596 "2020-09-01T06:38:23Z")

</div>

Hi, everyone ! I challenged myself to do things like Andre burnier is doing. And I don’t know how he is bringing back his compostions: 1st example 2nd example Can anyone help ?

---

## [Horizon artificial and compass animation](https://discourse.processing.org/t/horizon-artificial-and-compass-animation/3794)

<div class="topic-metadata">

**Author:** [@zohrahamadene](https://discourse.processing.org/u/zohrahamadene)\
**Replies:** 15\
**Last updated:** [September 1, 2020, 6:37am UTC](https://discourse.processing.org/t/horizon-artificial-and-compass-animation/3794 "2020-09-01T06:37:39Z")

</div>

Hi guys, I want to draw an Artificial horizon and a compass by processing can someone tell me how to do that please, I put here a picture of what I want to realize.

---

## [\[SOLVED\] Texture Mapping in Custom Fragment Shader for Shadow Mapping](https://discourse.processing.org/t/solved-texture-mapping-in-custom-fragment-shader-for-shadow-mapping/23533)

<div class="topic-metadata">

**Author:** [@Shwaa](https://discourse.processing.org/u/Shwaa)\
**Replies:** 0\
**Last updated:** [August 28, 2020, 2:19pm UTC](https://discourse.processing.org/t/solved-texture-mapping-in-custom-fragment-shader-for-shadow-mapping/23533 "2020-08-28T14:19:46Z")

</div>

Hello, I have been using a shadow mapping shader posted in this old forum thread that I slightly modified to better suit the game I am making. My modifications include clamping the shadow darkness so colors don’t become…

---

## [Problems with the camera](https://discourse.processing.org/t/problems-with-the-camera/23534)

<div class="topic-metadata">

**Author:** [@cndae](https://discourse.processing.org/u/cndae)\
**Replies:** 1\
**Last updated:** [August 31, 2020, 11:33pm UTC](https://discourse.processing.org/t/problems-with-the-camera/23534 "2020-08-31T23:33:38Z")

</div>

Hello! how are you? I have a problem with the camera, I’m using macOS 10.15.6. I’m trying to run 2 codes, and I have the similar problem. For example: import processing.video.\*; Capture video; void setup () { size (6…

---

## [Two questions on for loops and randomize translate](https://discourse.processing.org/t/two-questions-on-for-loops-and-randomize-translate/23567)

<div class="topic-metadata">

**Author:** [@Huno](https://discourse.processing.org/u/Huno)\
**Replies:** 10\
**Last updated:** [August 31, 2020, 9:53pm UTC](https://discourse.processing.org/t/two-questions-on-for-loops-and-randomize-translate/23567 "2020-08-31T21:53:44Z")

</div>

The first question is regarding this simple for loop on translate, What I am trying to achieve is to have a line appear in random places in the canvas with translate, but when I do a for loop, I get a constant line at th…

---

## [How to embed processing sketch onto GoDaddy Website](https://discourse.processing.org/t/how-to-embed-processing-sketch-onto-godaddy-website/23570)

<div class="topic-metadata">

**Author:** [@squirtlekid1000](https://discourse.processing.org/u/squirtlekid1000)\
**Replies:** 1\
**Last updated:** [August 30, 2020, 10:43pm UTC](https://discourse.processing.org/t/how-to-embed-processing-sketch-onto-godaddy-website/23570 "2020-08-30T22:43:29Z")

</div>

Hi there, I’m trying to copy the HTML code of a Processing Sketch onto my website (made via GoDaddy) but I’m not getting a result (i.e. the only thing that is coming up is the written code rather than the embedded sketc…

---

## [Linking Data from SurveyMonkey into Processing Sketch](https://discourse.processing.org/t/linking-data-from-surveymonkey-into-processing-sketch/23571)

<div class="topic-metadata">

**Author:** [@squirtlekid1000](https://discourse.processing.org/u/squirtlekid1000)\
**Replies:** 1\
**Last updated:** [August 31, 2020, 5:44am UTC](https://discourse.processing.org/t/linking-data-from-surveymonkey-into-processing-sketch/23571 "2020-08-31T05:44:56Z")

</div>

Hi there, Im currently revisiting an old project which in essence was a random text generator using data from a survey I circulated using Surveymonkey. I would now really like to make this fully interactive and have the…

---

## [Audio via Serial, not soundcard - draw() too slow to analyze](https://discourse.processing.org/t/audio-via-serial-not-soundcard-draw-too-slow-to-analyze/23545)

<div class="topic-metadata">

**Author:** [@RFullum](https://discourse.processing.org/u/RFullum)\
**Replies:** 4\
**Last updated:** [August 30, 2020, 9:18am UTC](https://discourse.processing.org/t/audio-via-serial-not-soundcard-draw-too-slow-to-analyze/23545 "2020-08-30T09:18:10Z")

</div>

Hey all, I’m trying to figure out the best way to attack this problem. I have a Mic (Max4466) -\> ADC (ADS1115) -\> Arduino Nano 33 IoT -\> Processing via Serial (USB). My current test sketches work like this: -Arduino is…

---

## [Make perlin noise loop duration coincide with frame duration for looping GIF](https://discourse.processing.org/t/make-perlin-noise-loop-duration-coincide-with-frame-duration-for-looping-gif/23454)

<div class="topic-metadata">

**Author:** [@Leonsuper](https://discourse.processing.org/u/Leonsuper)\
**Replies:** 2\
**Last updated:** [August 29, 2020, 8:47pm UTC](https://discourse.processing.org/t/make-perlin-noise-loop-duration-coincide-with-frame-duration-for-looping-gif/23454 "2020-08-29T20:47:57Z")

</div>

Hello, I didn’t wanna ask two questions in such a short time, but I’ve been having a doubt related to two videos by The Coding Train, “Polar Perlin Noise Loops” and “Perlin Noise GIF Loops”. I tried to mix the two but i…

---

## [PixelFlow: Is it possible to have multiple attractors that work with selected particles?](https://discourse.processing.org/t/pixelflow-is-it-possible-to-have-multiple-attractors-that-work-with-selected-particles/23553)

<div class="topic-metadata">

**Author:** [@jwo](https://discourse.processing.org/u/jwo)\
**Replies:** 0\
**Last updated:** [August 29, 2020, 5:41pm UTC](https://discourse.processing.org/t/pixelflow-is-it-possible-to-have-multiple-attractors-that-work-with-selected-particles/23553 "2020-08-29T17:41:34Z")

</div>

I see that the excellent pixelFlow library (which really deserves more attention) allows attractors to be created (see FlowFieldParticles\_Attractors). These will attract all particles to them with an acceleration depende…

---

## [Trying to eliminate draw flicker](https://discourse.processing.org/t/trying-to-eliminate-draw-flicker/23530)

<div class="topic-metadata">

**Author:** [@pandl](https://discourse.processing.org/u/pandl)\
**Replies:** 5\
**Last updated:** [August 28, 2020, 9:00pm UTC](https://discourse.processing.org/t/trying-to-eliminate-draw-flicker/23530 "2020-08-28T21:00:22Z")

</div>

Thank you for reading this. I had this working reasonably well several months ago but I must have forgotten to save the project. I had the moon orbiting the earth and the earth orbiting the sun with minimal flicker. I’v…

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

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