# Coding Questions

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

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

**Page:** 187

---

## [Resize sketch error](https://discourse.processing.org/t/resize-sketch-error/647)

<div class="topic-metadata">

**Author:** [@clab](https://discourse.processing.org/u/clab)\
**Replies:** 9\
**Last updated:** [June 6, 2018, 1:17am UTC](https://discourse.processing.org/t/resize-sketch-error/647 "2018-06-06T01:17:44Z")

</div>

Hi all I am trying to resize my sketch but I keep getting a horrible error, and I am not sure what to do. import SimpleOpenNI.\*; import processing.opengl.\*; SimpleOpenNI kinect; int closestValue; float minT = 500; floa…

---

## [Loop & bg problem](https://discourse.processing.org/t/loop-bg-problem/739)

<div class="topic-metadata">

**Author:** [@rioma7](https://discourse.processing.org/u/rioma7)\
**Replies:** 12\
**Last updated:** [June 5, 2018, 9:37pm UTC](https://discourse.processing.org/t/loop-bg-problem/739 "2018-06-05T21:37:54Z")

</div>

Hello!!! I have this code: import ddf.minim.\*; import ddf.minim.analysis.\*; Minim minim; FFT fft; AudioInput in; float amp = 20; // used to make signal stronger/weaker float ampWave = 20\*amp; float avgAudi…

---

## [Conversion p5 -\> Processing](https://discourse.processing.org/t/conversion-p5-processing/368)

<div class="topic-metadata">

**Author:** [@shan](https://discourse.processing.org/u/shan)\
**Replies:** 2\
**Last updated:** [June 5, 2018, 11:27am UTC](https://discourse.processing.org/t/conversion-p5-processing/368 "2018-06-05T11:27:30Z")

</div>

Kindly help me convert p5 coding to processing. Anyone know about it? int VerletPhysics2D = toxi.physics2d.VerletPhysics2D, VerletParticle2D = toxi.physics2d.VerletParticle2D, VerletSpring2D = toxi.physics2d.Verle…

---

## [Item should not go out of the canvas](https://discourse.processing.org/t/item-should-not-go-out-of-the-canvas/695)

<div class="topic-metadata">

**Author:** [@deesha\_nayar](https://discourse.processing.org/u/deesha_nayar)\
**Replies:** 1\
**Last updated:** [June 5, 2018, 11:22am UTC](https://discourse.processing.org/t/item-should-not-go-out-of-the-canvas/695 "2018-06-05T11:22:21Z")

</div>

I made a dart board but it has some problems. Firstly it is not moving with the mouse and is following the mouse but I dont want that. Secondly I do not want my dart board to go out of the canvas Thirdly the size shou…

---

## [Make object run up ramps](https://discourse.processing.org/t/make-object-run-up-ramps/624)

<div class="topic-metadata">

**Author:** [@mikegiannak](https://discourse.processing.org/u/mikegiannak)\
**Replies:** 4\
**Last updated:** [June 5, 2018, 10:17am UTC](https://discourse.processing.org/t/make-object-run-up-ramps/624 "2018-06-05T10:17:17Z")

</div>

So, I am trying to make a 2D game where there is a ball going on forever and there is a black line dividing the screen in two halfs (upper half and lower half). There are also some objects that the ball must dodge. the o…

---

## [Stop spawning near each other! - mouse input issues with ellipse](https://discourse.processing.org/t/stop-spawning-near-each-other-mouse-input-issues-with-ellipse/653)

<div class="topic-metadata">

**Author:** [@germaine](https://discourse.processing.org/u/germaine)\
**Replies:** 3\
**Last updated:** [June 5, 2018, 12:34am UTC](https://discourse.processing.org/t/stop-spawning-near-each-other-mouse-input-issues-with-ellipse/653 "2018-06-05T00:34:16Z")

</div>

Hello! I have a program that creates a new object that displays an ellipse whenever I click the mouse. I want a new object to be created only if I click outside of an existing ellipse. However currently it creates a new …

---

## [Send value to a object](https://discourse.processing.org/t/send-value-to-a-object/657)

<div class="topic-metadata">

**Author:** [@vjjv](https://discourse.processing.org/u/vjjv)\
**Replies:** 2\
**Last updated:** [June 4, 2018, 11:43pm UTC](https://discourse.processing.org/t/send-value-to-a-object/657 "2018-06-04T23:43:23Z")

</div>

Hello everybody. I\`ve a problem: I\`ve a array of ellipse Objects. Every object has his variable of size in the constructor. In a second screen, via controlP5, a slider that change the size of every ellipse. What i want …

---

## [Array and object moving and not moving Coding Questions](https://discourse.processing.org/t/array-and-object-moving-and-not-moving-coding-questions/698)

<div class="topic-metadata">

**Author:** [@ryanho123](https://discourse.processing.org/u/ryanho123)\
**Replies:** 1\
**Last updated:** [June 4, 2018, 12:39pm UTC](https://discourse.processing.org/t/array-and-object-moving-and-not-moving-coding-questions/698 "2018-06-04T12:39:58Z")

</div>

Hello, I am new in here. Currently I am trying to figure out how to make 200 circle objects moving left to right for 5 seconds (using array). After 5 second, circle will not be moving for 2 second, then return to moving…

---

## [How to make balls in an array bounce of each other?](https://discourse.processing.org/t/how-to-make-balls-in-an-array-bounce-of-each-other/583)

<div class="topic-metadata">

**Author:** [@Eshad](https://discourse.processing.org/u/Eshad)\
**Replies:** 2\
**Last updated:** [June 4, 2018, 12:57am UTC](https://discourse.processing.org/t/how-to-make-balls-in-an-array-bounce-of-each-other/583 "2018-06-04T00:57:11Z")

</div>

I just started coding and I’m sorry if i made your eyes bleed this my collison detection class Collisions { float dir; Collisions () { } void BallCollide(float x, float y, float d) { for (int i = 0; i \< Bal…

---

## [I am completely lost - changing size according to Mouse position](https://discourse.processing.org/t/i-am-completely-lost-changing-size-according-to-mouse-position/682)

<div class="topic-metadata">

**Author:** [@the-junk](https://discourse.processing.org/u/the-junk)\
**Replies:** 1\
**Last updated:** [June 3, 2018, 7:28pm UTC](https://discourse.processing.org/t/i-am-completely-lost-changing-size-according-to-mouse-position/682 "2018-06-03T19:28:11Z")

</div>

Hello, I need some serious help… I want my tennis racquet in this code to change size according to the mouse position. When my mouse is at the bottom of the canvas, I want it to be double the size and when the mouse is …

---

## [Very new to processing - Working with Text](https://discourse.processing.org/t/very-new-to-processing-working-with-text/670)

<div class="topic-metadata">

**Author:** [@Jsabo97](https://discourse.processing.org/u/Jsabo97)\
**Replies:** 3\
**Last updated:** [June 3, 2018, 6:47pm UTC](https://discourse.processing.org/t/very-new-to-processing-working-with-text/670 "2018-06-03T18:47:13Z")

</div>

Hi I’m very new to processing and am stuck on how to go about doing what I want. Attached is what i have so far but i’d like to make it so that the “you are here” text remains at one instance while a secondary “here” is …

---

## [Trigger the video player when processing read a defined number](https://discourse.processing.org/t/trigger-the-video-player-when-processing-read-a-defined-number/559)

<div class="topic-metadata">

**Author:** [@CaptainNik](https://discourse.processing.org/u/CaptainNik)\
**Replies:** 14\
**Last updated:** [June 3, 2018, 3:54pm UTC](https://discourse.processing.org/t/trigger-the-video-player-when-processing-read-a-defined-number/559 "2018-06-03T15:54:25Z")

</div>

Hello everybody. I am very new to processing and i would like any help possible to make a project working. What i want to do is make processing read the serial port of an Arduino Uno that sends data from a sonar sensor. …

---

## [Changing shape size based on loaded data](https://discourse.processing.org/t/changing-shape-size-based-on-loaded-data/588)

<div class="topic-metadata">

**Author:** [@claudibird](https://discourse.processing.org/u/claudibird)\
**Replies:** 2\
**Last updated:** [June 3, 2018, 4:00am UTC](https://discourse.processing.org/t/changing-shape-size-based-on-loaded-data/588 "2018-06-03T04:00:14Z")

</div>

I’m trying to create an image with 7 flowers - 1 for each day. Each flower has 5 petals and i would like for them to change in size based on 5 sets of data (all as a proportion) - time spent asleep, time spent doing sede…

---

## [Implementing PBox2D in a Processing sketch](https://discourse.processing.org/t/implementing-pbox2d-in-a-processing-sketch/521)

<div class="topic-metadata">

**Author:** [@maddyna](https://discourse.processing.org/u/maddyna)\
**Replies:** 10\
**Last updated:** [June 3, 2018, 1:57am UTC](https://discourse.processing.org/t/implementing-pbox2d-in-a-processing-sketch/521 "2018-06-03T01:57:32Z")

</div>

I am following tutorials to implement box2d in my sketch but having problems in implementing the box2d in processing sketch. Am I on the rt track? please suggest whr I am going horribly wrong? import shiffman.box2d.\*;…

---

## [Create bugs inside of an ellipse](https://discourse.processing.org/t/create-bugs-inside-of-an-ellipse/599)

<div class="topic-metadata">

**Author:** [@RafaelAzevedo](https://discourse.processing.org/u/RafaelAzevedo)\
**Replies:** 12\
**Last updated:** [June 2, 2018, 7:13pm UTC](https://discourse.processing.org/t/create-bugs-inside-of-an-ellipse/599 "2018-06-02T19:13:10Z")

</div>

So, i have an array of “bugs” and want to make them appear inside of an ellipse and constrain them there until i release them (mouse click, probably). My struggle right now is to make them appear inside of the ellipse. …

---

## [The type of the expression must be an array type but it resolved to int](https://discourse.processing.org/t/the-type-of-the-expression-must-be-an-array-type-but-it-resolved-to-int/632)

<div class="topic-metadata">

**Author:** [@PeWy](https://discourse.processing.org/u/PeWy)\
**Replies:** 8\
**Last updated:** [June 2, 2018, 5:06pm UTC](https://discourse.processing.org/t/the-type-of-the-expression-must-be-an-array-type-but-it-resolved-to-int/632 "2018-06-02T17:06:17Z")

</div>

Hello. I need to convert content of int array to String and put it in to String array. I was try to use method “String.valueOf(pozitionX)” , but processing give me message: “The type of the expression must be an array t…

---

## [Processing and Kinect 360: gesture and fullscreen scaling](https://discourse.processing.org/t/processing-and-kinect-360-gesture-and-fullscreen-scaling/572)

<div class="topic-metadata">

**Author:** [@grood](https://discourse.processing.org/u/grood)\
**Replies:** 1\
**Last updated:** [June 2, 2018, 12:28pm UTC](https://discourse.processing.org/t/processing-and-kinect-360-gesture-and-fullscreen-scaling/572 "2018-06-02T12:28:57Z")

</div>

Hi, im a newbie in Processing and need some help or advice. i just found free to share code by one guys(is just painting with stroke and random colors) and i add fews feature with minim lib. Basically u can paint with k…

---

## [Send different uniform values to a single shader](https://discourse.processing.org/t/send-different-uniform-values-to-a-single-shader/568)

<div class="topic-metadata">

**Author:** [@vjjv](https://discourse.processing.org/u/vjjv)\
**Replies:** 1\
**Last updated:** [June 2, 2018, 7:34am UTC](https://discourse.processing.org/t/send-different-uniform-values-to-a-single-shader/568 "2018-06-02T07:34:20Z")

</div>

hey everybody. this time ive a problem sending invididual mensajes to a fragment shader. Ive an array of spheres, and i want that every sphere have a different size of blur, witch is a uniform of the fragment. The main c…

---

## [How to make an object go past another with PVectors?](https://discourse.processing.org/t/how-to-make-an-object-go-past-another-with-pvectors/605)

<div class="topic-metadata">

**Author:** [@orin635](https://discourse.processing.org/u/orin635)\
**Replies:** 3\
**Last updated:** [June 2, 2018, 3:43am UTC](https://discourse.processing.org/t/how-to-make-an-object-go-past-another-with-pvectors/605 "2018-06-02T03:43:45Z")

</div>

Hi guys, last night I posted about making an object move in the direction of my mouse and I finally got that! I’m so pleased but now I need to make the object continue past the marker I make. I’m terrible at explaining…

---

## [Vague error on enums at runtime](https://discourse.processing.org/t/vague-error-on-enums-at-runtime/614)

<div class="topic-metadata">

**Author:** [@StrawberrEclair](https://discourse.processing.org/u/StrawberrEclair)\
**Replies:** 2\
**Last updated:** [June 2, 2018, 1:23am UTC](https://discourse.processing.org/t/vague-error-on-enums-at-runtime/614 "2018-06-02T01:23:01Z")

</div>

Note: this is Processing 3.3.6 I’ve just started a project, and part of it requires enums. I’ve done my research and found that in order to have enums, they need to be in a seperate .java file. I’ve done that, but at ru…

---

## [How do I create an executable including various files?](https://discourse.processing.org/t/how-do-i-create-an-executable-including-various-files/567)

<div class="topic-metadata">

**Author:** [@CrispyCabot](https://discourse.processing.org/u/CrispyCabot)\
**Replies:** 6\
**Last updated:** [June 1, 2018, 12:57pm UTC](https://discourse.processing.org/t/how-do-i-create-an-executable-including-various-files/567 "2018-06-01T12:57:48Z")

</div>

Yes I know to do File \> Export Application but it just doesn’t work when I run the executable. I am guessing it is probably a problem with one of the files I am using. This includes a .ttf font and a .txt file. I also us…

---

## [Problem with using functions on a string array of videos](https://discourse.processing.org/t/problem-with-using-functions-on-a-string-array-of-videos/561)

<div class="topic-metadata">

**Author:** [@inseinse](https://discourse.processing.org/u/inseinse)\
**Replies:** 1\
**Last updated:** [June 1, 2018, 5:50am UTC](https://discourse.processing.org/t/problem-with-using-functions-on-a-string-array-of-videos/561 "2018-06-01T05:50:37Z")

</div>

Hello! I guess my problem isn’t so hard to solve, but I really need some help with this. I have an array of videos and I’m playing a random video everytime a key is pressed. Now with pressing another key I want to use …

---

## [Centering circles on the screen](https://discourse.processing.org/t/centering-circles-on-the-screen/557)

<div class="topic-metadata">

**Author:** [@Code\_Hunter](https://discourse.processing.org/u/Code_Hunter)\
**Replies:** 10\
**Last updated:** [June 1, 2018, 12:09am UTC](https://discourse.processing.org/t/centering-circles-on-the-screen/557 "2018-06-01T00:09:10Z")

</div>

I am new to this processing language, and java, but not new to programming. I am trying to convert a program I made in another language to processing, but it isn’t working properly. It is supposed to center the circles…

---

## [Making a ball move in the direction of the mouse](https://discourse.processing.org/t/making-a-ball-move-in-the-direction-of-the-mouse/573)

<div class="topic-metadata">

**Author:** [@orin635](https://discourse.processing.org/u/orin635)\
**Replies:** 3\
**Last updated:** [May 31, 2018, 10:13pm UTC](https://discourse.processing.org/t/making-a-ball-move-in-the-direction-of-the-mouse/573 "2018-05-31T22:13:55Z")

</div>

Hello guys! I’ve been looking at this forum for multiple days now and it has been so helpful but I don’t know if I’m not looking up the right thing but I just can’t find out how to do this. So I’m making a basic game t…

---

## [Display OpenCV face detection controlled by MIDI](https://discourse.processing.org/t/display-opencv-face-detection-controlled-by-midi/505)

<div class="topic-metadata">

**Author:** [@snaphaan](https://discourse.processing.org/u/snaphaan)\
**Replies:** 7\
**Last updated:** [May 31, 2018, 3:14pm UTC](https://discourse.processing.org/t/display-opencv-face-detection-controlled-by-midi/505 "2018-05-31T15:14:10Z")

</div>

Hello everybody, Im a artist and new to processing en coding in general. Im trying to make a code that captures a image of a face and use that to make a dynamic Image composed of the faces that watches it. it uses Ope…

---

## [Appearing and Disappearing Text](https://discourse.processing.org/t/appearing-and-disappearing-text/509)

<div class="topic-metadata">

**Author:** [@I7rag0n](https://discourse.processing.org/u/I7rag0n)\
**Replies:** 4\
**Last updated:** [May 31, 2018, 8:44am UTC](https://discourse.processing.org/t/appearing-and-disappearing-text/509 "2018-05-31T08:44:26Z")

</div>

Hello there. I am trying to make a game that requires a couple of text to appear and disappear after a couple of seconds. I wanted it to say “Ready?” on screen for a few seconds then disappear. Then “Get set!” appears fo…

---

## [Make Circles Look "Fuzzy/Furry"](https://discourse.processing.org/t/make-circles-look-fuzzy-furry/498)

<div class="topic-metadata">

**Author:** [@jcw016](https://discourse.processing.org/u/jcw016)\
**Replies:** 4\
**Last updated:** [May 29, 2018, 11:22pm UTC](https://discourse.processing.org/t/make-circles-look-fuzzy-furry/498 "2018-05-29T23:22:16Z")

</div>

Hello! First I want to thank everybody who helped me on my last question, I really appreciated it! I’m still working on my class project and I’m stuck at where it asks me to make the circles look “fuzzy” or “furry” like…

---

## [Setting transparency with pixels\[\]](https://discourse.processing.org/t/setting-transparency-with-pixels/501)

<div class="topic-metadata">

**Author:** [@Skranker](https://discourse.processing.org/u/Skranker)\
**Replies:** 19\
**Last updated:** [May 30, 2018, 1:47pm UTC](https://discourse.processing.org/t/setting-transparency-with-pixels/501 "2018-05-30T13:47:51Z")

</div>

Hello, i have a sketch where i’m trying to set a certain color of an image to zero transparency color(0,0). It works in the first part of the sketch but for some reason doesn’t work in the second part. See image for r…

---

## [What am i missing? (createImage)](https://discourse.processing.org/t/what-am-i-missing-createimage/470)

<div class="topic-metadata">

**Author:** [@Skranker](https://discourse.processing.org/u/Skranker)\
**Replies:** 4\
**Last updated:** [May 30, 2018, 5:33am UTC](https://discourse.processing.org/t/what-am-i-missing-createimage/470 "2018-05-30T05:33:40Z")

</div>

Hey, i’m simply trying to create an image and set every pixel to white. What am i doing wrong here? PImage img; void setup() { img = createImage(500, 500, RGB); size(1920, 1080); } void draw() { img.loadPixels();…

---

## [Help needed in creating heatmap](https://discourse.processing.org/t/help-needed-in-creating-heatmap/500)

<div class="topic-metadata">

**Author:** [@ranaaman29](https://discourse.processing.org/u/ranaaman29)\
**Replies:** 1\
**Last updated:** [May 30, 2018, 5:27am UTC](https://discourse.processing.org/t/help-needed-in-creating-heatmap/500 "2018-05-30T05:27:57Z")

</div>

Hi there I am new to Processing. I am trying to create a heat map using arduino and processing via serial communication. Arduino sending data in csv format Xaxis, Yaxis, Sensor. Xaxis, Yaxis, Sensor. Xaxis, Yaxis, S…

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

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