# Coding Questions

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

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

**Page:** 59

---

## [How to make my images spin around an ellipse in P3D?](https://discourse.processing.org/t/how-to-make-my-images-spin-around-an-ellipse-in-p3d/28745)

<div class="topic-metadata">

**Author:** [@Rindoom](https://discourse.processing.org/u/Rindoom)\
**Replies:** 5\
**Last updated:** [March 24, 2021, 11:14pm UTC](https://discourse.processing.org/t/how-to-make-my-images-spin-around-an-ellipse-in-p3d/28745 "2021-03-24T23:14:38Z")

</div>

Hey, guys. I recently learned about the peasycam library, thus how convenient and handy is, when it comes to mouse-driven camera rotation. So I tried to use the library in my recent project. The idea was to create a ring…

---

## [True or False game / If mousepressed correct answer, show next question randomly](https://discourse.processing.org/t/true-or-false-game-if-mousepressed-correct-answer-show-next-question-randomly/28808)

<div class="topic-metadata">

**Author:** [@Ellen](https://discourse.processing.org/u/Ellen)\
**Replies:** 2\
**Last updated:** [March 24, 2021, 10:33pm UTC](https://discourse.processing.org/t/true-or-false-game-if-mousepressed-correct-answer-show-next-question-randomly/28808 "2021-03-24T22:33:55Z")

</div>

Hi guys, I’d like to make a quiz game. basically, the question will show randomly and if there are 2 buttons, one is wrong and one has to be correct. And also If the user clicked correct answer, I want the question wi…

---

## [Disable font antialiasing](https://discourse.processing.org/t/disable-font-antialiasing/28792)

<div class="topic-metadata">

**Author:** [@yeppii](https://discourse.processing.org/u/yeppii)\
**Replies:** 1\
**Last updated:** [March 24, 2021, 5:09pm UTC](https://discourse.processing.org/t/disable-font-antialiasing/28792 "2021-03-24T17:09:31Z")

</div>

I’m making a game using processing 3. I use a pixel art font. But when I set the font size to large values like 60 and 100 the font becomes blurry. I know this is because of anti-aliasing, but how do I disable it? I have…

---

## [Topographical map](https://discourse.processing.org/t/topographical-map/13302)

<div class="topic-metadata">

**Author:** [@LordCacops](https://discourse.processing.org/u/LordCacops)\
**Replies:** 15\
**Last updated:** [March 23, 2021, 9:51pm UTC](https://discourse.processing.org/t/topographical-map/13302 "2021-03-23T21:51:50Z")

</div>

Hello! I am trying to figure out how to turn a perlin noise-type 3D terrain like this one: int cols, rows; int scl = 20; //scale int w = 1200; //width, adjustable int h = 900; //height, adjustable float \[\]\[\] z; void…

---

## [Confused with Slider up/down - PGraphics](https://discourse.processing.org/t/confused-with-slider-up-down-pgraphics/28665)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 3\
**Last updated:** [March 22, 2021, 8:29pm UTC](https://discourse.processing.org/t/confused-with-slider-up-down-pgraphics/28665 "2021-03-22T20:29:53Z")

</div>

Hello all, let’s say I have a graphical editor to place icons underneath each other. I want to complete this with a vertical slider. I want to make sure that outside the Editor Rectangle no icon is shown. So when …

---

## [How to keep the camera stable while rotating a 3D model?](https://discourse.processing.org/t/how-to-keep-the-camera-stable-while-rotating-a-3d-model/28729)

<div class="topic-metadata">

**Author:** [@Neilly](https://discourse.processing.org/u/Neilly)\
**Replies:** 2\
**Last updated:** [March 22, 2021, 6:04pm UTC](https://discourse.processing.org/t/how-to-keep-the-camera-stable-while-rotating-a-3d-model/28729 "2021-03-22T18:04:28Z")

</div>

I have a 3D model (of a skateboard) in processing which is rotating based on the movement of an external device. I have also placed 3 arrows in my Processing scene as reference axes in the X,Y,Z directions. My problem is…

---

## [Camera move on z](https://discourse.processing.org/t/camera-move-on-z/28724)

<div class="topic-metadata">

**Author:** [@xyzaw](https://discourse.processing.org/u/xyzaw)\
**Replies:** 6\
**Last updated:** [March 22, 2021, 3:16pm UTC](https://discourse.processing.org/t/camera-move-on-z/28724 "2021-03-22T15:16:04Z")

</div>

Hi! Im trying to make camera moving on z axis (zooming in and out) so the text will be visible or not So for example i have this text: 123 and when I zoom in i wont see it, I will just have some random letters, but whe…

---

## [Second ArrayList Won't Work](https://discourse.processing.org/t/second-arraylist-wont-work/28711)

<div class="topic-metadata">

**Author:** [@spamelim](https://discourse.processing.org/u/spamelim)\
**Replies:** 3\
**Last updated:** [March 22, 2021, 12:15pm UTC](https://discourse.processing.org/t/second-arraylist-wont-work/28711 "2021-03-22T12:15:35Z")

</div>

I’m trying to make particles fall from wherever the mouse is clicked and each mousebutton displays a different type of particle. My main code for just the right mouse button works perfectly with rainbow particles. I adde…

---

## [Transform a "rookie" code to a more professional looking code - tricks asked](https://discourse.processing.org/t/transform-a-rookie-code-to-a-more-professional-looking-code-tricks-asked/28699)

<div class="topic-metadata">

**Author:** [@freddukas](https://discourse.processing.org/u/freddukas)\
**Replies:** 6\
**Last updated:** [March 22, 2021, 8:58am UTC](https://discourse.processing.org/t/transform-a-rookie-code-to-a-more-professional-looking-code-tricks-asked/28699 "2021-03-22T08:58:58Z")

</div>

Good evening everyone, I come back here asking your help. I tried to design a code in order to help my son to create custom characters on a lcd screen with a arduino. The idea is to have a 5\*8 frame and check the rec…

---

## [Create 2D game map with images](https://discourse.processing.org/t/create-2d-game-map-with-images/28410)

<div class="topic-metadata">

**Author:** [@oussama10](https://discourse.processing.org/u/oussama10)\
**Replies:** 31\
**Last updated:** [March 21, 2021, 11:48pm UTC](https://discourse.processing.org/t/create-2d-game-map-with-images/28410 "2021-03-21T23:48:09Z")

</div>

A Bomberman level can be considered a grid, of three types, each represented by a 16x16 pixel size image: the ground (ground.png), the destructible blocks (softBlock.png) and indestructible blocks (hardBlock.png). The d…

---

## [Prevent one Processing window from closing others](https://discourse.processing.org/t/prevent-one-processing-window-from-closing-others/13719)

<div class="topic-metadata">

**Author:** [@micycle](https://discourse.processing.org/u/micycle)\
**Replies:** 8\
**Last updated:** [March 21, 2021, 3:01pm UTC](https://discourse.processing.org/t/prevent-one-processing-window-from-closing-others/13719 "2021-03-21T15:01:52Z")

</div>

I’m experimenting with launching multiple processing windows. I find that when I set the renderer to be the same for all sketch instances, closing one immediately closes the other two instances. When all renderers are …

---

## [Closing One Window and Opening Another](https://discourse.processing.org/t/closing-one-window-and-opening-another/28667)

<div class="topic-metadata">

**Author:** [@Flamingo](https://discourse.processing.org/u/Flamingo)\
**Replies:** 1\
**Last updated:** [March 20, 2021, 11:55pm UTC](https://discourse.processing.org/t/closing-one-window-and-opening-another/28667 "2021-03-20T23:55:16Z")

</div>

Hi there, I'm simply trying to run a program where I need to completely close one window/papplet and open a new one after an action has been made by the user (e.g. mousePressed). I need something that actually closes the…

---

## [How do I change where the drawing is happening](https://discourse.processing.org/t/how-do-i-change-where-the-drawing-is-happening/28658)

<div class="topic-metadata">

**Author:** [@Saad-py](https://discourse.processing.org/u/Saad-py)\
**Replies:** 7\
**Last updated:** [March 20, 2021, 4:11pm UTC](https://discourse.processing.org/t/how-do-i-change-where-the-drawing-is-happening/28658 "2021-03-20T16:11:45Z")

</div>

My code: float x = 0.10; float y = 0.0; float z = 0.0; float a = 10; float b = 28; float c = 8.0/3.0; ArrayList\<PVector\> points = new ArrayList\<PVector\>(); void setup() { size(800, 600); colorMode(HSB); } voi…

---

## [Downloading Email Attachments Processing 3](https://discourse.processing.org/t/downloading-email-attachments-processing-3/28475)

<div class="topic-metadata">

**Author:** [@Flamingo](https://discourse.processing.org/u/Flamingo)\
**Replies:** 3\
**Last updated:** [March 20, 2021, 12:03am UTC](https://discourse.processing.org/t/downloading-email-attachments-processing-3/28475 "2021-03-20T00:03:34Z")

</div>

Hi there. I'm new to the JavaMail library and I'm simply trying to download the attachments from my last received email to a folder. Every time I run the code I get an error regarding the host and connection. Something t…

---

## [JButtons in processing](https://discourse.processing.org/t/jbuttons-in-processing/28641)

<div class="topic-metadata">

**Author:** [@SNICKRS](https://discourse.processing.org/u/SNICKRS)\
**Replies:** 3\
**Last updated:** [March 19, 2021, 4:53pm UTC](https://discourse.processing.org/t/jbuttons-in-processing/28641 "2021-03-19T16:53:10Z")

</div>

Hello everyone, I am making a simple application that requires a lot of buttons, and I want to be able to use the JButton class in order to do so. However, I don’t know how to do this because traditionally to make a JBut…

---

## [Create applications to open a selfmade file type (read discription)](https://discourse.processing.org/t/create-applications-to-open-a-selfmade-file-type-read-discription/28610)

<div class="topic-metadata">

**Author:** [@NumericPrime](https://discourse.processing.org/u/NumericPrime)\
**Replies:** 7\
**Last updated:** [March 19, 2021, 3:32pm UTC](https://discourse.processing.org/t/create-applications-to-open-a-selfmade-file-type-read-discription/28610 "2021-03-19T15:32:33Z")

</div>

I created a programm to process a specific file format. How can I make it compartible with the “open with”-function when double-clicking the file? In the programm the files are opened with selectedInput().

---

## [P3D Processing source code / help me](https://discourse.processing.org/t/p3d-processing-source-code-help-me/28626)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 8\
**Last updated:** [March 19, 2021, 6:51am UTC](https://discourse.processing.org/t/p3d-processing-source-code-help-me/28626 "2021-03-19T06:51:58Z")

</div>

please format code with \</\> button \* homework policy \* asking questions How do I set the initial starting point position? I want to set a location that starts as soon as the program is turned on. Set where the …

---

## [I really need a help (circle getting smaller)](https://discourse.processing.org/t/i-really-need-a-help-circle-getting-smaller/28629)

<div class="topic-metadata">

**Author:** [@imcute1002](https://discourse.processing.org/u/imcute1002)\
**Replies:** 5\
**Last updated:** [March 18, 2021, 10:53am UTC](https://discourse.processing.org/t/i-really-need-a-help-circle-getting-smaller/28629 "2021-03-18T10:53:04Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I need to make a circle. that size keep samller and color keep change

---

## [Get the key event after losing focus](https://discourse.processing.org/t/get-the-key-event-after-losing-focus/28633)

<div class="topic-metadata">

**Author:** [@AbleYudada](https://discourse.processing.org/u/AbleYudada)\
**Replies:** 2\
**Last updated:** [March 18, 2021, 10:34am UTC](https://discourse.processing.org/t/get-the-key-event-after-losing-focus/28633 "2021-03-18T10:34:40Z")

</div>

Hello guys！ I want to implement a feature that I can still get key events when the focus is not on the current window, but I am having trouble now. I found an example on github, but I put the java code and jar file into…

---

## [Problem with splitTokens?!](https://discourse.processing.org/t/problem-with-splittokens/28612)

<div class="topic-metadata">

**Author:** [@lolonulu](https://discourse.processing.org/u/lolonulu)\
**Replies:** 8\
**Last updated:** [March 17, 2021, 10:38pm UTC](https://discourse.processing.org/t/problem-with-splittokens/28612 "2021-03-17T22:38:05Z")

</div>

Hello, Here is a short code below to count words and more, but I face a strange problem: when I run it some words of the original string don’t appear on the screen!? How come? Did I forgot something using splitTokens …

---

## [Removing PImage mask](https://discourse.processing.org/t/removing-pimage-mask/28620)

<div class="topic-metadata">

**Author:** [@Jean-no](https://discourse.processing.org/u/Jean-no)\
**Replies:** 2\
**Last updated:** [March 17, 2021, 10:33pm UTC](https://discourse.processing.org/t/removing-pimage-mask/28620 "2021-03-17T22:33:03Z")

</div>

Hi ! I wonder if there is a way to remove the alpha mask of a PImage (applied with the PImage.mask() command) or if I just have to apply an int array full of 255…

---

## [Assigning function to a variable](https://discourse.processing.org/t/assigning-function-to-a-variable/28563)

<div class="topic-metadata">

**Author:** [@Mattyjak](https://discourse.processing.org/u/Mattyjak)\
**Replies:** 8\
**Last updated:** [March 17, 2021, 1:13am UTC](https://discourse.processing.org/t/assigning-function-to-a-variable/28563 "2021-03-17T01:13:13Z")

</div>

Hello everybody! I’m a beginner at processing (but I have some experience with p5js and PJs). I’m trying to find a way to assign a function to a variable. Essentially, I want to be able to set a function to a separate v…

---

## [Help with genius game create](https://discourse.processing.org/t/help-with-genius-game-create/28583)

<div class="topic-metadata">

**Author:** [@Leommoraes](https://discourse.processing.org/u/Leommoraes)\
**Replies:** 1\
**Last updated:** [March 16, 2021, 5:03pm UTC](https://discourse.processing.org/t/help-with-genius-game-create/28583 "2021-03-16T17:03:54Z")

</div>

Hi guys, i need to create a game like “genius game”, create a sequence of colors and making levels, for advance a level, the user needs to insert the colors blink in sequence, just like a genius game, can we help me? thi…

---

## [How do I change the random color for each petal of the flower?](https://discourse.processing.org/t/how-do-i-change-the-random-color-for-each-petal-of-the-flower/28084)

<div class="topic-metadata">

**Author:** [@batmm](https://discourse.processing.org/u/batmm)\
**Replies:** 8\
**Last updated:** [March 16, 2021, 8:27am UTC](https://discourse.processing.org/t/how-do-i-change-the-random-color-for-each-petal-of-the-flower/28084 "2021-03-16T08:27:37Z")

</div>

please format code with \</\> button \* homework policy \* asking questions //The constants needed in the equations for the “rose” final float K = 4; //The factor that controls the number of “petals” final float RATE =…

---

## [How do i make this spiral line change gradient colors?](https://discourse.processing.org/t/how-do-i-make-this-spiral-line-change-gradient-colors/28552)

<div class="topic-metadata">

**Author:** [@cocopuffs](https://discourse.processing.org/u/cocopuffs)\
**Replies:** 5\
**Last updated:** [March 15, 2021, 11:53pm UTC](https://discourse.processing.org/t/how-do-i-make-this-spiral-line-change-gradient-colors/28552 "2021-03-15T23:53:30Z")

</div>

can someone help me with this please?

---

## [Chessboard with array pixels](https://discourse.processing.org/t/chessboard-with-array-pixels/28477)

<div class="topic-metadata">

**Author:** [@S1993](https://discourse.processing.org/u/S1993)\
**Replies:** 12\
**Last updated:** [March 15, 2021, 2:40pm UTC](https://discourse.processing.org/t/chessboard-with-array-pixels/28477 "2021-03-15T14:40:05Z")

</div>

I need to code a chessboard making use of array pixels. I can’t use the function rect. I don’t know how to do it. I would appreciate it if you can help me. Thanks.

---

## [How can I make a rectangular collision of an image?](https://discourse.processing.org/t/how-can-i-make-a-rectangular-collision-of-an-image/28538)

<div class="topic-metadata">

**Author:** [@vinijoncrafts](https://discourse.processing.org/u/vinijoncrafts)\
**Replies:** 2\
**Last updated:** [March 15, 2021, 11:53am UTC](https://discourse.processing.org/t/how-can-i-make-a-rectangular-collision-of-an-image/28538 "2021-03-15T11:53:43Z")

</div>

I am having trouble with making an image collide with something The image i use: https://drive.google.com/file/d/1yGA6DMe9KDWJG15VfWLT1DlvyNVDuhCg/view The code: Ship Ship; Obstacles Obstacles; //KeyBinds Keys; PI…

---

## [Texture on hexagon](https://discourse.processing.org/t/texture-on-hexagon/28534)

<div class="topic-metadata">

**Author:** [@Theodor](https://discourse.processing.org/u/Theodor)\
**Replies:** 3\
**Last updated:** [March 15, 2021, 11:39am UTC](https://discourse.processing.org/t/texture-on-hexagon/28534 "2021-03-15T11:39:59Z")

</div>

Hallo I am new in this forum and just started with processing. I would like to paint my 3d hexagon with an image (texture). How can I place a texture on a hexagon? The jpg it self is a rectangular format and I would like…

---

## [Reconfigure - the canvas](https://discourse.processing.org/t/reconfigure-the-canvas/28541)

<div class="topic-metadata">

**Author:** [@Apollo](https://discourse.processing.org/u/Apollo)\
**Replies:** 3\
**Last updated:** [March 15, 2021, 11:34am UTC](https://discourse.processing.org/t/reconfigure-the-canvas/28541 "2021-03-15T11:34:14Z")

</div>

Hi! I hope you could help me here. I got this code. void setup() { size(500, 500); noStroke(); } void draw() { background(0); fill(0,200,0); int t = 0; float z = map(millis(), 0, 20000, 0, 400); for ( i…

---

## [Aiming marbles away from a central point](https://discourse.processing.org/t/aiming-marbles-away-from-a-central-point/28535)

<div class="topic-metadata">

**Author:** [@ottenm](https://discourse.processing.org/u/ottenm)\
**Replies:** 3\
**Last updated:** [March 15, 2021, 11:28am UTC](https://discourse.processing.org/t/aiming-marbles-away-from-a-central-point/28535 "2021-03-15T11:28:23Z")

</div>

I have a sketch that simulates marbles bumping into each other. Each marble has one PVector for ‘location’ and another one for ‘velocity’. location.add(velocity) moves the marble to it’s next location, slowly for small…

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

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