# Processing

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

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

**Page:** 153

---

## [BOUNCING circle in radius](https://discourse.processing.org/t/bouncing-circle-in-radius/27535)

<div class="topic-metadata">

**Author:** [@Jimena](https://discourse.processing.org/u/Jimena)\
**Replies:** 3\
**Last updated:** [February 2, 2021, 1:18pm UTC](https://discourse.processing.org/t/bouncing-circle-in-radius/27535 "2021-02-02T13:18:41Z")

</div>

please format code with \</\> button \* homework policy \* asking questions The assignment is: Create a circle of radius r initially in the center of the screen, which moves with a certain speed velX and velY. Initiali…

---

## [How to draw an exact 1 monitor pixel line in Processing](https://discourse.processing.org/t/how-to-draw-an-exact-1-monitor-pixel-line-in-processing/27497)

<div class="topic-metadata">

**Author:** [@ibanuta](https://discourse.processing.org/u/ibanuta)\
**Replies:** 3\
**Last updated:** [February 2, 2021, 1:13pm UTC](https://discourse.processing.org/t/how-to-draw-an-exact-1-monitor-pixel-line-in-processing/27497 "2021-02-02T13:13:32Z")

</div>

Is it possible to draw an exact 1 monitor pixel line in Processing 3.? I have an 8k LG TV set as monitor to my desktop computer. I tried but all the time the thinest line appears in 2 pixels thick. Thanks in advance.

---

## [Sawtooth wave. Algorithm](https://discourse.processing.org/t/sawtooth-wave-algorithm/27433)

<div class="topic-metadata">

**Author:** [@bking](https://discourse.processing.org/u/bking)\
**Replies:** 2\
**Last updated:** [February 1, 2021, 12:02pm UTC](https://discourse.processing.org/t/sawtooth-wave-algorithm/27433 "2021-02-01T12:02:34Z")

</div>

Hello Misters and misses, I need to control a sawtooth wave, like explained wikipedia https://en.wikipedia.org/wiki/Sawtooth\_wave This a kind of triangular wave in wikipedia. You 'll find it here: algorithm in JavaScri…

---

## [Error with arduino \<-\> processing code "disabling serialEvent() for COM6 null."](https://discourse.processing.org/t/error-with-arduino-processing-code-disabling-serialevent-for-com6-null/27472)

<div class="topic-metadata">

**Author:** [@Neoncodes](https://discourse.processing.org/u/Neoncodes)\
**Replies:** 3\
**Last updated:** [February 2, 2021, 9:53am UTC](https://discourse.processing.org/t/error-with-arduino-processing-code-disabling-serialevent-for-com6-null/27472 "2021-02-02T09:53:28Z")

</div>

HI, I’m new in Processing, and i want to use arduino and make rotary encoder as arrows. Unfortunetly i have only Uno, not leonardo, so i wanted to made a code in processing to emulate pressing a key. But evry time i want…

---

## [Can I just delete this folder?](https://discourse.processing.org/t/can-i-just-delete-this-folder/27513)

<div class="topic-metadata">

**Author:** [@Math\_Machine](https://discourse.processing.org/u/Math_Machine)\
**Replies:** 1\
**Last updated:** [February 1, 2021, 11:52am UTC](https://discourse.processing.org/t/can-i-just-delete-this-folder/27513 "2021-02-01T11:52:04Z")

</div>

Quick question, do I need this folder? I’m using processing 3.5.4, and none of my sketches seem to be linked to the 3.5.3 folder (or 3.5.4 for that matter). Can I just delete it? Also, furthermore, I don’t know why …

---

## [Drawing Tool with Processing](https://discourse.processing.org/t/drawing-tool-with-processing/27431)

<div class="topic-metadata">

**Author:** [@serg](https://discourse.processing.org/u/serg)\
**Replies:** 2\
**Last updated:** [February 1, 2021, 9:53am UTC](https://discourse.processing.org/t/drawing-tool-with-processing/27431 "2021-02-01T09:53:27Z")

</div>

Hi everyone! I am trying to create a little drawing tool with processing. The final drawing should be exportable as a .svg file – so i thought this to be pretty easy… but actually it isnt… I put the background function …

---

## [Drawing lines between two selected planets](https://discourse.processing.org/t/drawing-lines-between-two-selected-planets/27502)

<div class="topic-metadata">

**Author:** [@borromini](https://discourse.processing.org/u/borromini)\
**Replies:** 3\
**Last updated:** [February 1, 2021, 6:44am UTC](https://discourse.processing.org/t/drawing-lines-between-two-selected-planets/27502 "2021-02-01T06:44:01Z")

</div>

Hi everyone, I have a source code which has moving planets on an orbit. I would like to draw lines between two of them (like draw lines between Earth and Jupiter). Here is an example I found on Youtube: https://www.youtu…

---

## [Processing no longer displaying image or sound](https://discourse.processing.org/t/processing-no-longer-displaying-image-or-sound/27487)

<div class="topic-metadata">

**Author:** [@TiBasic](https://discourse.processing.org/u/TiBasic)\
**Replies:** 5\
**Last updated:** [January 31, 2021, 10:23pm UTC](https://discourse.processing.org/t/processing-no-longer-displaying-image-or-sound/27487 "2021-01-31T22:23:23Z")

</div>

Hi, so I’m doing a project with arduino and processing. The arduino code is okay, but my processing code for some reason isn’t working right. It used to display an image as well as run a sound but now it does neither of …

---

## [Game of Life Implementation Bug](https://discourse.processing.org/t/game-of-life-implementation-bug/27495)

<div class="topic-metadata">

**Author:** [@rikitiki](https://discourse.processing.org/u/rikitiki)\
**Replies:** 5\
**Last updated:** [January 31, 2021, 8:26pm UTC](https://discourse.processing.org/t/game-of-life-implementation-bug/27495 "2021-01-31T20:26:48Z")

</div>

Hi, I’m trying to implement Life and I’ve written a class that should work, but I guess I’m missing something. I’ve followed all of the rules set forth in the book Cellular Automata Machines by Toffoli and Margolus. I …

---

## [How to make a simple bar?](https://discourse.processing.org/t/how-to-make-a-simple-bar/27500)

<div class="topic-metadata">

**Author:** [@SNICKRS](https://discourse.processing.org/u/SNICKRS)\
**Replies:** 3\
**Last updated:** [January 31, 2021, 8:14pm UTC](https://discourse.processing.org/t/how-to-make-a-simple-bar/27500 "2021-01-31T20:14:51Z")

</div>

I want to make a simple bar that fills up when the value is positive, and the bar goes down when the value is negative. The only thing is, that when the value is at 0 it should be half filled. I have tried implenting thi…

---

## [How can I turn an image in PNG or SVG format into a ring shape?](https://discourse.processing.org/t/how-can-i-turn-an-image-in-png-or-svg-format-into-a-ring-shape/27479)

<div class="topic-metadata">

**Author:** [@Violet](https://discourse.processing.org/u/Violet)\
**Replies:** 11\
**Last updated:** [January 31, 2021, 10:59am UTC](https://discourse.processing.org/t/how-can-i-turn-an-image-in-png-or-svg-format-into-a-ring-shape/27479 "2021-01-31T10:59:57Z")

</div>

I want to use processing to complete the following effect, which is to copy a picture and deform it to make it ring.But I don’t know how to turn the image into a fan shape. The general method of operation should be as…

---

## [getChild() not displaying anything](https://discourse.processing.org/t/getchild-not-displaying-anything/25858)

<div class="topic-metadata">

**Author:** [@Ruchi](https://discourse.processing.org/u/Ruchi)\
**Replies:** 7\
**Last updated:** [January 31, 2021, 10:38am UTC](https://discourse.processing.org/t/getchild-not-displaying-anything/25858 "2021-01-31T10:38:28Z")

</div>

import processing.svg.\*; PShape s; float reso, dLen; int counter = 0; void setup() { size(800, 800); reso = width; dLen =sqrt(pow(reso, 2)+pow(reso, 2)); shapeMode(CENTER); beginRecord(SVG, "DL-"+nf(counter, 3…

---

## [Sound frequency label](https://discourse.processing.org/t/sound-frequency-label/27456)

<div class="topic-metadata">

**Author:** [@jafal](https://discourse.processing.org/u/jafal)\
**Replies:** 1\
**Last updated:** [January 31, 2021, 7:34am UTC](https://discourse.processing.org/t/sound-frequency-label/27456 "2021-01-31T07:34:19Z")

</div>

hi how to set frequency values to each peak in sound library example /\*\* \* Inspect the frequency spectrum of different simple oscillators. \*/ import processing.sound.\*; // All oscillators are instances of the Oscil…

---

## [Playing different videos from mouse coordinates?](https://discourse.processing.org/t/playing-different-videos-from-mouse-coordinates/27492)

<div class="topic-metadata">

**Author:** [@lauren](https://discourse.processing.org/u/lauren)\
**Replies:** 1\
**Last updated:** [January 31, 2021, 12:26am UTC](https://discourse.processing.org/t/playing-different-videos-from-mouse-coordinates/27492 "2021-01-31T00:26:06Z")

</div>

Hi! I’m new to processing. I’m trying to make a program to play different videos depending upon the mouse coordinates. So open up a blank window, then if the mouse coordinates are between these sets of numbers, play vide…

---

## [Processing and JOGL - How are concave polygons and borders rendered?](https://discourse.processing.org/t/processing-and-jogl-how-are-concave-polygons-and-borders-rendered/27485)

<div class="topic-metadata">

**Author:** [@r.jaoui](https://discourse.processing.org/u/r.jaoui)\
**Replies:** 1\
**Last updated:** [January 30, 2021, 6:42pm UTC](https://discourse.processing.org/t/processing-and-jogl-how-are-concave-polygons-and-borders-rendered/27485 "2021-01-30T18:42:53Z")

</div>

Hello ! First of all, sorry for this post that is not really about Processing coding but about how processing itself is coded, and the JOGL library. I’ve recently started working in OpenGL for a project, and I’m faced …

---

## [Using Arduino for timer and using 2 readstringuntill](https://discourse.processing.org/t/using-arduino-for-timer-and-using-2-readstringuntill/27469)

<div class="topic-metadata">

**Author:** [@saaqib.m](https://discourse.processing.org/u/saaqib.m)\
**Replies:** 1\
**Last updated:** [January 30, 2021, 10:38am UTC](https://discourse.processing.org/t/using-arduino-for-timer-and-using-2-readstringuntill/27469 "2021-01-30T10:38:51Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hi, in my code I am trying to implement a sampling rate to sample the incoming data from my Arduino. Right now, my Arduino code has a timer of …

---

## [Condition and interruption problems for a newbie](https://discourse.processing.org/t/condition-and-interruption-problems-for-a-newbie/27467)

<div class="topic-metadata">

**Author:** [@freddukas](https://discourse.processing.org/u/freddukas)\
**Replies:** 4\
**Last updated:** [January 29, 2021, 8:24pm UTC](https://discourse.processing.org/t/condition-and-interruption-problems-for-a-newbie/27467 "2021-01-29T20:24:44Z")

</div>

Hello everyone thanks for the add.I’m totally newbie to Processing & I tried to create my first code who works as a magic trick. I have several conditions in my code in order to help me to guess a number within the seve…

---

## [Table print columnName as 1 row](https://discourse.processing.org/t/table-print-columnname-as-1-row/27465)

<div class="topic-metadata">

**Author:** [@ren](https://discourse.processing.org/u/ren)\
**Replies:** 1\
**Last updated:** [January 29, 2021, 5:14pm UTC](https://discourse.processing.org/t/table-print-columnname-as-1-row/27465 "2021-01-29T17:14:01Z")

</div>

How can I first print out on a single line all of my table’s column name of my table like this: X Y Z 8 15.99 Oxygen Table table; table = new Table(); table.addColumn("X"); tabl…

---

## [How can I test with a function whether another function is being executed?](https://discourse.processing.org/t/how-can-i-test-with-a-function-whether-another-function-is-being-executed/27460)

<div class="topic-metadata">

**Author:** [@Flolo](https://discourse.processing.org/u/Flolo)\
**Replies:** 1\
**Last updated:** [January 29, 2021, 4:47pm UTC](https://discourse.processing.org/t/how-can-i-test-with-a-function-whether-another-function-is-being-executed/27460 "2021-01-29T16:47:23Z")

</div>

Hi I want the mousePressed () function to be executed whenever the mousePressed function is executed by the parent without having to write it into the function of the parent … I hope you can help me :slight\_smile: clas…

---

## [Pls help me with my homework](https://discourse.processing.org/t/pls-help-me-with-my-homework/27439)

<div class="topic-metadata">

**Author:** [@campervi](https://discourse.processing.org/u/campervi)\
**Replies:** 2\
**Last updated:** [January 29, 2021, 9:40am UTC](https://discourse.processing.org/t/pls-help-me-with-my-homework/27439 "2021-01-29T09:40:34Z")

</div>

Please help me with my homework. No.1 -Size 500 x 500 -Background: White -Rectangle start: x = 10, y = 30 -Rectangle size 40 horizontal and 30 vertical -Use width / height variables -Color: Make gradiation occur I…

---

## [Identify / Understand a Function in a Code](https://discourse.processing.org/t/identify-understand-a-function-in-a-code/27450)

<div class="topic-metadata">

**Author:** [@maneschka](https://discourse.processing.org/u/maneschka)\
**Replies:** 2\
**Last updated:** [January 29, 2021, 2:14am UTC](https://discourse.processing.org/t/identify-understand-a-function-in-a-code/27450 "2021-01-29T02:14:17Z")

</div>

Hi! I found this code in OpenProcessing and I want to change some of its functions, I have been trying to understand the code but I simply cant. So, what I’m trying to do, is that instead of manipulating the mesh with t…

---

## [Adding a random value to each item in array?](https://discourse.processing.org/t/adding-a-random-value-to-each-item-in-array/27430)

<div class="topic-metadata">

**Author:** [@Marinus](https://discourse.processing.org/u/Marinus)\
**Replies:** 3\
**Last updated:** [January 29, 2021, 1:16am UTC](https://discourse.processing.org/t/adding-a-random-value-to-each-item-in-array/27430 "2021-01-29T01:16:57Z")

</div>

Hello, I am trying to achieve a loop that runs through an array with 120 values for sin and a second array that runs through 120 values for cos. Every time the loop runs I want to add a random number to the previous valu…

---

## [Help with Arduino and processing connection](https://discourse.processing.org/t/help-with-arduino-and-processing-connection/27422)

<div class="topic-metadata">

**Author:** [@TiBasic](https://discourse.processing.org/u/TiBasic)\
**Replies:** 5\
**Last updated:** [January 28, 2021, 9:49pm UTC](https://discourse.processing.org/t/help-with-arduino-and-processing-connection/27422 "2021-01-28T21:49:58Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I’m trying to connect a processing program to arduino. It’s for a heart sensor. It works great except that the processing code can repeat the ar…

---

## [What codecs are supported by the Video library?](https://discourse.processing.org/t/what-codecs-are-supported-by-the-video-library/27442)

<div class="topic-metadata">

**Author:** [@esc746](https://discourse.processing.org/u/esc746)\
**Replies:** 0\
**Last updated:** [January 28, 2021, 7:29pm UTC](https://discourse.processing.org/t/what-codecs-are-supported-by-the-video-library/27442 "2021-01-28T19:29:56Z")

</div>

Seems strange to me the documentation for the Video library doesn’t mention what codecs are supported. The first three files I have tried do not load. Also: Which would be the optimal codec if I was to pre-process video…

---

## [Sinusoidal wave made out of dots](https://discourse.processing.org/t/sinusoidal-wave-made-out-of-dots/27368)

<div class="topic-metadata">

**Author:** [@Pastaz](https://discourse.processing.org/u/Pastaz)\
**Replies:** 12\
**Last updated:** [January 28, 2021, 3:18pm UTC](https://discourse.processing.org/t/sinusoidal-wave-made-out-of-dots/27368 "2021-01-28T15:18:17Z")

</div>

Hello, I’m stuck on a code for an output of a sinusoidal wave made out of single dots, i’m looking for a solution without using vertexCurve(). Please have a look at the image below for a better explanation: …

---

## [Run Processing on 2GB Futro S900 - maybe on Win 7?](https://discourse.processing.org/t/run-processing-on-2gb-futro-s900-maybe-on-win-7/27429)

<div class="topic-metadata">

**Author:** [@mamue](https://discourse.processing.org/u/mamue)\
**Replies:** 0\
**Last updated:** [January 28, 2021, 9:55am UTC](https://discourse.processing.org/t/run-processing-on-2gb-futro-s900-maybe-on-win-7/27429 "2021-01-28T09:55:08Z")

</div>

Hey all, I have a small, easy mathematics code created in processing on my Win 10 laptop. Now I need to transfer the work to a smaller computer, because I need to make an installation. So I want to buy such a small Fut…

---

## [Help with interfaces and abstract classes](https://discourse.processing.org/t/help-with-interfaces-and-abstract-classes/27424)

<div class="topic-metadata">

**Author:** [@EliTheIceMan](https://discourse.processing.org/u/EliTheIceMan)\
**Replies:** 1\
**Last updated:** [January 28, 2021, 7:50am UTC](https://discourse.processing.org/t/help-with-interfaces-and-abstract-classes/27424 "2021-01-28T07:50:29Z")

</div>

So I’m working on a program to control real world light fixtures. I have made a class for each type of light that encompasses all the traits of the fixture type and then an instance is created for each of the real word …

---

## [Is it possible to move image pixels in Processing?](https://discourse.processing.org/t/is-it-possible-to-move-image-pixels-in-processing/27361)

<div class="topic-metadata">

**Author:** [@probeginner](https://discourse.processing.org/u/probeginner)\
**Replies:** 2\
**Last updated:** [January 28, 2021, 5:09am UTC](https://discourse.processing.org/t/is-it-possible-to-move-image-pixels-in-processing/27361 "2021-01-28T05:09:27Z")

</div>

Hello, I am new to Processing! I just started self-studying Processing to visualize my idea. My final goal is to create a video that shows an image reacts to the sound. In the video, the image pixels that are located o…

---

## [How to detect global keystrokes?](https://discourse.processing.org/t/how-to-detect-global-keystrokes/27413)

<div class="topic-metadata">

**Author:** [@dacoconutchemist](https://discourse.processing.org/u/dacoconutchemist)\
**Replies:** 2\
**Last updated:** [January 27, 2021, 8:34pm UTC](https://discourse.processing.org/t/how-to-detect-global-keystrokes/27413 "2021-01-27T20:34:18Z")

</div>

Is there a way to detect keystrokes when the sketch window is not active? I would like to read each keyPressed event even if another application has focus and the sketch is in background.

---

## [Creating 3D objects](https://discourse.processing.org/t/creating-3d-objects/27411)

<div class="topic-metadata">

**Author:** [@proc8888](https://discourse.processing.org/u/proc8888)\
**Replies:** 1\
**Last updated:** [January 27, 2021, 4:53pm UTC](https://discourse.processing.org/t/creating-3d-objects/27411 "2021-01-27T16:53:08Z")

</div>

I am currently coding some 3D shapes using P3D mode (with and without the use of void draw()). The aim is to create 3D file in format OBJ, which can be then used eg. for fabrication such as 3D printing. I have several …

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

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