# Coding Questions

**URL:** https://discourse.processing.org/c/processing/processing-questions/15.md?page=187

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

**Page:** 188

---

## [Coding problems](https://discourse.processing.org/t/coding-problems/496)

<div class="topic-metadata">

**Author:** [@Mikey](https://discourse.processing.org/u/Mikey)\
**Replies:** 5\
**Last updated:** [May 29, 2018, 6:31pm UTC](https://discourse.processing.org/t/coding-problems/496 "2018-05-29T18:31:32Z")

</div>

ive been at this for a little bit now and im stuck and i dont know what to do. there is an error but idk where. import processing.serial.\*; Serial myPort; PImage logo; int bgcolor=0; void setup(){ size(1,1); surface.…

---

## [Using arrays inside for loops](https://discourse.processing.org/t/using-arrays-inside-for-loops/481)

<div class="topic-metadata">

**Author:** [@Focksbot](https://discourse.processing.org/u/Focksbot)\
**Replies:** 4\
**Last updated:** [May 29, 2018, 5:22pm UTC](https://discourse.processing.org/t/using-arrays-inside-for-loops/481 "2018-05-29T17:22:31Z")

</div>

Pretty simple question, I hope. Why does this first piece of code draw three lovely mountains, while the second does nothing? First bit: void setup(){ size(800,420); //size of mountains } int array\[0\] = 0; int array…

---

## [How to use heat map colors to filter a person's silhouette?](https://discourse.processing.org/t/how-to-use-heat-map-colors-to-filter-a-persons-silhouette/304)

<div class="topic-metadata">

**Author:** [@clab](https://discourse.processing.org/u/clab)\
**Replies:** 17\
**Last updated:** [May 29, 2018, 3:50pm UTC](https://discourse.processing.org/t/how-to-use-heat-map-colors-to-filter-a-persons-silhouette/304 "2018-05-29T15:50:22Z")

</div>

Hi all I am doing a project with a friend and we wanted to filter the heatmap colors to a person’s silhouette when they walk in front of the kinect camera. I am able to enable users, but from there I am not sure what to …

---

## [Loop not running](https://discourse.processing.org/t/loop-not-running/489)

<div class="topic-metadata">

**Author:** [@ag123](https://discourse.processing.org/u/ag123)\
**Replies:** 4\
**Last updated:** [May 29, 2018, 2:50pm UTC](https://discourse.processing.org/t/loop-not-running/489 "2018-05-29T14:50:31Z")

</div>

hi i’m starting out with processing currently using processing 3.3.3 core. i’m using processing core jar library and doing so in eclipse as described here: https://processing.org/tutorials/eclipse/ my codes is as foll…

---

## [Iterating a variable within a recursive drawing](https://discourse.processing.org/t/iterating-a-variable-within-a-recursive-drawing/321)

<div class="topic-metadata">

**Author:** [@Focksbot](https://discourse.processing.org/u/Focksbot)\
**Replies:** 2\
**Last updated:** [May 29, 2018, 12:42am UTC](https://discourse.processing.org/t/iterating-a-variable-within-a-recursive-drawing/321 "2018-05-29T00:42:35Z")

</div>

Hi! I’m playing around with the code for Casey Reas’ Repeat: Recursion Tree ( http://formandcode.com/code-examples/repeat-recursive-tree ). I’d like to change it so that instead of there being a 2% chance of it creating…

---

## [Movie Library, plus Kinect/El Capitan: movie playback issues, Kinect depth data](https://discourse.processing.org/t/movie-library-plus-kinect-el-capitan-movie-playback-issues-kinect-depth-data/319)

<div class="topic-metadata">

**Author:** [@moedigs](https://discourse.processing.org/u/moedigs)\
**Replies:** 1\
**Last updated:** [May 28, 2018, 10:16pm UTC](https://discourse.processing.org/t/movie-library-plus-kinect-el-capitan-movie-playback-issues-kinect-depth-data/319 "2018-05-28T22:16:56Z")

</div>

Hi there, Running a sketch with a movie and floating images on top of it. The movie is running super slowly-- maybe half its intended frame rate. Hoping to incorporate Kinect for the position of the images, currently i…

---

## [Calendar - how can i get the first day of month by processing?](https://discourse.processing.org/t/calendar-how-can-i-get-the-first-day-of-month-by-processing/468)

<div class="topic-metadata">

**Author:** [@basher24](https://discourse.processing.org/u/basher24)\
**Replies:** 3\
**Last updated:** [May 28, 2018, 10:05pm UTC](https://discourse.processing.org/t/calendar-how-can-i-get-the-first-day-of-month-by-processing/468 "2018-05-28T22:05:05Z")

</div>

how can i get the first day of month by processing ? Sunday or Monday Or … Or Saturday thanx Basher

---

## [Why is there an array out of bounds here?](https://discourse.processing.org/t/why-is-there-an-array-out-of-bounds-here/476)

<div class="topic-metadata">

**Author:** [@frankbaugh](https://discourse.processing.org/u/frankbaugh)\
**Replies:** 4\
**Last updated:** [May 28, 2018, 9:23pm UTC](https://discourse.processing.org/t/why-is-there-an-array-out-of-bounds-here/476 "2018-05-28T21:23:27Z")

</div>

mover\[\] james; attractor ben; boolean start = false; float\[\]\[\]\[\] orbits = new float\[5\]\[20000\]\[1\]; int njames = 5; int orbitcount = 0; float fconstant = 0.005; void setup() { size(800, 800); james = new mover\[njames\]; …

---

## [Getting started with Shaders](https://discourse.processing.org/t/getting-started-with-shaders/296)

<div class="topic-metadata">

**Author:** [@justin\_lincoln](https://discourse.processing.org/u/justin_lincoln)\
**Replies:** 12\
**Last updated:** [May 28, 2018, 3:04pm UTC](https://discourse.processing.org/t/getting-started-with-shaders/296 "2018-05-28T15:04:29Z")

</div>

Hi folks. I’ve enjoyed and recommend https://thebookofshaders.com/. I find the subject fascinating and have successfully run a few other people’s shaders. However I have an embarrassingly basic question. When I try to ru…

---

## [Problem with reading a .csv file](https://discourse.processing.org/t/problem-with-reading-a-csv-file/312)

<div class="topic-metadata">

**Author:** [@azbi](https://discourse.processing.org/u/azbi)\
**Replies:** 21\
**Last updated:** [May 28, 2018, 1:41am UTC](https://discourse.processing.org/t/problem-with-reading-a-csv-file/312 "2018-05-28T01:41:13Z")

</div>

Hello, I have a problem in my program when I decide to read a .csv file, it appears line by line but each word is separated by a semicolon (I have trouble explaining this problem but I think that you understand what is h…

---

## [ArrayList Processing](https://discourse.processing.org/t/arraylist-processing/410)

<div class="topic-metadata">

**Author:** [@Hedre](https://discourse.processing.org/u/Hedre)\
**Replies:** 6\
**Last updated:** [May 27, 2018, 11:14am UTC](https://discourse.processing.org/t/arraylist-processing/410 "2018-05-27T11:14:33Z")

</div>

Hi Firstly, I’m french, so my english is not so good :slight\_smile: and I have trouble using the forum I programmed a kind of Space Invaders, it’s a project for the school. I must have finished him for monday but I hav…

---

## [Struggling with code - New programmer](https://discourse.processing.org/t/struggling-with-code-new-programmer/150)

<div class="topic-metadata">

**Author:** [@sabz20005](https://discourse.processing.org/u/sabz20005)\
**Replies:** 10\
**Last updated:** [May 27, 2018, 6:09am UTC](https://discourse.processing.org/t/struggling-with-code-new-programmer/150 "2018-05-27T06:09:41Z")

</div>

Hey guys, this is my first post so I hope I hope I’m doing this correctly. I am trying to create a code where each time an object hits the bottom of the screen a new circle is on the screen, starting in the top left scre…

---

## [Assign multiple random colors to Kinect users on screen](https://discourse.processing.org/t/assign-multiple-random-colors-to-kinect-users-on-screen/422)

<div class="topic-metadata">

**Author:** [@clab](https://discourse.processing.org/u/clab)\
**Replies:** 4\
**Last updated:** [May 27, 2018, 2:30am UTC](https://discourse.processing.org/t/assign-multiple-random-colors-to-kinect-users-on-screen/422 "2018-05-27T02:30:00Z")

</div>

This is a school project and I am having trouble. I want to add more than one color, for now, I am only able to add pink color(255, 0, 140); when a person is n front of the Kinect. I would want random colors to appear ea…

---

## [Getting the sums of an array](https://discourse.processing.org/t/getting-the-sums-of-an-array/402)

<div class="topic-metadata">

**Author:** [@dereklop](https://discourse.processing.org/u/dereklop)\
**Replies:** 2\
**Last updated:** [May 26, 2018, 5:47pm UTC](https://discourse.processing.org/t/getting-the-sums-of-an-array/402 "2018-05-26T17:47:53Z")

</div>

This is my code i have cvs file with values and dates in it. I want to be able to get the average of each day and month. So far i am able to get the value for each month but it would require a lot of input to get all the…

---

## [Detecting large data-sets](https://discourse.processing.org/t/detecting-large-data-sets/358)

<div class="topic-metadata">

**Author:** [@shan](https://discourse.processing.org/u/shan)\
**Replies:** 15\
**Last updated:** [May 26, 2018, 1:51pm UTC](https://discourse.processing.org/t/detecting-large-data-sets/358 "2018-05-26T13:51:42Z")

</div>

Kindly help me to guide how should start implementing using processing. I have attach link below. https://youtu.be/EZgiYYxUT74

---

## [Assign random color to each circle](https://discourse.processing.org/t/assign-random-color-to-each-circle/348)

<div class="topic-metadata">

**Author:** [@jcw016](https://discourse.processing.org/u/jcw016)\
**Replies:** 7\
**Last updated:** [May 25, 2018, 11:49pm UTC](https://discourse.processing.org/t/assign-random-color-to-each-circle/348 "2018-05-25T23:49:20Z")

</div>

I am trying to complete a school project and this is what I have right now (see below). I want to assign a random color to each circle every time - but right now, I am stuck at where the same color is being assigned to a…

---

## [Date form a csv file](https://discourse.processing.org/t/date-form-a-csv-file/380)

<div class="topic-metadata">

**Author:** [@dereklop](https://discourse.processing.org/u/dereklop)\
**Replies:** 9\
**Last updated:** [May 25, 2018, 8:27pm UTC](https://discourse.processing.org/t/date-form-a-csv-file/380 "2018-05-25T20:27:42Z")

</div>

hey im trying to get the date and separate values by it form a csv file i got. Im trying this but im not sure why its now working. here is a preview of my csv file Imgur: The magic of the Internet Cross-posted: Reddit …

---

## [NullPointerExeption with loading images](https://discourse.processing.org/t/nullpointerexeption-with-loading-images/360)

<div class="topic-metadata">

**Author:** [@squatting\_potato](https://discourse.processing.org/u/squatting_potato)\
**Replies:** 2\
**Last updated:** [May 25, 2018, 6:07pm UTC](https://discourse.processing.org/t/nullpointerexeption-with-loading-images/360 "2018-05-25T18:07:40Z")

</div>

Hi, i need to load 4 images and draw them in a window, but i get this error. here’s my code PImage image; PImage image1; PImage image2; PImage image3; String path =""; void setup() { size(360, 240); text("click win…

---

## [Key out color from video](https://discourse.processing.org/t/key-out-color-from-video/324)

<div class="topic-metadata">

**Author:** [@dazadas\_k](https://discourse.processing.org/u/dazadas_k)\
**Replies:** 2\
**Last updated:** [May 25, 2018, 3:15am UTC](https://discourse.processing.org/t/key-out-color-from-video/324 "2018-05-25T03:15:30Z")

</div>

Hey guys! I was wondering - Is it possible to key out green screen from video and replace it with a picture? :roll\_eyes: In a result I imagined that the video is still playing, but all the green space is filled with …

---

## [Problems calculating an average angle](https://discourse.processing.org/t/problems-calculating-an-average-angle/345)

<div class="topic-metadata">

**Author:** [@clankill3r](https://discourse.processing.org/u/clankill3r)\
**Replies:** 1\
**Last updated:** [May 25, 2018, 2:52am UTC](https://discourse.processing.org/t/problems-calculating-an-average-angle/345 "2018-05-25T02:52:26Z")

</div>

I try to calculate an average angle, but it flips on the left side. (And if I allow negative angles then it flips on the right side). (It’s about the purple line) \[37\] How can I correctly create the average angle? f…

---

## [Agents coding work but need add on two variable data](https://discourse.processing.org/t/agents-coding-work-but-need-add-on-two-variable-data/234)

<div class="topic-metadata">

**Author:** [@shan](https://discourse.processing.org/u/shan)\
**Replies:** 28\
**Last updated:** [May 25, 2018, 2:11am UTC](https://discourse.processing.org/t/agents-coding-work-but-need-add-on-two-variable-data/234 "2018-05-25T02:11:50Z")

</div>

\[image\] i need on this coding to add two variable data which i have in csv file format. please help me.

---

## [Pan Tompkins algorithm](https://discourse.processing.org/t/pan-tompkins-algorithm/295)

<div class="topic-metadata">

**Author:** [@netphysicist](https://discourse.processing.org/u/netphysicist)\
**Replies:** 1\
**Last updated:** [May 24, 2018, 1:36am UTC](https://discourse.processing.org/t/pan-tompkins-algorithm/295 "2018-05-24T01:36:54Z")

</div>

Hello, i am working on a project in processing IDE. Does anyone know a template or an example about Pan Tompkins algorithm???

---

## [Heptagon drawing angle](https://discourse.processing.org/t/heptagon-drawing-angle/285)

<div class="topic-metadata">

**Author:** [@jclacko](https://discourse.processing.org/u/jclacko)\
**Replies:** 3\
**Last updated:** [May 23, 2018, 5:27pm UTC](https://discourse.processing.org/t/heptagon-drawing-angle/285 "2018-05-23T17:27:04Z")

</div>

Hey guys and girls. Could someone please help me with a project I am trying to complete. A really nice person over in the Reddit forums helped me get this far but I am stuck at the moment. I have an assignment for my B…

---

## [Add processing to web](https://discourse.processing.org/t/add-processing-to-web/291)

<div class="topic-metadata">

**Author:** [@SlumzGG](https://discourse.processing.org/u/SlumzGG)\
**Replies:** 0\
**Last updated:** [May 23, 2018, 1:47pm UTC](https://discourse.processing.org/t/add-processing-to-web/291 "2018-05-23T13:47:39Z")

</div>

How to add processing programm to a website ?

---

## [Draw() is lagging and not following frameRate](https://discourse.processing.org/t/draw-is-lagging-and-not-following-framerate/283)

<div class="topic-metadata">

**Author:** [@Enkrypton](https://discourse.processing.org/u/Enkrypton)\
**Replies:** 3\
**Last updated:** [May 23, 2018, 6:12am UTC](https://discourse.processing.org/t/draw-is-lagging-and-not-following-framerate/283 "2018-05-23T06:12:59Z")

</div>

I’m making an application using Processing-2. This means using the draw() method to generate GUI. However something messes with the frameRate of the program making it feel way slower and very laggy/choppy. I know my fram…

---

## [using javascript in html](https://discourse.processing.org/t/using-javascript-in-html/211)

<div class="topic-metadata">

**Author:** [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Replies:** 6\
**Last updated:** [May 22, 2018, 2:18am UTC](https://discourse.processing.org/t/using-javascript-in-html/211 "2018-05-22T02:18:47Z")

</div>

So I started using javascript and html to make website and thought it be fun to convert my java games to javascript and place them on my website. I wrote code trying to see my javascript game from the html webpage, but i…

---

## [Need Help: Zoomable interface for a procedural drawing program](https://discourse.processing.org/t/need-help-zoomable-interface-for-a-procedural-drawing-program/243)

<div class="topic-metadata">

**Author:** [@FyodorKrasniy](https://discourse.processing.org/u/FyodorKrasniy)\
**Replies:** 1\
**Last updated:** [May 22, 2018, 7:32am UTC](https://discourse.processing.org/t/need-help-zoomable-interface-for-a-procedural-drawing-program/243 "2018-05-22T07:32:41Z")

</div>

Heya, Ive been trying to figure out how to add a zoom function to this code, its a drawing program in the likes of Mr Doobs harmony - http://mrdoob.com/projects/harmony/ The thing Ive been trying to work out is how to z…

---

## [Can i import my stuff into wallpaper engine?](https://discourse.processing.org/t/can-i-import-my-stuff-into-wallpaper-engine/153)

<div class="topic-metadata">

**Author:** [@MelonGoggles](https://discourse.processing.org/u/MelonGoggles)\
**Replies:** 7\
**Last updated:** [May 21, 2018, 9:48pm UTC](https://discourse.processing.org/t/can-i-import-my-stuff-into-wallpaper-engine/153 "2018-05-21T21:48:32Z")

</div>

\*\*Welcome :slight\_smile: \*\* My name is Luc(16) and last week I installed processing. the past week I have been making quite some stuff with processing already. I showed what I made to a couple of friends and asked me if…

---

## [Reactivision processing loop issue](https://discourse.processing.org/t/reactivision-processing-loop-issue/112)

<div class="topic-metadata">

**Author:** [@Tonym](https://discourse.processing.org/u/Tonym)\
**Replies:** 5\
**Last updated:** [May 21, 2018, 4:27pm UTC](https://discourse.processing.org/t/reactivision-processing-loop-issue/112 "2018-05-21T16:27:41Z")

</div>

hi i am making a math game targeted at kids using reactivision and processing. i want there to be several questions generated randomly and once they have answered correctly a new question is generated. i have tried usin…

---

## [Export of an Java Sketch fails!](https://discourse.processing.org/t/export-of-an-java-sketch-fails/221)

<div class="topic-metadata">

**Author:** [@anongtr911](https://discourse.processing.org/u/anongtr911)\
**Replies:** 3\
**Last updated:** [May 21, 2018, 6:59pm UTC](https://discourse.processing.org/t/export-of-an-java-sketch-fails/221 "2018-05-21T18:59:00Z")

</div>

Dear Community! I am about to create an simple hookah-designer in Processing. Its working on linux, but I would need it on Windows 10. And is there any simple way to get that .java/.jar file running on a web-page? Or …

[Previous page](https://discourse.processing.org/c/processing/processing-questions/15.md?page=186)

[Next page](https://discourse.processing.org/c/processing/processing-questions/15.md?page=188)
