# Coding Questions

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

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

**Page:** 96

---

## [Missing Trail of Growing Circle](https://discourse.processing.org/t/missing-trail-of-growing-circle/20659)

<div class="topic-metadata">

**Author:** [@upobir](https://discourse.processing.org/u/upobir)\
**Replies:** 3\
**Last updated:** [May 9, 2020, 11:52am UTC](https://discourse.processing.org/t/missing-trail-of-growing-circle/20659 "2020-05-09T11:52:51Z")

</div>

Hello, I use processing for some hobby drawing. Today while doing such a thing I faced a weird situation. I have a circle that will grow as time passes on, in draw() I did not use any background() call, so this growing c…

---

## [Keeping an ellipse after being drawn](https://discourse.processing.org/t/keeping-an-ellipse-after-being-drawn/20589)

<div class="topic-metadata">

**Author:** [@CanGurbuz](https://discourse.processing.org/u/CanGurbuz)\
**Replies:** 3\
**Last updated:** [May 8, 2020, 4:50pm UTC](https://discourse.processing.org/t/keeping-an-ellipse-after-being-drawn/20589 "2020-05-08T16:50:14Z")

</div>

Hey everyone. I am trying to make a cursor for the map of the game I want to make. I want this cursor of the map like it is in APEX LEGENDS i.e there is a line from the top of the screen to the bottom for your MouseX po…

---

## [Some sort of memory leak in Game of Life](https://discourse.processing.org/t/some-sort-of-memory-leak-in-game-of-life/20608)

<div class="topic-metadata">

**Author:** [@Hypercube](https://discourse.processing.org/u/Hypercube)\
**Replies:** 2\
**Last updated:** [May 8, 2020, 7:35am UTC](https://discourse.processing.org/t/some-sort-of-memory-leak-in-game-of-life/20608 "2020-05-08T07:35:18Z")

</div>

I am coding the Game of Life. It works but there seems to be some sort of issue with the arrays. They grow to a ridiculous size (try drawing a glider and press R and the sizes will be printed to the console). This is odd…

---

## [Confirm on Exit](https://discourse.processing.org/t/confirm-on-exit/20613)

<div class="topic-metadata">

**Author:** [@jamcdonald](https://discourse.processing.org/u/jamcdonald)\
**Replies:** 2\
**Last updated:** [May 8, 2020, 5:21am UTC](https://discourse.processing.org/t/confirm-on-exit/20613 "2020-05-08T05:21:35Z")

</div>

I am trying to make a program where when the X button is clicked, the user is prompted Would you like to save before quitting? Save, Dont Save, Cancel. The problem is, I cant figure out how to cancel closing the window.…

---

## [Multitouch with Windows 10](https://discourse.processing.org/t/multitouch-with-windows-10/20417)

<div class="topic-metadata">

**Author:** [@Gabe](https://discourse.processing.org/u/Gabe)\
**Replies:** 2\
**Last updated:** [May 8, 2020, 12:19am UTC](https://discourse.processing.org/t/multitouch-with-windows-10/20417 "2020-05-08T00:19:59Z")

</div>

Has anyone managed to detect more than one touch at a time on a Windows 10 touchscreen device? I looked into the SMT library on github (https://github.com/vialab/SMT), but it seems very out of date and doesn’t work with …

---

## [Applying noSmooth() to a PImage](https://discourse.processing.org/t/applying-nosmooth-to-a-pimage/20193)

<div class="topic-metadata">

**Author:** [@AndJ](https://discourse.processing.org/u/AndJ)\
**Replies:** 2\
**Last updated:** [May 7, 2020, 11:59pm UTC](https://discourse.processing.org/t/applying-nosmooth-to-a-pimage/20193 "2020-05-07T23:59:42Z")

</div>

I was working with a PImage (size 17x12 pixels), and trying to scale it up much larger. When I did this, it made the image blurry like it had anti-aliasing enabled. I know that the noSmooth() method aliases (turns off an…

---

## [Get plane from 3D model in Processing](https://discourse.processing.org/t/get-plane-from-3d-model-in-processing/20006)

<div class="topic-metadata">

**Author:** [@Nirav\_Meghani](https://discourse.processing.org/u/Nirav_Meghani)\
**Replies:** 9\
**Last updated:** [May 7, 2020, 4:02pm UTC](https://discourse.processing.org/t/get-plane-from-3d-model-in-processing/20006 "2020-05-07T16:02:00Z")

</div>

i have define 3d model and a plane in PShape. I want to get a plane with modification as shown in above image.

---

## [Polygon collision mask](https://discourse.processing.org/t/polygon-collision-mask/19513)

<div class="topic-metadata">

**Author:** [@GeorgeJava](https://discourse.processing.org/u/GeorgeJava)\
**Replies:** 3\
**Last updated:** [May 7, 2020, 3:15pm UTC](https://discourse.processing.org/t/polygon-collision-mask/19513 "2020-05-07T15:15:13Z")

</div>

How to create from two polygons one polygon, where it will be solid, where will be collsions, if the object moves on that direction with speed. Shift 2nd shape, to the target move position by speed and direction Create…

---

## [SaveFrame function exporting black frames](https://discourse.processing.org/t/saveframe-function-exporting-black-frames/20582)

<div class="topic-metadata">

**Author:** [@hcanndesign](https://discourse.processing.org/u/hcanndesign)\
**Replies:** 1\
**Last updated:** [May 7, 2020, 3:08pm UTC](https://discourse.processing.org/t/saveframe-function-exporting-black-frames/20582 "2020-05-07T15:08:15Z")

</div>

Hi all, This is my first attempt at processing and I’m trying to export the frames of a sketch I’ve created. Unfortunately all the frames come out as a black png with no other content. This is the code I’m using in my s…

---

## [Need help with processing ball game](https://discourse.processing.org/t/need-help-with-processing-ball-game/20561)

<div class="topic-metadata">

**Author:** [@kchabs](https://discourse.processing.org/u/kchabs)\
**Replies:** 1\
**Last updated:** [May 7, 2020, 7:59am UTC](https://discourse.processing.org/t/need-help-with-processing-ball-game/20561 "2020-05-07T07:59:03Z")

</div>

Create a program that displays a window, 300 by 400, randomly placing a red ball (circle) of diameter 20 randomly somewhere in that space. When any key is pressed, the ball will bounce back and forth horizontally on th…

---

## [Can't find a mistake or removeAll() doesn't work](https://discourse.processing.org/t/cant-find-a-mistake-or-removeall-doesnt-work/18368)

<div class="topic-metadata">

**Author:** [@LuckSmith](https://discourse.processing.org/u/LuckSmith)\
**Replies:** 10\
**Last updated:** [March 12, 2020, 3:43pm UTC](https://discourse.processing.org/t/cant-find-a-mistake-or-removeall-doesnt-work/18368 "2020-03-12T15:43:49Z")

</div>

Hello, Please check the sketch at https://www.openprocessing.org/sketch/851540 it seems that when run in openprocessing.org it passes but a few iterations of the while() loop of the getRandom() method, but it prints th…

---

## [Transforming object to a letter (text)](https://discourse.processing.org/t/transforming-object-to-a-letter-text/20548)

<div class="topic-metadata">

**Author:** [@LennieCZ](https://discourse.processing.org/u/LennieCZ)\
**Replies:** 5\
**Last updated:** [May 6, 2020, 5:58pm UTC](https://discourse.processing.org/t/transforming-object-to-a-letter-text/20548 "2020-05-06T17:58:00Z")

</div>

Hello everyone! I’ve got a question. I am absolute newbie in processing and I want to create some interactive typographic thing. Can you help me? I need to transform an ellipse to a letter (text). Let’s say “A”. It sh…

---

## [How to increase number of lines over time - till it reaches 150?](https://discourse.processing.org/t/how-to-increase-number-of-lines-over-time-till-it-reaches-150/20543)

<div class="topic-metadata">

**Author:** [@noa\_noa](https://discourse.processing.org/u/noa_noa)\
**Replies:** 1\
**Last updated:** [May 6, 2020, 5:31pm UTC](https://discourse.processing.org/t/how-to-increase-number-of-lines-over-time-till-it-reaches-150/20543 "2020-05-06T17:31:35Z")

</div>

I understand that i need it to start drawing 1 line, and then in another section update it, so that it keeps adding 1 line - so from 1 to i, when i is the current loop, and in the loop draw the line in the coordinates i …

---

## [Need help with moving one array rather than two](https://discourse.processing.org/t/need-help-with-moving-one-array-rather-than-two/20551)

<div class="topic-metadata">

**Author:** [@Salttt](https://discourse.processing.org/u/Salttt)\
**Replies:** 0\
**Last updated:** [May 6, 2020, 5:46pm UTC](https://discourse.processing.org/t/need-help-with-moving-one-array-rather-than-two/20551 "2020-05-06T17:46:39Z")

</div>

I am making a two-player top down dungeon game. The movement style I settled on is the level moving around the player, giving the illusion the player is always in the middle of the screen. The way it works is by taking a…

---

## [Help with color changing and display of drawn objects](https://discourse.processing.org/t/help-with-color-changing-and-display-of-drawn-objects/20508)

<div class="topic-metadata">

**Author:** [@Andrej](https://discourse.processing.org/u/Andrej)\
**Replies:** 3\
**Last updated:** [May 6, 2020, 3:09pm UTC](https://discourse.processing.org/t/help-with-color-changing-and-display-of-drawn-objects/20508 "2020-05-06T15:09:50Z")

</div>

Hello everybody, I am currently in 4th year of my college and I need some help with my code. (My coding skills aren’t that great…) We got assignment to create simpler version of MS Paint in Processing. Currently, my pr…

---

## [Simple Maze Game Problem](https://discourse.processing.org/t/simple-maze-game-problem/20391)

<div class="topic-metadata">

**Author:** [@Filo96ge](https://discourse.processing.org/u/Filo96ge)\
**Replies:** 6\
**Last updated:** [May 6, 2020, 1:54pm UTC](https://discourse.processing.org/t/simple-maze-game-problem/20391 "2020-05-06T13:54:36Z")

</div>

Hi there! I am using Processing for a school project and I am not able to resolve an issue. I don’t know how to stop the red ball when it hits the boundary of the maze. I’m thinking to put the pixels of the ball and the…

---

## [Function loadShader throwing a NullPointerException for no reason](https://discourse.processing.org/t/function-loadshader-throwing-a-nullpointerexception-for-no-reason/20038)

<div class="topic-metadata">

**Author:** [@Ayfri](https://discourse.processing.org/u/Ayfri)\
**Replies:** 2\
**Last updated:** [May 6, 2020, 7:04am UTC](https://discourse.processing.org/t/function-loadshader-throwing-a-nullpointerexception-for-no-reason/20038 "2020-05-06T07:04:41Z")

</div>

Hi, I’m trying to make shaders in my Program, I have this code that loads a simple vertex Shader from his name to find it in the resources folder : public void init() throws FileNotFoundException { try { Registry.reg…

---

## [Rotate vectors in 3D](https://discourse.processing.org/t/rotate-vectors-in-3d/18660)

<div class="topic-metadata">

**Author:** [@OrSarfati](https://discourse.processing.org/u/OrSarfati)\
**Replies:** 6\
**Last updated:** [May 6, 2020, 1:11am UTC](https://discourse.processing.org/t/rotate-vectors-in-3d/18660 "2020-05-06T01:11:59Z")

</div>

Hi there! I did some research about this topic on this forum and in general. The subject was discussed here before but with no-code solutions for 3D. I like to address that topic again with the hope to find an easy solu…

---

## [How to go about making circles with collisions?](https://discourse.processing.org/t/how-to-go-about-making-circles-with-collisions/20497)

<div class="topic-metadata">

**Author:** [@Salttt](https://discourse.processing.org/u/Salttt)\
**Replies:** 2\
**Last updated:** [May 5, 2020, 9:51pm UTC](https://discourse.processing.org/t/how-to-go-about-making-circles-with-collisions/20497 "2020-05-05T21:51:20Z")

</div>

I want to make a projectile that is a sphere in a 2d game I am creating. I want to make it have a hitbox, is there a way to do it where the hitbox is smooth, rather than being a bunch of smaller rectangles?

---

## [Boolean Difference on Vertexes?](https://discourse.processing.org/t/boolean-difference-on-vertexes/20500)

<div class="topic-metadata">

**Author:** [@Marinus](https://discourse.processing.org/u/Marinus)\
**Replies:** 4\
**Last updated:** [May 5, 2020, 7:04pm UTC](https://discourse.processing.org/t/boolean-difference-on-vertexes/20500 "2020-05-05T19:04:09Z")

</div>

Hi all, I’m trying to get this ‘Unknown Pleasures’ cover to generate an SVG without the full vertex paths. This is the code I’m using, written by someone else: As you can see it generates full overlapping paths. When…

---

## [Lag with antialiasing on an SVG](https://discourse.processing.org/t/lag-with-antialiasing-on-an-svg/20141)

<div class="topic-metadata">

**Author:** [@henrylang](https://discourse.processing.org/u/henrylang)\
**Replies:** 3\
**Last updated:** [May 5, 2020, 7:04pm UTC](https://discourse.processing.org/t/lag-with-antialiasing-on-an-svg/20141 "2020-05-05T19:04:51Z")

</div>

Hello, I am creating a data visualizer for data that spans across the entire world. Because of this, I have imported an SVG and I am rendering it onto the screen. You can drag the mouse to pan across the map, and use th…

---

## [Appending more than one color to an array loop of colors](https://discourse.processing.org/t/appending-more-than-one-color-to-an-array-loop-of-colors/20490)

<div class="topic-metadata">

**Author:** [@debxyz](https://discourse.processing.org/u/debxyz)\
**Replies:** 7\
**Last updated:** [May 5, 2020, 5:37am UTC](https://discourse.processing.org/t/appending-more-than-one-color-to-an-array-loop-of-colors/20490 "2020-05-05T05:37:35Z")

</div>

I want to append black and white to an array of lerped colors. Works okay when I append the first color, but not when I append the second color. What am I doing wrong? // MAIN ----------------------------- Cell \[\] cell…

---

## [How to combine a point shader with a blur shader?](https://discourse.processing.org/t/how-to-combine-a-point-shader-with-a-blur-shader/718)

<div class="topic-metadata">

**Author:** [@solub](https://discourse.processing.org/u/solub)\
**Replies:** 2\
**Last updated:** [December 2, 2018, 4:52pm UTC](https://discourse.processing.org/t/how-to-combine-a-point-shader-with-a-blur-shader/718 "2018-12-02T16:52:18Z")

</div>

I would like to display thousands of points on a 3D canvas with a Depth of Field effect. More specifically, I would like to use a z-buffer (depth buffering) to adjust the level of blur of a point based on its distance fr…

---

## [How to make a timer in Processing?](https://discourse.processing.org/t/how-to-make-a-timer-in-processing/20481)

<div class="topic-metadata">

**Author:** [@Cybernet](https://discourse.processing.org/u/Cybernet)\
**Replies:** 1\
**Last updated:** [May 4, 2020, 11:15pm UTC](https://discourse.processing.org/t/how-to-make-a-timer-in-processing/20481 "2020-05-04T23:15:00Z")

</div>

So I know this is a really simple question, but I can’t figure out how to do it! So I have this code: void draw() { if (startGame) // do stuff if (lose) DisplayTimer(); } void mousePressed() { …

---

## [Implementing Midpoint Displacement Algorithm](https://discourse.processing.org/t/implementing-midpoint-displacement-algorithm/20441)

<div class="topic-metadata">

**Author:** [@Dangeroustuber](https://discourse.processing.org/u/Dangeroustuber)\
**Replies:** 5\
**Last updated:** [May 4, 2020, 8:16am UTC](https://discourse.processing.org/t/implementing-midpoint-displacement-algorithm/20441 "2020-05-04T08:16:26Z")

</div>

Hi, i want to implement the Midpoint displacement algorithm. Please help! I can’t find a good source to follow in 1D and i dont understand it fully that i can implement it myself alone. I’m not interested in 2d case bef…

---

## [How can i make exp system](https://discourse.processing.org/t/how-can-i-make-exp-system/20449)

<div class="topic-metadata">

**Author:** [@MEOACOHI](https://discourse.processing.org/u/MEOACOHI)\
**Replies:** 1\
**Last updated:** [May 3, 2020, 10:29pm UTC](https://discourse.processing.org/t/how-can-i-make-exp-system/20449 "2020-05-03T22:29:41Z")

</div>

hi, everyone i have a question for yall. me and my friend are working on a pokemon like game and we need an exp system but we dont know how to make one so if u can help or send the code it will be amazing ty community! :…

---

## [Hi-Res PDF Image Does Not Reflect Canvas Drawing](https://discourse.processing.org/t/hi-res-pdf-image-does-not-reflect-canvas-drawing/20215)

<div class="topic-metadata">

**Author:** [@mnoble](https://discourse.processing.org/u/mnoble)\
**Replies:** 4\
**Last updated:** [May 3, 2020, 6:50pm UTC](https://discourse.processing.org/t/hi-res-pdf-image-does-not-reflect-canvas-drawing/20215 "2020-05-03T18:50:52Z")

</div>

Hello Forum, I am working with one of the examples from the \[Generative Design book\](// http://www.generative-gestaltung.de) and I am trying to make a super hi-res image of the drawings I do. But, the PDF lines are neve…

---

## [Halftone from photo](https://discourse.processing.org/t/halftone-from-photo/20130)

<div class="topic-metadata">

**Author:** [@May](https://discourse.processing.org/u/May)\
**Replies:** 1\
**Last updated:** [May 3, 2020, 6:47pm UTC](https://discourse.processing.org/t/halftone-from-photo/20130 "2020-05-03T18:47:10Z")

</div>

Hi! I am currently working on a project about halftone and I am quite new to the coding-world. I am struggling with the degrees in my halftone and with how to make a halftone with lines. Right now the grids are all by…

---

## [Borders for a maze that resets the object to the start?](https://discourse.processing.org/t/borders-for-a-maze-that-resets-the-object-to-the-start/20126)

<div class="topic-metadata">

**Author:** [@lilqtip](https://discourse.processing.org/u/lilqtip)\
**Replies:** 4\
**Last updated:** [May 3, 2020, 6:42pm UTC](https://discourse.processing.org/t/borders-for-a-maze-that-resets-the-object-to-the-start/20126 "2020-05-03T18:42:09Z")

</div>

So I am making a little game as a project to improve my coding. It is a maze-ish game where you can shrink and grow to go through it and when you touch a wall it will reset you to the start, I am using if statements to …

---

## [How do you create an array to store geolocation which can appear on a map?](https://discourse.processing.org/t/how-do-you-create-an-array-to-store-geolocation-which-can-appear-on-a-map/20062)

<div class="topic-metadata">

**Author:** [@Stage1](https://discourse.processing.org/u/Stage1)\
**Replies:** 2\
**Last updated:** [May 3, 2020, 6:35pm UTC](https://discourse.processing.org/t/how-do-you-create-an-array-to-store-geolocation-which-can-appear-on-a-map/20062 "2020-05-03T18:35:59Z")

</div>

I have a csv file which states the names of cities of UK that have different geolocations for each cities. Considering theres over 10 cities i would like to store these cities into an array and then have them mapped onto…

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

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