# Coding Questions

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

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

**Page:** 181

---

## [java.lang.NoClassDefFoundError for GIF image](https://discourse.processing.org/t/java-lang-noclassdeffounderror-for-gif-image/2231)

<div class="topic-metadata">

**Author:** [@nvwingh](https://discourse.processing.org/u/nvwingh)\
**Replies:** 4\
**Last updated:** [July 31, 2018, 9:37am UTC](https://discourse.processing.org/t/java-lang-noclassdeffounderror-for-gif-image/2231 "2018-07-31T09:37:49Z")

</div>

I am playing a GIF image in the main window, just for testing the GifAnimation Library. I used the following code as prescribed by the library… import gifAnimation.\*; Gif myAnimation; void setup() { size(400,400);…

---

## [Screen is Blinking](https://discourse.processing.org/t/screen-is-blinking/2195)

<div class="topic-metadata">

**Author:** [@nvwingh](https://discourse.processing.org/u/nvwingh)\
**Replies:** 5\
**Last updated:** [July 31, 2018, 7:21am UTC](https://discourse.processing.org/t/screen-is-blinking/2195 "2018-07-31T07:21:49Z")

</div>

I am using an Image I drew with a dynamic background colour to simulate day/ night… Depending on the time of day the background colour changes dynamically. What happens is that not only my background changes, but the who…

---

## [Help with static methods!](https://discourse.processing.org/t/help-with-static-methods/2228)

<div class="topic-metadata">

**Author:** [@michaelberge](https://discourse.processing.org/u/michaelberge)\
**Replies:** 6\
**Last updated:** [July 31, 2018, 6:50am UTC](https://discourse.processing.org/t/help-with-static-methods/2228 "2018-07-31T06:50:20Z")

</div>

I’m getting an error that says ‘No enclosing instance of type \_\_\_\_ is accessible’. I basically want a class that has both non-static and static variables but Processing doesn’t allow that for some reason. I tried putting…

---

## [Rotation an object using processing](https://discourse.processing.org/t/rotation-an-object-using-processing/2089)

<div class="topic-metadata">

**Author:** [@bill](https://discourse.processing.org/u/bill)\
**Replies:** 8\
**Last updated:** [July 31, 2018, 1:14am UTC](https://discourse.processing.org/t/rotation-an-object-using-processing/2089 "2018-07-31T01:14:52Z")

</div>

Hi there, I am new to processing. I have an idea to do a sketch of tower crane’s top view. so I have two objects to consider one is the jib rotating and the second is the trolley moving along the jib. I have did the par…

---

## [Drawing line between to different objects](https://discourse.processing.org/t/drawing-line-between-to-different-objects/2185)

<div class="topic-metadata">

**Author:** [@janberkjk](https://discourse.processing.org/u/janberkjk)\
**Replies:** 11\
**Last updated:** [July 30, 2018, 8:10pm UTC](https://discourse.processing.org/t/drawing-line-between-to-different-objects/2185 "2018-07-30T20:10:04Z")

</div>

Hello everyone, I have object stars and what i need to do, draw line between two stars, if two stars close to each other, and delete line if not, star(x,y); for example if the distance between star 1 x and star 2 x cl…

---

## [Weird Type mismatch when calling value from ArrayList](https://discourse.processing.org/t/weird-type-mismatch-when-calling-value-from-arraylist/2204)

<div class="topic-metadata">

**Author:** [@flashbacker](https://discourse.processing.org/u/flashbacker)\
**Replies:** 4\
**Last updated:** [July 30, 2018, 2:56pm UTC](https://discourse.processing.org/t/weird-type-mismatch-when-calling-value-from-arraylist/2204 "2018-07-30T14:56:53Z")

</div>

Hello, in a project, i’m creating an array of arrayLists that i’m filling with integers in a function and then sending through OSC messages. But if I try to add one of the value to the osc message: myMessage.add(messa…

---

## [Help with text and video](https://discourse.processing.org/t/help-with-text-and-video/2104)

<div class="topic-metadata">

**Author:** [@Cemaronte](https://discourse.processing.org/u/Cemaronte)\
**Replies:** 15\
**Last updated:** [July 30, 2018, 8:32am UTC](https://discourse.processing.org/t/help-with-text-and-video/2104 "2018-07-30T08:32:58Z")

</div>

Hello everyone, I need to solve this and I’ve been trying for several hours now. I’m learning how to code. This is the code that I’m working on that starts of with one of the coding train challenges. What I want to do is…

---

## [How to get polar coordinates of pixels in an image?](https://discourse.processing.org/t/how-to-get-polar-coordinates-of-pixels-in-an-image/2090)

<div class="topic-metadata">

**Author:** [@socraticbot](https://discourse.processing.org/u/socraticbot)\
**Replies:** 10\
**Last updated:** [July 28, 2018, 6:05pm UTC](https://discourse.processing.org/t/how-to-get-polar-coordinates-of-pixels-in-an-image/2090 "2018-07-28T18:05:03Z")

</div>

Hi all, I am trying to print the polar coordinates of black pixels in an .jpg image using processing. What is a way or formula to do this?

---

## [Processing Version](https://discourse.processing.org/t/processing-version/2120)

<div class="topic-metadata">

**Author:** [@Stanlepunk](https://discourse.processing.org/u/Stanlepunk)\
**Replies:** 6\
**Last updated:** [July 28, 2018, 12:22pm UTC](https://discourse.processing.org/t/processing-version/2120 "2018-07-28T12:22:46Z")

</div>

Hello, Is it possible to catch the REVISION or VERSION\_NAME of Processing from a sketch ? I see this Static Final in the code Base of Processing but I find noway to catch from sketch, any idea about a possibility ? Th…

---

## [Animated conveyor belt](https://discourse.processing.org/t/animated-conveyor-belt/2060)

<div class="topic-metadata">

**Author:** [@Groot](https://discourse.processing.org/u/Groot)\
**Replies:** 11\
**Last updated:** [July 28, 2018, 10:32am UTC](https://discourse.processing.org/t/animated-conveyor-belt/2060 "2018-07-28T10:32:06Z")

</div>

Hi all, so i have searched the net and cant find an example anywhere and a bit lost as where to start. I want to loop through an array and each time create a bar plot. each new bar (3d rect/box) is brought to the fron…

---

## [Location for .csv file to place](https://discourse.processing.org/t/location-for-csv-file-to-place/2116)

<div class="topic-metadata">

**Author:** [@Newcoder](https://discourse.processing.org/u/Newcoder)\
**Replies:** 3\
**Last updated:** [July 27, 2018, 6:08pm UTC](https://discourse.processing.org/t/location-for-csv-file-to-place/2116 "2018-07-27T18:08:02Z")

</div>

Hi, can anyone advise me where exactly to put the csv file in order for the sketch to work? I had tried create a data folder in the same folder location as my sketch folder and also try create the data folder with the sk…

---

## [Error: java.lang.RuntimeException](https://discourse.processing.org/t/error-java-lang-runtimeexception/2130)

<div class="topic-metadata">

**Author:** [@gerome](https://discourse.processing.org/u/gerome)\
**Replies:** 6\
**Last updated:** [July 27, 2018, 12:41pm UTC](https://discourse.processing.org/t/error-java-lang-runtimeexception/2130 "2018-07-27T12:41:28Z")

</div>

Hello, can anybody read this error? I have no idea what does it mean but as I have to fix this for a project in time I would appreciate help. It occurs a few sec after starting. (the same code did yesterday not produce …

---

## ["Frequency Spectrum" differs between edge and chrome](https://discourse.processing.org/t/frequency-spectrum-differs-between-edge-and-chrome/2077)

<div class="topic-metadata">

**Author:** [@rettifan](https://discourse.processing.org/u/rettifan)\
**Replies:** 3\
**Last updated:** [July 27, 2018, 3:30am UTC](https://discourse.processing.org/t/frequency-spectrum-differs-between-edge-and-chrome/2077 "2018-07-27T03:30:31Z")

</div>

Hi, I just noticed that the Frequency Spectrum example differs between edge and chrome. Any idea which browser is right or what the reason could be?

---

## [Help with Project on Placing shapes where mouse is at](https://discourse.processing.org/t/help-with-project-on-placing-shapes-where-mouse-is-at/2093)

<div class="topic-metadata">

**Author:** [@MrDancingKitty](https://discourse.processing.org/u/MrDancingKitty)\
**Replies:** 11\
**Last updated:** [July 26, 2018, 6:11am UTC](https://discourse.processing.org/t/help-with-project-on-placing-shapes-where-mouse-is-at/2093 "2018-07-26T06:11:38Z")

</div>

I’m working on a project but for I can’t for the life of me understand why nothing is showing up on the canvas and am running out of patience. Can anybody tell me what’s wrong? The overall project needs buttons on the ca…

---

## [Snake Game Void Draw Stops](https://discourse.processing.org/t/snake-game-void-draw-stops/2079)

<div class="topic-metadata">

**Author:** [@LordFarquaad](https://discourse.processing.org/u/LordFarquaad)\
**Replies:** 3\
**Last updated:** [July 25, 2018, 9:51pm UTC](https://discourse.processing.org/t/snake-game-void-draw-stops/2079 "2018-07-25T21:51:09Z")

</div>

I am making the classic snake game. I have managed to complete the basics of the game (e.g. eating food, collision detection, etc.) and it works fairly well. However, occasionally when I eat the food, the snake stops, an…

---

## [Cast from PGraphics to GraphicsDevice?](https://discourse.processing.org/t/cast-from-pgraphics-to-graphicsdevice/2083)

<div class="topic-metadata">

**Author:** [@MCCreeper8890](https://discourse.processing.org/u/MCCreeper8890)\
**Replies:** 2\
**Last updated:** [July 25, 2018, 8:15pm UTC](https://discourse.processing.org/t/cast-from-pgraphics-to-graphicsdevice/2083 "2018-07-25T20:15:48Z")

</div>

I am trying to make a 3D game in Processing, and the problem I run into the most is the cursor going out of the window, and losing control of the camera. If only the cursor looped back around… Well, I used java.awt.Robo…

---

## [Fast blur in JAVA2D](https://discourse.processing.org/t/fast-blur-in-java2d/690)

<div class="topic-metadata">

**Author:** [@lqdev](https://discourse.processing.org/u/lqdev)\
**Replies:** 6\
**Last updated:** [July 25, 2018, 10:30am UTC](https://discourse.processing.org/t/fast-blur-in-java2d/690 "2018-07-25T10:30:22Z")

</div>

Hello, I need some fast blur for a sketch I am making. So far I have only tried filter(), but it is slow I need to blur only an area, not the entire image The blur needs to run smoothly at 60 fps. Is this possible wi…

---

## [Weird issue with pgraphics](https://discourse.processing.org/t/weird-issue-with-pgraphics/2063)

<div class="topic-metadata">

**Author:** [@ducco](https://discourse.processing.org/u/ducco)\
**Replies:** 3\
**Last updated:** [July 25, 2018, 11:11am UTC](https://discourse.processing.org/t/weird-issue-with-pgraphics/2063 "2018-07-25T11:11:05Z")

</div>

i’m trying to copy image information from one pgraphic to another (like trying to cache the old one and render it in the background) and it keeping having weird effects like it being linked together permanently when i us…

---

## [Game impediments](https://discourse.processing.org/t/game-impediments/896)

<div class="topic-metadata">

**Author:** [@Speedo](https://discourse.processing.org/u/Speedo)\
**Replies:** 4\
**Last updated:** [July 25, 2018, 7:37am UTC](https://discourse.processing.org/t/game-impediments/896 "2018-07-25T07:37:52Z")

</div>

I’m programming a little game at the moment; in this game you can “drive” with a little square in a little map. The map is drawn with loaded images; black squares which don’t move. Now my question: How can I make this…

---

## [Says missing curly brackets, but they're all there](https://discourse.processing.org/t/says-missing-curly-brackets-but-theyre-all-there/2059)

<div class="topic-metadata">

**Author:** [@donotread123](https://discourse.processing.org/u/donotread123)\
**Replies:** 1\
**Last updated:** [July 25, 2018, 5:53am UTC](https://discourse.processing.org/t/says-missing-curly-brackets-but-theyre-all-there/2059 "2018-07-25T05:53:14Z")

</div>

Unless I’m missing something, this code should be correct. My goal was to make a circle (“Bubble”) which would be a random color. however, it says that I am missing curly brackets “{” missing on line 4: int color = int(…

---

## [Export QuickTime Movie using a sketch](https://discourse.processing.org/t/export-quicktime-movie-using-a-sketch/2014)

<div class="topic-metadata">

**Author:** [@DongKingKong0](https://discourse.processing.org/u/DongKingKong0)\
**Replies:** 2\
**Last updated:** [July 24, 2018, 7:46pm UTC](https://discourse.processing.org/t/export-quicktime-movie-using-a-sketch/2014 "2018-07-24T19:46:10Z")

</div>

I want to have a sketch to export a QuickTime Movie from images created with saveFrame(). I don’t want to use the “Create Movie” Tool for that. As far as I know, this function was included in the processing.video libra…

---

## [Drag and Drop for android](https://discourse.processing.org/t/drag-and-drop-for-android/2019)

<div class="topic-metadata">

**Author:** [@reda](https://discourse.processing.org/u/reda)\
**Replies:** 2\
**Last updated:** [July 24, 2018, 5:10pm UTC](https://discourse.processing.org/t/drag-and-drop-for-android/2019 "2018-07-24T17:10:19Z")

</div>

I’m new to processing but I have a good programming skills I want to drag ie a square shape and drop it on another square , a kind of matching shapes games could you help on that please. more clarification : if I dra…

---

## [SVG properties - modifying after import](https://discourse.processing.org/t/svg-properties-modifying-after-import/2028)

<div class="topic-metadata">

**Author:** [@pxlmnkeee](https://discourse.processing.org/u/pxlmnkeee)\
**Replies:** 6\
**Last updated:** [July 24, 2018, 3:28pm UTC](https://discourse.processing.org/t/svg-properties-modifying-after-import/2028 "2018-07-24T15:28:45Z")

</div>

I’m using the Python mode in Processing, but I’m guessing this might be an issue in other processing modes as well: I’ve imported some SVGs exported from Illustrator (as well as other hand coded SVGs) and I’m having pro…

---

## [Limit speed of an object](https://discourse.processing.org/t/limit-speed-of-an-object/2044)

<div class="topic-metadata">

**Author:** [@mattwonderwall](https://discourse.processing.org/u/mattwonderwall)\
**Replies:** 3\
**Last updated:** [July 24, 2018, 12:22pm UTC](https://discourse.processing.org/t/limit-speed-of-an-object/2044 "2018-07-24T12:22:01Z")

</div>

I’ve been breaking my head over how I can limit the speed of a bouncing ball. I’ve chosen that for every time it hits, to increase the speed by 5%, using the following code. if (xpos \> width-rad || xpos \< rad || ypos \>…

---

## [Randomize color on bouncing ball](https://discourse.processing.org/t/randomize-color-on-bouncing-ball/2042)

<div class="topic-metadata">

**Author:** [@mattwonderwall](https://discourse.processing.org/u/mattwonderwall)\
**Replies:** 1\
**Last updated:** [July 24, 2018, 10:29am UTC](https://discourse.processing.org/t/randomize-color-on-bouncing-ball/2042 "2018-07-24T10:29:50Z")

</div>

I’ve created a bouncing ball and want to randomize the color of the ball with each hit against the size perimeter. However, with the following code it will only randomize the color once and stay that color (filler is the…

---

## [OpenGL disable anti-aliasing](https://discourse.processing.org/t/opengl-disable-anti-aliasing/2024)

<div class="topic-metadata">

**Author:** [@DongKingKong0](https://discourse.processing.org/u/DongKingKong0)\
**Replies:** 4\
**Last updated:** [July 24, 2018, 7:29am UTC](https://discourse.processing.org/t/opengl-disable-anti-aliasing/2024 "2018-07-24T07:29:58Z")

</div>

The question is simple: Is there any way to disable anti-aliasing in OPENGL? I couldn’t find a way to do this, so any suggestion is much appreciated :slight\_smile:

---

## [Trying to Reduce the Number of Global Variables](https://discourse.processing.org/t/trying-to-reduce-the-number-of-global-variables/1942)

<div class="topic-metadata">

**Author:** [@QuazArxx](https://discourse.processing.org/u/QuazArxx)\
**Replies:** 8\
**Last updated:** [July 23, 2018, 4:26pm UTC](https://discourse.processing.org/t/trying-to-reduce-the-number-of-global-variables/1942 "2018-07-23T16:26:35Z")

</div>

int x, y; int xSpeed = 0; int ySpeed = 0; int diam = 50; int xConstr; int yConstr; void setup() { size(400,400); smooth(); x = width / 2; y = height / 2; } void draw() { drawBackground(); drawObject(); …

---

## [9-Point mesh warping](https://discourse.processing.org/t/9-point-mesh-warping/1932)

<div class="topic-metadata">

**Author:** [@jakedubber](https://discourse.processing.org/u/jakedubber)\
**Replies:** 5\
**Last updated:** [July 23, 2018, 9:01am UTC](https://discourse.processing.org/t/9-point-mesh-warping/1932 "2018-07-23T09:01:38Z")

</div>

I’m trying to figure out how to go about warping a mesh using 9 handles (marked in red). I can already deform the mesh by moving the corners but it’s the intermediary handles I’m really struggling with. I need this to wo…

---

## [\[Answered\] How to get text from paste buffer?](https://discourse.processing.org/t/answered-how-to-get-text-from-paste-buffer/1900)

<div class="topic-metadata">

**Author:** [@Architector\_4](https://discourse.processing.org/u/Architector_4)\
**Replies:** 3\
**Last updated:** [July 22, 2018, 8:26pm UTC](https://discourse.processing.org/t/answered-how-to-get-text-from-paste-buffer/1900 "2018-07-22T20:26:43Z")

</div>

OS: Windows 10 64bit. Processing 3.3.7. I am looking for a solution on how to get text from the copy/paste system buffer (aka CTRL+C CTRL+V buffer). So far I have this code compiled from examples and such from other pe…

---

## [Box() - set boundary on the Y axis](https://discourse.processing.org/t/box-set-boundary-on-the-y-axis/1959)

<div class="topic-metadata">

**Author:** [@Caitlin123](https://discourse.processing.org/u/Caitlin123)\
**Replies:** 2\
**Last updated:** [July 22, 2018, 8:26pm UTC](https://discourse.processing.org/t/box-set-boundary-on-the-y-axis/1959 "2018-07-22T20:26:41Z")

</div>

Hi all, Very new to processing, essentially im trying to loop through a csv folder to create a bar graph. the bars will be 3d boxes. Using the below as an example, what i dont understand is, when using the box function,…

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

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