# Coding Questions

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

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

**Page:** 93

---

## [Lerp rate/speed - how to change the number of interpolation steps attached to a slider?](https://discourse.processing.org/t/lerp-rate-speed-how-to-change-the-number-of-interpolation-steps-attached-to-a-slider/21234)

<div class="topic-metadata">

**Author:** [@rkk16](https://discourse.processing.org/u/rkk16)\
**Replies:** 1\
**Last updated:** [May 24, 2020, 12:49pm UTC](https://discourse.processing.org/t/lerp-rate-speed-how-to-change-the-number-of-interpolation-steps-attached-to-a-slider/21234 "2020-05-24T12:49:11Z")

</div>

Hey guys, I’ve got a slider and I convert the position of it’s x and y coordinates into an amount from 0 to 1 which I then lerp to result in an animation when you slide from left to right. Is there a way to control the s…

---

## [Rotate () like earth around sun](https://discourse.processing.org/t/rotate-like-earth-around-sun/16713)

<div class="topic-metadata">

**Author:** [@Bouls631](https://discourse.processing.org/u/Bouls631)\
**Replies:** 5\
**Last updated:** [May 24, 2020, 7:40am UTC](https://discourse.processing.org/t/rotate-like-earth-around-sun/16713 "2020-05-24T07:40:57Z")

</div>

Hello every one… Is it possible to rotate an object around imself and around a other point on the same time? Thank’s a lot.

---

## [Perlin noise detail](https://discourse.processing.org/t/perlin-noise-detail/21223)

<div class="topic-metadata">

**Author:** [@BongoTurtle](https://discourse.processing.org/u/BongoTurtle)\
**Replies:** 5\
**Last updated:** [May 24, 2020, 4:58am UTC](https://discourse.processing.org/t/perlin-noise-detail/21223 "2020-05-24T04:58:18Z")

</div>

Is there any way to make the noise() function more continuous? It seems it only goes down to steps of around 0.003 until it acts discontinuously. For example noise(0.000) = noise(0.002).

---

## [Converting this code from Celsius to Fahrenheit](https://discourse.processing.org/t/converting-this-code-from-celsius-to-fahrenheit/21221)

<div class="topic-metadata">

**Author:** [@bobcat21976](https://discourse.processing.org/u/bobcat21976)\
**Replies:** 1\
**Last updated:** [May 23, 2020, 9:49pm UTC](https://discourse.processing.org/t/converting-this-code-from-celsius-to-fahrenheit/21221 "2020-05-23T21:49:32Z")

</div>

import javax.swing.JOptionPane; int FREEZE\_F=32; int BOIL\_F=212; int temp ; String scale; String answer= JOptionPane.showInputDialog("Enter the temperature in degrees: "); temp= Integer.parseInt(answer); scale = JOption…

---

## [How to move a figure without selecting others?](https://discourse.processing.org/t/how-to-move-a-figure-without-selecting-others/21145)

<div class="topic-metadata">

**Author:** [@yass](https://discourse.processing.org/u/yass)\
**Replies:** 2\
**Last updated:** [May 23, 2020, 12:40pm UTC](https://discourse.processing.org/t/how-to-move-a-figure-without-selecting-others/21145 "2020-05-23T12:40:48Z")

</div>

Hello, I am trying to create a game. i have a class that draw triangles and i select them through a circle that is inside. The problem is when I have several figures, the circles overlap and I cannot select them one by …

---

## [Problem with box colliders in P3D](https://discourse.processing.org/t/problem-with-box-colliders-in-p3d/21166)

<div class="topic-metadata">

**Author:** [@Astroide](https://discourse.processing.org/u/Astroide)\
**Replies:** 1\
**Last updated:** [May 22, 2020, 11:19pm UTC](https://discourse.processing.org/t/problem-with-box-colliders-in-p3d/21166 "2020-05-22T23:19:43Z")

</div>

I am trying to make a tridimensional game with P3D (a finite world of solid boxes of different colors). I always have the same problem: only the 9 center blocks seem to have a working collider. The code : float x=0; int…

---

## [All the permutations of a given string](https://discourse.processing.org/t/all-the-permutations-of-a-given-string/21172)

<div class="topic-metadata">

**Author:** [@paulstgeorge](https://discourse.processing.org/u/paulstgeorge)\
**Replies:** 1\
**Last updated:** [May 22, 2020, 11:07pm UTC](https://discourse.processing.org/t/all-the-permutations-of-a-given-string/21172 "2020-05-22T23:07:56Z")

</div>

Is there a way (in Processing) to find all the permutations of a given string? To be worthwhile, I think the string needs to be at least six characters long. This could be a candidate for \<http://www.rosettacode.org/wik…

---

## [Can you save multiple tables in a single csv file?](https://discourse.processing.org/t/can-you-save-multiple-tables-in-a-single-csv-file/21175)

<div class="topic-metadata">

**Author:** [@abdullahmq](https://discourse.processing.org/u/abdullahmq)\
**Replies:** 2\
**Last updated:** [May 22, 2020, 10:52pm UTC](https://discourse.processing.org/t/can-you-save-multiple-tables-in-a-single-csv-file/21175 "2020-05-22T22:52:09Z")

</div>

please format code with \</\> button \* homework policy \* asking questions I am trying to add and save multiples tables in a single CSV file, I have a car class and every car class inherits its own table but when I stop…

---

## [Mario game--adding ground and moving screen with player](https://discourse.processing.org/t/mario-game-adding-ground-and-moving-screen-with-player/21184)

<div class="topic-metadata">

**Author:** [@jasmine](https://discourse.processing.org/u/jasmine)\
**Replies:** 3\
**Last updated:** [May 22, 2020, 10:28pm UTC](https://discourse.processing.org/t/mario-game-adding-ground-and-moving-screen-with-player/21184 "2020-05-22T22:28:26Z")

</div>

int gameMode=0;//0 - menu, 1 - play game, 2 - instructions, 3 - character selection int selChar=1;//default character is "character 1" int level=1; color red=color(255, 0, 0); color green=color(0, 255, 0); color blue=col…

---

## [Number box like Pure Data](https://discourse.processing.org/t/number-box-like-pure-data/21064)

<div class="topic-metadata">

**Author:** [@patricio1979](https://discourse.processing.org/u/patricio1979)\
**Replies:** 6\
**Last updated:** [May 22, 2020, 8:41pm UTC](https://discourse.processing.org/t/number-box-like-pure-data/21064 "2020-05-22T20:41:36Z")

</div>

Nailed it. Made a number box like Pure Data but it still needs some work, any suggestions? PFont f; // STEP 1 Declare PFont variable int boton1X, boton1Y, boton1Size; // Boton1 boolean boton1Over, boton1Presionado; …

---

## [The color tracking program behaves differently when sized up; why?](https://discourse.processing.org/t/the-color-tracking-program-behaves-differently-when-sized-up-why/21162)

<div class="topic-metadata">

**Author:** [@calla\_balanescu](https://discourse.processing.org/u/calla_balanescu)\
**Replies:** 1\
**Last updated:** [May 22, 2020, 1:23pm UTC](https://discourse.processing.org/t/the-color-tracking-program-behaves-differently-when-sized-up-why/21162 "2020-05-22T13:23:08Z")

</div>

Hello fellow processing enthusiasts!! I am currently working on a project for university and I am pretty much at the beginning with the code. In it, I am using color detection to avoid the walls of the maze you’re supp…

---

## [Command Prompt wont take input paths](https://discourse.processing.org/t/command-prompt-wont-take-input-paths/21152)

<div class="topic-metadata">

**Author:** [@F53](https://discourse.processing.org/u/F53)\
**Replies:** 1\
**Last updated:** [May 22, 2020, 5:07am UTC](https://discourse.processing.org/t/command-prompt-wont-take-input-paths/21152 "2020-05-22T05:07:28Z")

</div>

I am writing a program to automate an .exe file that takes file paths as arguments. Lets call this file we want to automatically call scale.exe The Strings scalarPath, inputPath, and outputPath are all made using the f…

---

## [Help on loops (I'm a beginner)](https://discourse.processing.org/t/help-on-loops-im-a-beginner/21155)

<div class="topic-metadata">

**Author:** [@lexy897](https://discourse.processing.org/u/lexy897)\
**Replies:** 2\
**Last updated:** [May 22, 2020, 4:23am UTC](https://discourse.processing.org/t/help-on-loops-im-a-beginner/21155 "2020-05-22T04:23:03Z")

</div>

Hi there! I’m new to processing and this forum so please be patient haha. I need to make a processing code that moves 4 squares that touch each other down the screen in unison. I’ve figured out the speed and moving one …

---

## [3D Coding on the Z-axis](https://discourse.processing.org/t/3d-coding-on-the-z-axis/20359)

<div class="topic-metadata">

**Author:** [@PhilRandom](https://discourse.processing.org/u/PhilRandom)\
**Replies:** 7\
**Last updated:** [May 21, 2020, 9:45pm UTC](https://discourse.processing.org/t/3d-coding-on-the-z-axis/20359 "2020-05-21T21:45:06Z")

</div>

Hi all! Phil here again, as you know this has been a very stressful year, so I thought coding would be a fantastic way to get back my mojo in self-isolation! For those of you who are unaware, I began to learn coding las…

---

## [Morph from one position to another - animation](https://discourse.processing.org/t/morph-from-one-position-to-another-animation/21112)

<div class="topic-metadata">

**Author:** [@rkk16](https://discourse.processing.org/u/rkk16)\
**Replies:** 8\
**Last updated:** [May 21, 2020, 8:31pm UTC](https://discourse.processing.org/t/morph-from-one-position-to-another-animation/21112 "2020-05-21T20:31:51Z")

</div>

I’m aware of how to make certain features move using integers and increments but is there a tool to animate/morph from one position to the other ie if I draw an object at 30 degrees at position 200,300 - then the same ob…

---

## [Can you help me with optimizing code](https://discourse.processing.org/t/can-you-help-me-with-optimizing-code/21141)

<div class="topic-metadata">

**Author:** [@Arsenii](https://discourse.processing.org/u/Arsenii)\
**Replies:** 4\
**Last updated:** [May 21, 2020, 8:24pm UTC](https://discourse.processing.org/t/can-you-help-me-with-optimizing-code/21141 "2020-05-21T20:24:49Z")

</div>

I have a problem with understanding who to optimize my code. Main idea of program of creating a words with dots. ArrayList\<PVector\> edgeVertices = new ArrayList\<PVector\>(); ArrayList\<PVector\> Adding = new ArrayList\<PVe…

---

## [Storing input for 3d shapes](https://discourse.processing.org/t/storing-input-for-3d-shapes/21024)

<div class="topic-metadata">

**Author:** [@mrbro](https://discourse.processing.org/u/mrbro)\
**Replies:** 3\
**Last updated:** [May 21, 2020, 8:24pm UTC](https://discourse.processing.org/t/storing-input-for-3d-shapes/21024 "2020-05-21T20:24:42Z")

</div>

Hi everyone! I am new to processing. I am trying to draw a shape and store 5 shapes before the current one, so the fade consequently (like in this example: https://processing.org/examples/storinginput.html). (or maybe I…

---

## [Filling complex shape - followup](https://discourse.processing.org/t/filling-complex-shape-followup/21140)

<div class="topic-metadata">

**Author:** [@rkk16](https://discourse.processing.org/u/rkk16)\
**Replies:** 3\
**Last updated:** [May 21, 2020, 7:56pm UTC](https://discourse.processing.org/t/filling-complex-shape-followup/21140 "2020-05-21T19:56:27Z")

</div>

Please find my code below. Trying to create a lip but it cuts halfway for some reason, can someone please explain why? int x = 100; fill(255,0,0); beginShape(); curveVertex(-20+x,80); curveVertex(30+x,90); curveVer…

---

## [Filling complex shapes](https://discourse.processing.org/t/filling-complex-shapes/21139)

<div class="topic-metadata">

**Author:** [@rkk16](https://discourse.processing.org/u/rkk16)\
**Replies:** 3\
**Last updated:** [May 21, 2020, 5:02pm UTC](https://discourse.processing.org/t/filling-complex-shapes/21139 "2020-05-21T17:02:14Z")

</div>

How do we fill in a complex circular shape like a lip? ie I know how to draw the Bezier/curve lines but how do we fill in 2 Bezier curves that join at 2 vertices?

---

## [Interpolation - lerp multiple cases](https://discourse.processing.org/t/interpolation-lerp-multiple-cases/21126)

<div class="topic-metadata">

**Author:** [@rkk16](https://discourse.processing.org/u/rkk16)\
**Replies:** 0\
**Last updated:** [May 21, 2020, 10:36am UTC](https://discourse.processing.org/t/interpolation-lerp-multiple-cases/21126 "2020-05-21T10:36:07Z")

</div>

Hey guys, I’m using lerp to interpolate between facial expressions (ie happy to sad would be lerp between an arc (for the lips) with a certain length, width and fill radian to another). I also managed to connect a slider…

---

## [Need help with dist()](https://discourse.processing.org/t/need-help-with-dist/21020)

<div class="topic-metadata">

**Author:** [@SeveriuS96](https://discourse.processing.org/u/SeveriuS96)\
**Replies:** 4\
**Last updated:** [May 21, 2020, 10:04am UTC](https://discourse.processing.org/t/need-help-with-dist/21020 "2020-05-21T10:04:35Z")

</div>

Hello Processing user, in my program I want that the moveable character be stopped by a wall(a rect) if it collide with it. int speed = 5; int xPosChell = width/2; //Chell(movable Character) int yPosChell = heigh…

---

## [Processing + Eclipse + glsl glass effect](https://discourse.processing.org/t/processing-eclipse-glsl-glass-effect/21021)

<div class="topic-metadata">

**Author:** [@subsubsub](https://discourse.processing.org/u/subsubsub)\
**Replies:** 0\
**Last updated:** [May 18, 2020, 3:34pm UTC](https://discourse.processing.org/t/processing-eclipse-glsl-glass-effect/21021 "2020-05-18T15:34:25Z")

</div>

Hi everyone, I’m currently using succesfully java in eclipse, and using glsl shaders. I’m trying to replicate a glass effect, and this post seems interesting. I just don’t understand if (and how) I have to pass a pict…

---

## [Generate random colors from math3 distributions](https://discourse.processing.org/t/generate-random-colors-from-math3-distributions/21027)

<div class="topic-metadata">

**Author:** [@dfamil](https://discourse.processing.org/u/dfamil)\
**Replies:** 3\
**Last updated:** [May 21, 2020, 3:50am UTC](https://discourse.processing.org/t/generate-random-colors-from-math3-distributions/21027 "2020-05-21T03:50:11Z")

</div>

If I use the random function everything works fine. if I try to map a generate a random distribution it only records the last number of the array. but the println is correct. vMin = min(valueYArray); vMax = max(valueY…

---

## [Using camera in processing for moving in specific area](https://discourse.processing.org/t/using-camera-in-processing-for-moving-in-specific-area/21080)

<div class="topic-metadata">

**Author:** [@alkyonemis](https://discourse.processing.org/u/alkyonemis)\
**Replies:** 5\
**Last updated:** [May 20, 2020, 11:26pm UTC](https://discourse.processing.org/t/using-camera-in-processing-for-moving-in-specific-area/21080 "2020-05-20T23:26:14Z")

</div>

Hi I’m a new coder on processing. I have long and complex code but I prepared a simple code to you for my question. float camX = 0; float camY = 0; float camZ = (height/2)/tan(PI/6) - 260; float x, y, z = 0; float rot…

---

## [Morph from one position to the other?](https://discourse.processing.org/t/morph-from-one-position-to-the-other/21111)

<div class="topic-metadata">

**Author:** [@rkk16](https://discourse.processing.org/u/rkk16)\
**Replies:** 1\
**Last updated:** [May 20, 2020, 8:22pm UTC](https://discourse.processing.org/t/morph-from-one-position-to-the-other/21111 "2020-05-20T20:22:14Z")

</div>

I want to create an animation of a face going from happy to sad when a button is pressed - at the moment, this happens instantaneously. I’m aware of how to make certain features move using integers and increments but is …

---

## [Diffusion Limited Aggregation](https://discourse.processing.org/t/diffusion-limited-aggregation/21006)

<div class="topic-metadata">

**Author:** [@MonkeyDLuffy](https://discourse.processing.org/u/MonkeyDLuffy)\
**Replies:** 8\
**Last updated:** [May 20, 2020, 6:18pm UTC](https://discourse.processing.org/t/diffusion-limited-aggregation/21006 "2020-05-20T18:18:10Z")

</div>

Hello, I am trying to visualize Diffusion Limited Aggregation and some of my circles are overlapping. I tried repositioning them but they still overlap. How can I fix this? My code is below: import java.lang.Math; Arra…

---

## [Realistic shapes - lips for a face](https://discourse.processing.org/t/realistic-shapes-lips-for-a-face/21101)

<div class="topic-metadata">

**Author:** [@rkk16](https://discourse.processing.org/u/rkk16)\
**Replies:** 3\
**Last updated:** [May 20, 2020, 6:08pm UTC](https://discourse.processing.org/t/realistic-shapes-lips-for-a-face/21101 "2020-05-20T18:08:15Z")

</div>

Hey guys, I’m new to processing and need help designing more complex shapes. I need curves on my arcs, not quite elipses - but just to create more realistic expressions on this facial expressions project of mine. Pressin…

---

## [Unexpected token color](https://discourse.processing.org/t/unexpected-token-color/21088)

<div class="topic-metadata">

**Author:** [@sept](https://discourse.processing.org/u/sept)\
**Replies:** 3\
**Last updated:** [May 20, 2020, 1:44pm UTC](https://discourse.processing.org/t/unexpected-token-color/21088 "2020-05-20T13:44:18Z")

</div>

First of all, sorry for my bad english. Hello i’m a French student, I’ve got a homework about a class to create balls. I’ve followed the teacher’s classes but I’m stuck with an unexpected token. You should understand my …

---

## [Connecting Rooms in a Dungeon Map Generator](https://discourse.processing.org/t/connecting-rooms-in-a-dungeon-map-generator/20918)

<div class="topic-metadata">

**Author:** [@Trilobyte](https://discourse.processing.org/u/Trilobyte)\
**Replies:** 6\
**Last updated:** [May 20, 2020, 2:55am UTC](https://discourse.processing.org/t/connecting-rooms-in-a-dungeon-map-generator/20918 "2020-05-20T02:55:29Z")

</div>

Hello! I am currently working on a project to generate 2D dungeon maps (like in Binding of Isaac, or similar games) but I am having difficulty finding a way to automatically connect rooms. I currently can generate a ran…

---

## [How to denoise an image, help me with this guys](https://discourse.processing.org/t/how-to-denoise-an-image-help-me-with-this-guys/21033)

<div class="topic-metadata">

**Author:** [@Master](https://discourse.processing.org/u/Master)\
**Replies:** 4\
**Last updated:** [May 19, 2020, 2:28pm UTC](https://discourse.processing.org/t/how-to-denoise-an-image-help-me-with-this-guys/21033 "2020-05-19T14:28:14Z")

</div>

Hello, In most of the cases, researchers bring a free noise image, next they add noise to this image, then they apply denoising approach and finally they compare between the first free noise image and the result image a…

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

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