# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?page=159

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

**Page:** 160

---

## [Finding vector pointing "down" on 2d plane](https://discourse.processing.org/t/finding-vector-pointing-down-on-2d-plane/26567)

<div class="topic-metadata">

**Author:** [@arcadeperfect](https://discourse.processing.org/u/arcadeperfect)\
**Replies:** 2\
**Last updated:** [January 2, 2021, 3:23am UTC](https://discourse.processing.org/t/finding-vector-pointing-down-on-2d-plane/26567 "2021-01-02T03:23:26Z")

</div>

I guess this is more math than Processing per se but here goes… The 2D plane exists in 3D space and can rotate in any direction about the origin (from gyro data). How can I find the vector shown in blue that always poi…

---

## [Convert from HSB to RGB](https://discourse.processing.org/t/convert-from-hsb-to-rgb/26672)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 4\
**Last updated:** [January 1, 2021, 7:40pm UTC](https://discourse.processing.org/t/convert-from-hsb-to-rgb/26672 "2021-01-01T19:40:48Z")

</div>

Hi! Can someone send me a function that converts HSB input into RGB? (color formats, RGB = red, green, blue, HSB = hue, saturation, brightness (or Value if it is HSV)) preferred format: color toRGB(int h, int s, int b…

---

## [2 for loops inside a String function](https://discourse.processing.org/t/2-for-loops-inside-a-string-function/26669)

<div class="topic-metadata">

**Author:** [@JoLi](https://discourse.processing.org/u/JoLi)\
**Replies:** 4\
**Last updated:** [January 1, 2021, 4:54pm UTC](https://discourse.processing.org/t/2-for-loops-inside-a-string-function/26669 "2021-01-01T16:54:57Z")

</div>

why is this not working? yea, I know I dont need that boolean finished in the beginning

---

## [How to give circles(ellipses) certain distance, apart from each other? giving random position every time I press key](https://discourse.processing.org/t/how-to-give-circles-ellipses-certain-distance-apart-from-each-other-giving-random-position-every-time-i-press-key/26646)

<div class="topic-metadata">

**Author:** [@yewon](https://discourse.processing.org/u/yewon)\
**Replies:** 10\
**Last updated:** [January 1, 2021, 2:01pm UTC](https://discourse.processing.org/t/how-to-give-circles-ellipses-certain-distance-apart-from-each-other-giving-random-position-every-time-i-press-key/26646 "2021-01-01T14:01:53Z")

</div>

Hi. what I want to do is, Every time I press key, I want to reposition my object inside screen, but each of my object should be apart from each other by certain distance. for example at least the distance should be lar…

---

## [Why multiple windows can't show sketch correctly?](https://discourse.processing.org/t/why-multiple-windows-cant-show-sketch-correctly/26659)

<div class="topic-metadata">

**Author:** [@IpNeNaEcRe](https://discourse.processing.org/u/IpNeNaEcRe)\
**Replies:** 2\
**Last updated:** [January 1, 2021, 7:43am UTC](https://discourse.processing.org/t/why-multiple-windows-cant-show-sketch-correctly/26659 "2021-01-01T07:43:21Z")

</div>

I want to create multiple windows, one to interact (put slide bar in it) and other to show the sketch. Now I can draw line/rectangle/ellipse directly in the second window. When these things in another class and use the c…

---

## [Interacting with images](https://discourse.processing.org/t/interacting-with-images/26648)

<div class="topic-metadata">

**Author:** [@PIlw](https://discourse.processing.org/u/PIlw)\
**Replies:** 2\
**Last updated:** [December 31, 2020, 11:09pm UTC](https://discourse.processing.org/t/interacting-with-images/26648 "2020-12-31T23:09:32Z")

</div>

Hello guys, I am a beginner on processing and i would like to do something : The thing would be to have 2 images mooving across the screen and when they touch eachother they hit and change directions. for the moment I’…

---

## [Need a review to improve this :)](https://discourse.processing.org/t/need-a-review-to-improve-this/26630)

<div class="topic-metadata">

**Author:** [@jeanphih](https://discourse.processing.org/u/jeanphih)\
**Replies:** 7\
**Last updated:** [December 31, 2020, 6:50pm UTC](https://discourse.processing.org/t/need-a-review-to-improve-this/26630 "2020-12-31T18:50:09Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hello, I need some help, i have done this job , could you tell me how i can make my code better ? Here is the code, it s juste some tips to im…

---

## [Sampling Incoming data from serial port](https://discourse.processing.org/t/sampling-incoming-data-from-serial-port/26600)

<div class="topic-metadata">

**Author:** [@saaqib.m](https://discourse.processing.org/u/saaqib.m)\
**Replies:** 2\
**Last updated:** [December 31, 2020, 6:08pm UTC](https://discourse.processing.org/t/sampling-incoming-data-from-serial-port/26600 "2020-12-31T18:08:01Z")

</div>

please format code with \</\> button \* homework policy \* asking questions My code takes incoming data and stores it in a table but currently it takes in all the values that come in to the serial port. I would like to m…

---

## [QuickTime movie is not available](https://discourse.processing.org/t/quicktime-movie-is-not-available/26638)

<div class="topic-metadata">

**Author:** [@ssskkk](https://discourse.processing.org/u/ssskkk)\
**Replies:** 1\
**Last updated:** [December 31, 2020, 3:15pm UTC](https://discourse.processing.org/t/quicktime-movie-is-not-available/26638 "2020-12-31T15:15:14Z")

</div>

Hi, I tried to make movie from QuickTime Movie Maker. I used 「saveFrame(“frames/####.png”);」 in my code, confirmed frame folder, and chose the folder in the QuickTime Movie Maker. but I still can’t push「Create movie」but…

---

## [Can someone explain noise() aka perlinNoise() function?](https://discourse.processing.org/t/can-someone-explain-noise-aka-perlinnoise-function/26627)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 8\
**Last updated:** [December 31, 2020, 1:55pm UTC](https://discourse.processing.org/t/can-someone-explain-noise-aka-perlinnoise-function/26627 "2020-12-31T13:55:29Z")

</div>

Hi! How do I use noise()? I tried a few times but still nothing. I know you can enter a 1D, 2D or 3D input. but this happen void setup() { size(600,600); } void draw() { for(int i = 0; i \< width; i++) { for…

---

## [Animated Mosaic in Processing](https://discourse.processing.org/t/animated-mosaic-in-processing/26609)

<div class="topic-metadata">

**Author:** [@Jboon](https://discourse.processing.org/u/Jboon)\
**Replies:** 1\
**Last updated:** [December 31, 2020, 1:05pm UTC](https://discourse.processing.org/t/animated-mosaic-in-processing/26609 "2020-12-31T13:05:52Z")

</div>

So I’ve watched Dan Shiffman’s lesson on the mosaic and I’m pasting here the code from the lesson and I could understand it (processing newbie here!). What I’d like to do and would appreciate some help with is animating …

---

## [Galaga scrolling background](https://discourse.processing.org/t/galaga-scrolling-background/26527)

<div class="topic-metadata">

**Author:** [@lionR](https://discourse.processing.org/u/lionR)\
**Replies:** 3\
**Last updated:** [December 31, 2020, 1:05pm UTC](https://discourse.processing.org/t/galaga-scrolling-background/26527 "2020-12-31T13:05:42Z")

</div>

I have to create a project in which I chose to create Galaga. I want a vertically scrolling background but don’t know how to achieve that. How would you guys go about something like that?

---

## [Multiplication bug](https://discourse.processing.org/t/multiplication-bug/26619)

<div class="topic-metadata">

**Author:** [@Javier](https://discourse.processing.org/u/Javier)\
**Replies:** 16\
**Last updated:** [December 30, 2020, 11:09pm UTC](https://discourse.processing.org/t/multiplication-bug/26619 "2020-12-30T23:09:29Z")

</div>

Good morning! Can anybody explain to me why the return value of t is -8.311896E7? There is a max value that a variable can have? I can’t understand why it is happening. I have read the reference guide of Processing, …

---

## [Move Map depending on character position](https://discourse.processing.org/t/move-map-depending-on-character-position/26610)

<div class="topic-metadata">

**Author:** [@corken](https://discourse.processing.org/u/corken)\
**Replies:** 2\
**Last updated:** [December 30, 2020, 10:24pm UTC](https://discourse.processing.org/t/move-map-depending-on-character-position/26610 "2020-12-30T22:24:35Z")

</div>

Hello I want to move my tiledMap depending on my characters position. But when I simply set the maps position to the characters position the collision detection goes wild. Any solutions?’ What I tried was map.draw(posi…

---

## [Is it possible to use Compute Shader in Processing?](https://discourse.processing.org/t/is-it-possible-to-use-compute-shader-in-processing/4353)

<div class="topic-metadata">

**Author:** [@Okdalto](https://discourse.processing.org/u/Okdalto)\
**Replies:** 2\
**Last updated:** [December 30, 2020, 6:49pm UTC](https://discourse.processing.org/t/is-it-possible-to-use-compute-shader-in-processing/4353 "2020-12-30T18:49:05Z")

</div>

I use Compute Shader in Unity to control hundreds of particles and wondering if it’s possible to use Compute Shader in Processing too. If it is, where can I find references?

---

## [Turning characters of a String into rectangles](https://discourse.processing.org/t/turning-characters-of-a-string-into-rectangles/26580)

<div class="topic-metadata">

**Author:** [@Sophie](https://discourse.processing.org/u/Sophie)\
**Replies:** 11\
**Last updated:** [December 30, 2020, 2:04pm UTC](https://discourse.processing.org/t/turning-characters-of-a-string-into-rectangles/26580 "2020-12-30T14:04:42Z")

</div>

Hello, I’m having trouble with my code. Basically, I have a text and want every letter to be replaced by a rectangle matching the letter with different colours in a row next to each other. It might seem stupid, but the…

---

## [Sketch is running at low framerate (3fps) i don't know why](https://discourse.processing.org/t/sketch-is-running-at-low-framerate-3fps-i-dont-know-why/26607)

<div class="topic-metadata">

**Author:** [@WillG](https://discourse.processing.org/u/WillG)\
**Replies:** 2\
**Last updated:** [December 30, 2020, 1:54pm UTC](https://discourse.processing.org/t/sketch-is-running-at-low-framerate-3fps-i-dont-know-why/26607 "2020-12-30T13:54:25Z")

</div>

Hello! I’m a student and i have to create a sketch with bus point and density at these bus points. In fact all my sketch is working but at a very low framerate even if i put frameRate(30 or 60). Can someone help me ple…

---

## [How to collision detection?](https://discourse.processing.org/t/how-to-collision-detection/26597)

<div class="topic-metadata">

**Author:** [@corken](https://discourse.processing.org/u/corken)\
**Replies:** 0\
**Last updated:** [December 29, 2020, 8:30pm UTC](https://discourse.processing.org/t/how-to-collision-detection/26597 "2020-12-29T20:30:39Z")

</div>

Hello I try to make a Mario Bros Game. I need some help with the collision. It already detects collision by checking if the tiles around him are an object tile (tile with other value than -1). The problem is that there …

---

## [Kinect v2 resize depth image and color data to same aspect ratio and size](https://discourse.processing.org/t/kinect-v2-resize-depth-image-and-color-data-to-same-aspect-ratio-and-size/26596)

<div class="topic-metadata">

**Author:** [@Ackados](https://discourse.processing.org/u/Ackados)\
**Replies:** 0\
**Last updated:** [December 29, 2020, 8:07pm UTC](https://discourse.processing.org/t/kinect-v2-resize-depth-image-and-color-data-to-same-aspect-ratio-and-size/26596 "2020-12-29T20:07:53Z")

</div>

So the Kinect v2 has a color stream of 1920 x 1080. The depth stream is 512 x 424. The FOV is also different from what I can tell. I tried to resize both streams to 500 x 500 (the size of my canvas). Data from here. if…

---

## [Help with objects](https://discourse.processing.org/t/help-with-objects/26590)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 2\
**Last updated:** [December 29, 2020, 6:02pm UTC](https://discourse.processing.org/t/help-with-objects/26590 "2020-12-29T18:02:02Z")

</div>

Hi! I always had the issue with objects. I want to replicate PVector a = new PVector(x,y,z) with the class Circles. So something like ArrayList\<Circles\> circle = new ArrayList\<Circles\>() circle.add(new Circles( x, y,…

---

## [Beginner Q: Creating Grids and Interacting With Them](https://discourse.processing.org/t/beginner-q-creating-grids-and-interacting-with-them/26588)

<div class="topic-metadata">

**Author:** [@alenmartel](https://discourse.processing.org/u/alenmartel)\
**Replies:** 8\
**Last updated:** [December 29, 2020, 4:13pm UTC](https://discourse.processing.org/t/beginner-q-creating-grids-and-interacting-with-them/26588 "2020-12-29T16:13:23Z")

</div>

Hi all - I’m brand new to Processing (and coding). I’ve done a few hours of coding now (learning via the Learning Processing book by Daniel Shifman) and have taken myself to task with the homework as well as creating a l…

---

## [Using variables with existing variables](https://discourse.processing.org/t/using-variables-with-existing-variables/26584)

<div class="topic-metadata">

**Author:** [@felix.west](https://discourse.processing.org/u/felix.west)\
**Replies:** 3\
**Last updated:** [December 29, 2020, 3:59pm UTC](https://discourse.processing.org/t/using-variables-with-existing-variables/26584 "2020-12-29T15:59:35Z")

</div>

Hi, I’d like to use a variable for an ellipse using another variable already written above. ex: int diameter = 50 int positionX = 200 int positionY = 200 –\> int ellipse1= ellipse(positionX, positionY, dia, dia) So…

---

## [How to change the equation into a code in an nth pendulum?](https://discourse.processing.org/t/how-to-change-the-equation-into-a-code-in-an-nth-pendulum/26558)

<div class="topic-metadata">

**Author:** [@Rafsing](https://discourse.processing.org/u/Rafsing)\
**Replies:** 5\
**Last updated:** [December 29, 2020, 12:28pm UTC](https://discourse.processing.org/t/how-to-change-the-equation-into-a-code-in-an-nth-pendulum/26558 "2020-12-29T12:28:12Z")

</div>

I want to simulate the nth level pendulum (double, triple and so on). I found the equations for the acceleration of the nth pendulum on this page: https://www.researchgate.net/publication/336868500\_Equations\_of\_Motion\_Fo…

---

## [Own programming language: How nested for-loop?](https://discourse.processing.org/t/own-programming-language-how-nested-for-loop/26396)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 3\
**Last updated:** [December 26, 2020, 11:20am UTC](https://discourse.processing.org/t/own-programming-language-how-nested-for-loop/26396 "2020-12-26T11:20:57Z")

</div>

Hello all, I am doing my own programming language at the moment. An interpreter language. When a for-loop is, not so difficult. I have the start line and he jumps x-times back to the start line ( “{” ) from the end li…

---

## [Code android e arduino](https://discourse.processing.org/t/code-android-e-arduino/26364)

<div class="topic-metadata">

**Author:** [@r0x15](https://discourse.processing.org/u/r0x15)\
**Replies:** 20\
**Last updated:** [December 28, 2020, 9:06pm UTC](https://discourse.processing.org/t/code-android-e-arduino/26364 "2020-12-28T21:06:56Z")

</div>

But on processig for Android it is possible that no one has ever used a slider code and an LED to drive Arduino via bluetooth it seems very strange to me

---

## [Drawing polygons with common side](https://discourse.processing.org/t/drawing-polygons-with-common-side/26550)

<div class="topic-metadata">

**Author:** [@ssdesign](https://discourse.processing.org/u/ssdesign)\
**Replies:** 5\
**Last updated:** [December 28, 2020, 7:27pm UTC](https://discourse.processing.org/t/drawing-polygons-with-common-side/26550 "2020-12-28T19:27:24Z")

</div>

I am trying to create multiple polygons with common sides as shown in this video Somehow, if I follow the principle of first drawing a hexagon and then dividing the radius into 6 parts to get the offset dim…

---

## [Custom svg files don't render?](https://discourse.processing.org/t/custom-svg-files-dont-render/26434)

<div class="topic-metadata">

**Author:** [@canslp](https://discourse.processing.org/u/canslp)\
**Replies:** 7\
**Last updated:** [December 28, 2020, 3:14pm UTC](https://discourse.processing.org/t/custom-svg-files-dont-render/26434 "2020-12-28T15:14:09Z")

</div>

so i’m just testing out how processing renders svg files and for some reason it will only work with test ones i’ve downloaded from the internet, and the custom ones i exported from inkscape will compile but don’t show up…

---

## [Custom svg files don't render](https://discourse.processing.org/t/custom-svg-files-dont-render/26480)

<div class="topic-metadata">

**Author:** [@canslp](https://discourse.processing.org/u/canslp)\
**Replies:** 3\
**Last updated:** [December 28, 2020, 3:13pm UTC](https://discourse.processing.org/t/custom-svg-files-dont-render/26480 "2020-12-28T15:13:21Z")

</div>

made a post about this a couple days ago but i couldn’t get the actual data past the spam filter so i’m trying again. i can’t get any custom made svgs to render in processing. test ones i download from the internet work …

---

## [Can someone tell me what is KB error and of course with solution (memory issue)](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554)

<div class="topic-metadata">

**Author:** [@clay21](https://discourse.processing.org/u/clay21)\
**Replies:** 17\
**Last updated:** [December 28, 2020, 1:43pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554 "2020-12-28T13:43:49Z")

</div>

Hello i got like kb error i guess im not giving enough ram for java and i dont know how can i give more can someone tell me how :slight\_smile: Thank you Already

---

## [Real-Time Py and Processing](https://discourse.processing.org/t/real-time-py-and-processing/26551)

<div class="topic-metadata">

**Author:** [@Ginopalombi](https://discourse.processing.org/u/Ginopalombi)\
**Replies:** 3\
**Last updated:** [December 28, 2020, 12:28pm UTC](https://discourse.processing.org/t/real-time-py-and-processing/26551 "2020-12-28T12:28:57Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hello, I’m looking for a solution that can send in real-time an array from python to processing. I think that i may use the OSC, but I’m a begi…

[Previous page](https://discourse.processing.org/c/processing/6.md?page=158)

[Next page](https://discourse.processing.org/c/processing/6.md?page=160)
