# Coding Questions

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

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

**Page:** 79

---

## [A question about coding (bar chart race)](https://discourse.processing.org/t/a-question-about-coding-bar-chart-race/24319)

<div class="topic-metadata">

**Author:** [@DubTheGamer](https://discourse.processing.org/u/DubTheGamer)\
**Replies:** 16\
**Last updated:** [October 6, 2020, 7:28pm UTC](https://discourse.processing.org/t/a-question-about-coding-bar-chart-race/24319 "2020-10-06T19:28:16Z")

</div>

So I’m new to Processing 3, and would love to know how to make a bar chart race similar to this one: https://www.youtube.com/watch?v=ZkcaANwCrMQ

---

## [Game collision dection problem](https://discourse.processing.org/t/game-collision-dection-problem/24415)

<div class="topic-metadata">

**Author:** [@lupos](https://discourse.processing.org/u/lupos)\
**Replies:** 0\
**Last updated:** [October 7, 2020, 5:54pm UTC](https://discourse.processing.org/t/game-collision-dection-problem/24415 "2020-10-07T17:54:25Z")

</div>

hi this is for a university project. on line 223 I am having trouble making so the player doesn’t go over the water. I cant figure out a way for the player to not move over the water without the player getting stuck cou…

---

## [CodeTrain Circlepacking with random sticky colors](https://discourse.processing.org/t/codetrain-circlepacking-with-random-sticky-colors/24390)

<div class="topic-metadata">

**Author:** [@keddefar](https://discourse.processing.org/u/keddefar)\
**Replies:** 2\
**Last updated:** [October 7, 2020, 11:26am UTC](https://discourse.processing.org/t/codetrain-circlepacking-with-random-sticky-colors/24390 "2020-10-07T11:26:46Z")

</div>

Hi there - very new to Processing, so be gentle :slight\_smile: Starting with some coding train tutorials and modding a bit along the way, below code is an example of that. I want to fill the circles with colors from a …

---

## [Button clicked when not visible](https://discourse.processing.org/t/button-clicked-when-not-visible/23887)

<div class="topic-metadata">

**Author:** [@Ladan](https://discourse.processing.org/u/Ladan)\
**Replies:** 3\
**Last updated:** [October 7, 2020, 11:20am UTC](https://discourse.processing.org/t/button-clicked-when-not-visible/23887 "2020-10-07T11:20:54Z")

</div>

When clicking the Quiz button at a point, where the “richtig” or the “falsch” button would be, like on the left of the i, im not shown the first question, but the result screen, so the question is answered with the click…

---

## [Mouse moved() function](https://discourse.processing.org/t/mouse-moved-function/24373)

<div class="topic-metadata">

**Author:** [@thughes](https://discourse.processing.org/u/thughes)\
**Replies:** 7\
**Last updated:** [October 7, 2020, 10:46am UTC](https://discourse.processing.org/t/mouse-moved-function/24373 "2020-10-07T10:46:16Z")

</div>

This is what I am trying to re-create. I have this so far…i have the 1st square, but i don’t know how to get the last 3. void setup() {size (400, 400); background (0);} int value = 0; void draw() { fill(255, 255,…

---

## [Convolution Solution? Changing size and shape](https://discourse.processing.org/t/convolution-solution-changing-size-and-shape/24393)

<div class="topic-metadata">

**Author:** [@stellakramer](https://discourse.processing.org/u/stellakramer)\
**Replies:** 1\
**Last updated:** [October 7, 2020, 8:54am UTC](https://discourse.processing.org/t/convolution-solution-changing-size-and-shape/24393 "2020-10-07T08:54:16Z")

</div>

Hellooo, I have a question. I’m very much a beginner to Processing and I’m kind of struggling to figure everything out. For an art installation I’m making right now I’m using processing to hopefully make a visual that c…

---

## [Problème d'animation](https://discourse.processing.org/t/probleme-danimation/24372)

<div class="topic-metadata">

**Author:** [@nina](https://discourse.processing.org/u/nina)\
**Replies:** 5\
**Last updated:** [October 6, 2020, 4:20pm UTC](https://discourse.processing.org/t/probleme-danimation/24372 "2020-10-06T16:20:36Z")

</div>

Bonsoir , j’ai un problème avec mon programme j’ai fait une maison mais, je n’arrive pas à intégrer la pluie (comme animation). Ce sont les codes mit en commentaire dans mon programme . Pouvez-vous m’aidez à corriger …

---

## [Web Scraping code](https://discourse.processing.org/t/web-scraping-code/12002)

<div class="topic-metadata">

**Author:** [@zara2355](https://discourse.processing.org/u/zara2355)\
**Replies:** 17\
**Last updated:** [October 6, 2020, 9:08am UTC](https://discourse.processing.org/t/web-scraping-code/12002 "2020-10-06T09:08:08Z")

</div>

hello all, Im super new to Processing and am trying to figure out how to write a sketch that can grab numeric data from a website, specifically wind-speed from the national weather service Link: (https://forecast.weathe…

---

## [Help with refreshing shaders](https://discourse.processing.org/t/help-with-refreshing-shaders/24374)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 1\
**Last updated:** [October 6, 2020, 4:01am UTC](https://discourse.processing.org/t/help-with-refreshing-shaders/24374 "2020-10-06T04:01:54Z")

</div>

I am looking for a sobel shader which will allow me to change the multiplier. i found the following and have used the following shader provided however the shader doesn’t refresh. Now the default edge detection…

---

## [Why am I receiving NaN? What's wrong?](https://discourse.processing.org/t/why-am-i-receiving-nan-whats-wrong/24359)

<div class="topic-metadata">

**Author:** [@CrossAlex21](https://discourse.processing.org/u/CrossAlex21)\
**Replies:** 5\
**Last updated:** [October 6, 2020, 3:26am UTC](https://discourse.processing.org/t/why-am-i-receiving-nan-whats-wrong/24359 "2020-10-06T03:26:25Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hello! I am very new to processing js and I am in a “special” group in my class (it means I have done programming). We were making a calculator…

---

## [\<Code to integrate profile ICC for PGraphicsPDF/\>](https://discourse.processing.org/t/code-to-integrate-profile-icc-for-pgraphicspdf/24370)

<div class="topic-metadata">

**Author:** [@Claude-CLd1](https://discourse.processing.org/u/Claude-CLd1)\
**Replies:** 0\
**Last updated:** [October 5, 2020, 9:17pm UTC](https://discourse.processing.org/t/code-to-integrate-profile-icc-for-pgraphicspdf/24370 "2020-10-05T21:17:38Z")

</div>

Hello, do you know how to include a profil ICC into the PDF file create with PGraphicsPDF. Thank you for your help

---

## [How to write titles and legends in 2D fashion when working in P3D?](https://discourse.processing.org/t/how-to-write-titles-and-legends-in-2d-fashion-when-working-in-p3d/19610)

<div class="topic-metadata">

**Author:** [@Samizen](https://discourse.processing.org/u/Samizen)\
**Replies:** 4\
**Last updated:** [October 5, 2020, 6:06pm UTC](https://discourse.processing.org/t/how-to-write-titles-and-legends-in-2d-fashion-when-working-in-p3d/19610 "2020-10-05T18:06:31Z")

</div>

I have completed my sketch in working in P3D mode apart from titles and legends. How do I write these texts normally like 2D when working from this mode. I’ve introduced a camera in the sketch to enable panning and zoomi…

---

## [Using Pixels\[\] Array over Points • trying to move Pixels(XY) off screen like Points](https://discourse.processing.org/t/using-pixels-array-over-points-trying-to-move-pixels-xy-off-screen-like-points/24309)

<div class="topic-metadata">

**Author:** [@Gus\_Fermin](https://discourse.processing.org/u/Gus_Fermin)\
**Replies:** 1\
**Last updated:** [October 5, 2020, 10:28am UTC](https://discourse.processing.org/t/using-pixels-array-over-points-trying-to-move-pixels-xy-off-screen-like-points/24309 "2020-10-05T10:28:16Z")

</div>

Hello there, A beginner here :slight\_smile: trying desperately to understand the pixels array but feeling a bit lost / confused still. I have done a sketch using many point(), and was able to do what seems like a meltin…

---

## [PImage and renderer](https://discourse.processing.org/t/pimage-and-renderer/24355)

<div class="topic-metadata">

**Author:** [@MiguelSanches](https://discourse.processing.org/u/MiguelSanches)\
**Replies:** 0\
**Last updated:** [October 5, 2020, 12:04pm UTC](https://discourse.processing.org/t/pimage-and-renderer/24355 "2020-10-05T12:04:22Z")

</div>

Hi all, I am designing a GUI and I have some images that I use (all in .png) I am using the default renderer in processing because I have designed some buttons and their quality looks good (below). However, the images …

---

## [Can't figure out how to get a value stored/used after clicking (calculator)](https://discourse.processing.org/t/cant-figure-out-how-to-get-a-value-stored-used-after-clicking-calculator/24322)

<div class="topic-metadata">

**Author:** [@yaboi999](https://discourse.processing.org/u/yaboi999)\
**Replies:** 12\
**Last updated:** [October 5, 2020, 1:58am UTC](https://discourse.processing.org/t/cant-figure-out-how-to-get-a-value-stored-used-after-clicking-calculator/24322 "2020-10-05T01:58:18Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hello, Below I am attaching the code for a project I am working on. The goal is to create a calculator (GUI doesn’t matter as long as it has cl…

---

## [Passing Custom Vertex Attributes to Vertex Shader](https://discourse.processing.org/t/passing-custom-vertex-attributes-to-vertex-shader/24342)

<div class="topic-metadata">

**Author:** [@michaelnighttime](https://discourse.processing.org/u/michaelnighttime)\
**Replies:** 0\
**Last updated:** [October 4, 2020, 9:01pm UTC](https://discourse.processing.org/t/passing-custom-vertex-attributes-to-vertex-shader/24342 "2020-10-04T21:01:19Z")

</div>

Trying to understand how to pass custom per-vertex Attributes along to be used in the shaders in processing 3, but seem to be missing something. In processing s = createShape(); s.beginShape(POINTS); for(int i …

---

## [Saving a PDF with P3D or P2D renderer](https://discourse.processing.org/t/saving-a-pdf-with-p3d-or-p2d-renderer/24267)

<div class="topic-metadata">

**Author:** [@Jochem](https://discourse.processing.org/u/Jochem)\
**Replies:** 2\
**Last updated:** [October 4, 2020, 6:11pm UTC](https://discourse.processing.org/t/saving-a-pdf-with-p3d-or-p2d-renderer/24267 "2020-10-04T18:11:55Z")

</div>

Hello everyone, So basically, I’m trying to draw Mars in a 3D space, which I have to save to a PDF file. In order to do that more easily, I made a second project where I only make the texture which will overlay the sphe…

---

## [Creating/using/deleting a con folder in Processing](https://discourse.processing.org/t/creating-using-deleting-a-con-folder-in-processing/24330)

<div class="topic-metadata">

**Author:** [@Optyfen\_met\_Eenden](https://discourse.processing.org/u/Optyfen_met_Eenden)\
**Replies:** 8\
**Last updated:** [October 4, 2020, 4:18pm UTC](https://discourse.processing.org/t/creating-using-deleting-a-con-folder-in-processing/24330 "2020-10-04T16:18:27Z")

</div>

Dear ladies and gentlepeople, I’m using Processing in Java Mode, and my question is about to create a con folder in Processing. I’ve used this technique in Batch before, using the commands in cmd.exe, you can see the c…

---

## [Combining multiple PShapes](https://discourse.processing.org/t/combining-multiple-pshapes/24326)

<div class="topic-metadata">

**Author:** [@tea](https://discourse.processing.org/u/tea)\
**Replies:** 2\
**Last updated:** [October 4, 2020, 11:08am UTC](https://discourse.processing.org/t/combining-multiple-pshapes/24326 "2020-10-04T11:08:53Z")

</div>

Sorry in advance if I’m asking in the wrong forum or doing anything wrong, I’ve only been at this for a couple weeks. It’s for a school assignment I’m stuck on for days already so I thought it’s time to ask for help. I’…

---

## [Balls bouncing off each other, without using Box2D or other libraries](https://discourse.processing.org/t/balls-bouncing-off-each-other-without-using-box2d-or-other-libraries/24286)

<div class="topic-metadata">

**Author:** [@HumanoidX](https://discourse.processing.org/u/HumanoidX)\
**Replies:** 11\
**Last updated:** [October 4, 2020, 2:18am UTC](https://discourse.processing.org/t/balls-bouncing-off-each-other-without-using-box2d-or-other-libraries/24286 "2020-10-04T02:18:03Z")

</div>

This is my code: Circle\[\] circles = { new Circle(40,color(0),color(255,0,0),0,2,0,0.5,new PVector(250,300),new PVector(0,0)), new Circle(200,color(0),color(255,0,0),0,10,0,0.5,new PVector(500,300),new PVector(0,0)),…

---

## [Petit problème d'animation](https://discourse.processing.org/t/petit-probleme-danimation/24295)

<div class="topic-metadata">

**Author:** [@nina](https://discourse.processing.org/u/nina)\
**Replies:** 4\
**Last updated:** [October 3, 2020, 8:14am UTC](https://discourse.processing.org/t/petit-probleme-danimation/24295 "2020-10-03T08:14:57Z")

</div>

Bonjour , j’ai un petit souci je voudrais faire une animation sur processing. Le concept est la suivante , je voudrais faire de la pluie mais, je n’y arrive pas s’il vous plait aidez-moi . voici le programme que j’ai fa…

---

## [keyPressed and keyReleased](https://discourse.processing.org/t/keypressed-and-keyreleased/24296)

<div class="topic-metadata">

**Author:** [@jaspervb](https://discourse.processing.org/u/jaspervb)\
**Replies:** 3\
**Last updated:** [October 2, 2020, 11:23pm UTC](https://discourse.processing.org/t/keypressed-and-keyreleased/24296 "2020-10-02T23:23:59Z")

</div>

Hello there, I need some help with processing. I am using the following code to lock and unlock rectangles with keycode. This works perfectly… In this case i want to add the following posibility: when you press a key …

---

## [Contents Of The Folder Not Being Copied With It](https://discourse.processing.org/t/contents-of-the-folder-not-being-copied-with-it/24293)

<div class="topic-metadata">

**Author:** [@Charlie\_Dev](https://discourse.processing.org/u/Charlie_Dev)\
**Replies:** 0\
**Last updated:** [October 2, 2020, 7:56pm UTC](https://discourse.processing.org/t/contents-of-the-folder-not-being-copied-with-it/24293 "2020-10-02T19:56:26Z")

</div>

I am copying files, but I need to copy folders. When I try to copy a folder the folder gets duplicated but there is nothing inside of it. I think there are 2 solutions but I don’t know how to do either. I could either fi…

---

## [Item Generator for D&D](https://discourse.processing.org/t/item-generator-for-d-d/24250)

<div class="topic-metadata">

**Author:** [@Artra97](https://discourse.processing.org/u/Artra97)\
**Replies:** 3\
**Last updated:** [September 30, 2020, 9:17pm UTC](https://discourse.processing.org/t/item-generator-for-d-d/24250 "2020-09-30T21:17:33Z")

</div>

Hello! Since I would like to start playing D&D, and also want to make things easier for me in the long run, I’m planning on making an item creator. The code I have so far allows me to write out an item, and save the da…

---

## [How to create infinite zoom with image mosaic](https://discourse.processing.org/t/how-to-create-infinite-zoom-with-image-mosaic/24264)

<div class="topic-metadata">

**Author:** [@newbie](https://discourse.processing.org/u/newbie)\
**Replies:** 0\
**Last updated:** [October 1, 2020, 11:29am UTC](https://discourse.processing.org/t/how-to-create-infinite-zoom-with-image-mosaic/24264 "2020-10-01T11:29:23Z")

</div>

Hello everyone, I am new with the Processing language. I am trying to make processing animation with infinite zoom of image mosaic. I saw a discussion about this in the discourse processing foundation titled as “2001 A S…

---

## [Creating vertical lines](https://discourse.processing.org/t/creating-vertical-lines/24251)

<div class="topic-metadata">

**Author:** [@thughes](https://discourse.processing.org/u/thughes)\
**Replies:** 6\
**Last updated:** [October 1, 2020, 8:04am UTC](https://discourse.processing.org/t/creating-vertical-lines/24251 "2020-10-01T08:04:17Z")

</div>

Create a user defined function called drawLines() that has a strokeWeight(3) and a random r, g, b value with lower red, medium green and higher blue values. \*\*\*\*What is it telling me to do with the colors? This is what…

---

## [Drawing circles at the top](https://discourse.processing.org/t/drawing-circles-at-the-top/24258)

<div class="topic-metadata">

**Author:** [@thughes](https://discourse.processing.org/u/thughes)\
**Replies:** 1\
**Last updated:** [October 1, 2020, 2:16am UTC](https://discourse.processing.org/t/drawing-circles-at-the-top/24258 "2020-10-01T02:16:38Z")

</div>

I have to create these circles at the top and for some reason I can’t get them centered…at the beginning, it starts with half a circle. What am i doing wrong? here is my code public void drawCircles() { fill(255); …

---

## [Making a Display Screen](https://discourse.processing.org/t/making-a-display-screen/24108)

<div class="topic-metadata">

**Author:** [@FloorBean](https://discourse.processing.org/u/FloorBean)\
**Replies:** 5\
**Last updated:** [September 30, 2020, 8:38pm UTC](https://discourse.processing.org/t/making-a-display-screen/24108 "2020-09-30T20:38:03Z")

</div>

Hi, I wanted to make a title screen with a play button and a directions button. I know the logic behind it but I am not quite sure how to make it within classes. bubble b1; bubble b2; bubble b3; bubble b4; bubble b5; in…

---

## [Help me with collision detection with screen walls](https://discourse.processing.org/t/help-me-with-collision-detection-with-screen-walls/24248)

<div class="topic-metadata">

**Author:** [@Cal\_codes](https://discourse.processing.org/u/Cal_codes)\
**Replies:** 1\
**Last updated:** [September 30, 2020, 7:30pm UTC](https://discourse.processing.org/t/help-me-with-collision-detection-with-screen-walls/24248 "2020-09-30T19:30:55Z")

</div>

//defining classes Player player1; void setup() { size(1200, 800); player1 = new Player(width/2, 100, 60); } void draw() { background(0); stroke(255); strokeWeight(3); // draw players fill(255); noStroke(); …

---

## [Why does uncommenting this line of code increase sketch performance by 20 times faster?](https://discourse.processing.org/t/why-does-uncommenting-this-line-of-code-increase-sketch-performance-by-20-times-faster/23944)

<div class="topic-metadata">

**Author:** [@adamskii\_uk](https://discourse.processing.org/u/adamskii_uk)\
**Replies:** 15\
**Last updated:** [September 30, 2020, 1:53pm UTC](https://discourse.processing.org/t/why-does-uncommenting-this-line-of-code-increase-sketch-performance-by-20-times-faster/23944 "2020-09-30T13:53:23Z")

</div>

Hi :smiley: Yesterday, I started writing a 2D game engine from scratch in JAVA, and I was benchmarking every single line of code I added to my class to keep the framerate high. Then after around 2 hours of writing my c…

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

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