# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=216

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

**Page:** 217

---

## [Draw pictures by y positions](https://discourse.processing.org/t/draw-pictures-by-y-positions/19916)

<div class="topic-metadata">

**Author:** [@NoName](https://discourse.processing.org/u/NoName)\
**Replies:** 4\
**Last updated:** [April 26, 2020, 2:25pm UTC](https://discourse.processing.org/t/draw-pictures-by-y-positions/19916 "2020-04-26T14:25:57Z")

</div>

Hello. The situation needs help. I (for the game) need the characters to be drawn gradually (as if the game understands which character is closer to the camera and which is not). And at the same time, that there were …

---

## [Convert .p5 code to a vector format?](https://discourse.processing.org/t/convert-p5-code-to-a-vector-format/20167)

<div class="topic-metadata">

**Author:** [@freddyB](https://discourse.processing.org/u/freddyB)\
**Replies:** 2\
**Last updated:** [April 26, 2020, 12:26pm UTC](https://discourse.processing.org/t/convert-p5-code-to-a-vector-format/20167 "2020-04-26T12:26:45Z")

</div>

Are there any way to convert .p5 code to a vector format (ai, eps, svg)? Dear network. I’ve tried to search for some converter of any kind, that can translate the file or code from my .p5 webeditor sketch to a vectorbas…

---

## [Processing Large Image Sequences, Saving Frames](https://discourse.processing.org/t/processing-large-image-sequences-saving-frames/19938)

<div class="topic-metadata">

**Author:** [@derivativejojomemes](https://discourse.processing.org/u/derivativejojomemes)\
**Replies:** 5\
**Last updated:** [April 25, 2020, 8:27pm UTC](https://discourse.processing.org/t/processing-large-image-sequences-saving-frames/19938 "2020-04-25T20:27:49Z")

</div>

Hi! I am looking for a way to load a large number of images (PNG files extracted from a video, all inside a folder in the .pde file’s directory) in a sequence: Load the first image in the sequence (for example: “abc00…

---

## [Array out of range exeption into School project](https://discourse.processing.org/t/array-out-of-range-exeption-into-school-project/20133)

<div class="topic-metadata">

**Author:** [@Jestsect](https://discourse.processing.org/u/Jestsect)\
**Replies:** 6\
**Last updated:** [April 25, 2020, 2:37pm UTC](https://discourse.processing.org/t/array-out-of-range-exeption-into-school-project/20133 "2020-04-25T14:37:11Z")

</div>

Hello, I’m trying to make a Space invader like game for a school project, but I have a problem with collisions: I have an arry wich contain shot’s coordonates and an other which contain ennemis oordonates. Ennemies spaw…

---

## [Free MMO to processing by ME](https://discourse.processing.org/t/free-mmo-to-processing-by-me/19850)

<div class="topic-metadata">

**Author:** [@erkosone](https://discourse.processing.org/u/erkosone)\
**Replies:** 4\
**Last updated:** [April 25, 2020, 12:32pm UTC](https://discourse.processing.org/t/free-mmo-to-processing-by-me/19850 "2020-04-25T12:32:48Z")

</div>

Hi people! y post this message to share with comunity my new project… y work from 2 years on a basic mmo in HTML5, and now y port this game to processing. I updated a websocket library of processing for more profesional…

---

## [Nested for loop not 'animating'](https://discourse.processing.org/t/nested-for-loop-not-animating/20083)

<div class="topic-metadata">

**Author:** [@timAllan](https://discourse.processing.org/u/timAllan)\
**Replies:** 8\
**Last updated:** [April 25, 2020, 6:45am UTC](https://discourse.processing.org/t/nested-for-loop-not-animating/20083 "2020-04-25T06:45:13Z")

</div>

Hi, I’m having trouble getting some nested for loops to ‘animate’… My code draws an enlarged ‘pixel grid’ by iterating through a 3D array, which contains a number of pixel ‘configurations’, each containing 3 ‘rows’ of …

---

## [Better color gradient for custom PShape](https://discourse.processing.org/t/better-color-gradient-for-custom-pshape/19947)

<div class="topic-metadata">

**Author:** [@BennyHacker](https://discourse.processing.org/u/BennyHacker)\
**Replies:** 7\
**Last updated:** [April 25, 2020, 1:56am UTC](https://discourse.processing.org/t/better-color-gradient-for-custom-pshape/19947 "2020-04-25T01:56:55Z")

</div>

Hey forum, I’m having trouble trying to apply a smooth color gradient to a PShape via per vertex shading. Currently I am filling the points based on the angle of each point. As you can see, the gradient appears to confo…

---

## [Help with my Lab](https://discourse.processing.org/t/help-with-my-lab/20111)

<div class="topic-metadata">

**Author:** [@Jonathan25711](https://discourse.processing.org/u/Jonathan25711)\
**Replies:** 4\
**Last updated:** [April 25, 2020, 1:28am UTC](https://discourse.processing.org/t/help-with-my-lab/20111 "2020-04-25T01:28:43Z")

</div>

So I have this code that I’m doing for a lab, thankfully my Comp-Sci teacher gave me some extra time. However, I’m confused about how the code won’t seem to work. It all makes sense to me, so maybe an eye from someone wh…

---

## [Draw a trail of rectangles recursive](https://discourse.processing.org/t/draw-a-trail-of-rectangles-recursive/13149)

<div class="topic-metadata">

**Author:** [@l-arc-en-ciel](https://discourse.processing.org/u/l-arc-en-ciel)\
**Replies:** 6\
**Last updated:** [April 25, 2020, 12:44am UTC](https://discourse.processing.org/t/draw-a-trail-of-rectangles-recursive/13149 "2020-04-25T00:44:14Z")

</div>

I want to draw a trail of rectangles with the latest in the list being in the center of the window. I do this recursively, but I don’t get exactly what I’m doing wrong, since only 2 rectangles are drawn and not 100 (max …

---

## [Keypressed - Loop Video - toggle "SketchBooks" - Script](https://discourse.processing.org/t/keypressed-loop-video-toggle-sketchbooks-script/20002)

<div class="topic-metadata">

**Author:** [@Sampling](https://discourse.processing.org/u/Sampling)\
**Replies:** 4\
**Last updated:** [April 24, 2020, 8:59pm UTC](https://discourse.processing.org/t/keypressed-loop-video-toggle-sketchbooks-script/20002 "2020-04-24T20:59:36Z")

</div>

Hello everyone, Thank you for your attention and your help. I am starting a project with Processing (I am a novice) and I was nevertheless able to compile a script which allows me to assign the 26 letters from my comp…

---

## [Question about handling "onClose" events for windows in G4P library](https://discourse.processing.org/t/question-about-handling-onclose-events-for-windows-in-g4p-library/20100)

<div class="topic-metadata">

**Author:** [@David](https://discourse.processing.org/u/David)\
**Replies:** 1\
**Last updated:** [April 24, 2020, 6:30pm UTC](https://discourse.processing.org/t/question-about-handling-onclose-events-for-windows-in-g4p-library/20100 "2020-04-24T18:30:53Z")

</div>

I want to open a child window from the main window, but I also want to prevent multiple instances of the child window from being opened. I was able to do that by calling ‘setEnabled(false)’ on the button when the child w…

---

## [Running video library and i get the error Target VM failed to initialise](https://discourse.processing.org/t/running-video-library-and-i-get-the-error-target-vm-failed-to-initialise/20022)

<div class="topic-metadata">

**Author:** [@laksa](https://discourse.processing.org/u/laksa)\
**Replies:** 3\
**Last updated:** [April 24, 2020, 6:54am UTC](https://discourse.processing.org/t/running-video-library-and-i-get-the-error-target-vm-failed-to-initialise/20022 "2020-04-24T06:54:25Z")

</div>

the error I got is : terminating with uncaught exception of type NSException Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help → Troubleshooting. this erro…

---

## ["Unreachable code" Error When Saving Frames](https://discourse.processing.org/t/unreachable-code-error-when-saving-frames/20082)

<div class="topic-metadata">

**Author:** [@BogginJunior](https://discourse.processing.org/u/BogginJunior)\
**Replies:** 2\
**Last updated:** [April 24, 2020, 1:32am UTC](https://discourse.processing.org/t/unreachable-code-error-when-saving-frames/20082 "2020-04-24T01:32:30Z")

</div>

Hi, When trying to record or saveFrame, I’m shown either “Unreachable code” or “missing active and static modes.” Does anyone know where and how to record the frames of this animation? Thank you. ArrayList\<Circle\> cir…

---

## [Inheritance Class Objects in 2D Grid Array do not align](https://discourse.processing.org/t/inheritance-class-objects-in-2d-grid-array-do-not-align/20081)

<div class="topic-metadata">

**Author:** [@debxyz](https://discourse.processing.org/u/debxyz)\
**Replies:** 7\
**Last updated:** [April 23, 2020, 10:43pm UTC](https://discourse.processing.org/t/inheritance-class-objects-in-2d-grid-array-do-not-align/20081 "2020-04-23T22:43:40Z")

</div>

I’m trying to get a 2D grid to display properly with 1 subclass object before adding additional subclasses. The code for this 2D array grid is pulled from one of my previous projects, and it worked fine. However, the d…

---

## [Graphica font size in axes and multiple lines in a plot](https://discourse.processing.org/t/graphica-font-size-in-axes-and-multiple-lines-in-a-plot/19998)

<div class="topic-metadata">

**Author:** [@crek](https://discourse.processing.org/u/crek)\
**Replies:** 5\
**Last updated:** [April 23, 2020, 10:26pm UTC](https://discourse.processing.org/t/graphica-font-size-in-axes-and-multiple-lines-in-a-plot/19998 "2020-04-23T22:26:38Z")

</div>

Hello, I am new in processing and I have some questions regarding graphica. I want to change the font size in graphica and also I want to add a second line in the same plot. Also is there a list of grapfica commands? …

---

## [Problems with createGraphics, nullPointer, type mismatch](https://discourse.processing.org/t/problems-with-creategraphics-nullpointer-type-mismatch/20059)

<div class="topic-metadata">

**Author:** [@Achimoto](https://discourse.processing.org/u/Achimoto)\
**Replies:** 3\
**Last updated:** [April 23, 2020, 10:17pm UTC](https://discourse.processing.org/t/problems-with-creategraphics-nullpointer-type-mismatch/20059 "2020-04-23T22:17:58Z")

</div>

createGraphics on Windows10, mode Java First problem: using FX2D renderer results in a NullPointerException at “beginDraw” Second problem: not compiling, Type mismatch, “cannot convert from processing.core.PGraphics…

---

## [Change Saturation of an Image](https://discourse.processing.org/t/change-saturation-of-an-image/20075)

<div class="topic-metadata">

**Author:** [@benprice](https://discourse.processing.org/u/benprice)\
**Replies:** 3\
**Last updated:** [April 23, 2020, 5:25pm UTC](https://discourse.processing.org/t/change-saturation-of-an-image/20075 "2020-04-23T17:25:49Z")

</div>

Hi, I’m trying to figure out how to change the saturation of an image, I can change its brightness, hue, invert it, but just can’t wrap my head around changing saturation (in the hope that i can put it on a slider, and …

---

## [mousePressed - not registering just once](https://discourse.processing.org/t/mousepressed-not-registering-just-once/19096)

<div class="topic-metadata">

**Author:** [@benprice](https://discourse.processing.org/u/benprice)\
**Replies:** 2\
**Last updated:** [April 23, 2020, 3:42pm UTC](https://discourse.processing.org/t/mousepressed-not-registering-just-once/19096 "2020-04-23T15:42:35Z")

</div>

Hi, I’m very new to processing, I’m trying to write a piece of code which plays and pauses a video, and want it so that when i press a certain area of the GUI it pauses the video (and displays a pause symbol) and when p…

---

## [Question about GDropList in G4P library](https://discourse.processing.org/t/question-about-gdroplist-in-g4p-library/20045)

<div class="topic-metadata">

**Author:** [@David](https://discourse.processing.org/u/David)\
**Replies:** 2\
**Last updated:** [April 23, 2020, 1:57pm UTC](https://discourse.processing.org/t/question-about-gdroplist-in-g4p-library/20045 "2020-04-23T13:57:44Z")

</div>

I’m having trouble using a droplist. I’ve looked at the examples and read through the user guides on the web site, but I can’t see what I’m doing wrong. In all the examples I’ve tried, the droplist collapses after the us…

---

## [Moving individual object rather than altogether in a for-loop (ArrayList)](https://discourse.processing.org/t/moving-individual-object-rather-than-altogether-in-a-for-loop-arraylist/20039)

<div class="topic-metadata">

**Author:** [@dada123](https://discourse.processing.org/u/dada123)\
**Replies:** 1\
**Last updated:** [April 22, 2020, 7:27pm UTC](https://discourse.processing.org/t/moving-individual-object-rather-than-altogether-in-a-for-loop-arraylist/20039 "2020-04-22T19:27:47Z")

</div>

hi, i am trying to get this moved individually instead of moving altogether at once. my objects are created in a loop, is there a way to get them to move individually instead? here’s my code, thanks in advanced! public …

---

## [An Automation for my Code (Video)](https://discourse.processing.org/t/an-automation-for-my-code-video/20041)

<div class="topic-metadata">

**Author:** [@arazym](https://discourse.processing.org/u/arazym)\
**Replies:** 3\
**Last updated:** [April 22, 2020, 8:25pm UTC](https://discourse.processing.org/t/an-automation-for-my-code-video/20041 "2020-04-22T20:25:02Z")

</div>

I basically want to run a video through this Code. (See below) The idea is, to extract all the frames, run each through the script and render them back together to a Video file. So far so good. My Video is 60sec long @…

---

## [Animated curves with beginShape()](https://discourse.processing.org/t/animated-curves-with-beginshape/19971)

<div class="topic-metadata">

**Author:** [@jeffthompson](https://discourse.processing.org/u/jeffthompson)\
**Replies:** 5\
**Last updated:** [April 22, 2020, 3:29pm UTC](https://discourse.processing.org/t/animated-curves-with-beginshape/19971 "2020-04-22T15:29:44Z")

</div>

I have a series of points forming a complex curve that I’d like to animate – essentially we see the curve being drawn point-by-point. But if I use curveVertex() and begin/endShape() but end drawing the line early, the un…

---

## [LinkedList vs ArrayList](https://discourse.processing.org/t/linkedlist-vs-arraylist/19946)

<div class="topic-metadata">

**Author:** [@noel](https://discourse.processing.org/u/noel)\
**Replies:** 21\
**Last updated:** [April 22, 2020, 11:33am UTC](https://discourse.processing.org/t/linkedlist-vs-arraylist/19946 "2020-04-22T11:33:12Z")

</div>

Code below is perfectly working, but unfortunately, OpenProcessing does not accept the LinkedList import. The other imports seem to be accepted. I would like to use ArrayList instead, but I get the “does not match” erro…

---

## [Using an integer to manipulate a string/text variable](https://discourse.processing.org/t/using-an-integer-to-manipulate-a-string-text-variable/20015)

<div class="topic-metadata">

**Author:** [@nathanprime1](https://discourse.processing.org/u/nathanprime1)\
**Replies:** 1\
**Last updated:** [April 22, 2020, 10:40am UTC](https://discourse.processing.org/t/using-an-integer-to-manipulate-a-string-text-variable/20015 "2020-04-22T10:40:15Z")

</div>

Write a function that consumes a non-negative integer k and prints a k-size diamond. A k-size diamond consists of a top, a middle and a bottom. The middle is a single row of 2k+1 d’s. The top consists of k rows. The i th…

---

## [Font and shapes look pixelated](https://discourse.processing.org/t/font-and-shapes-look-pixelated/20013)

<div class="topic-metadata">

**Author:** [@lizardking93](https://discourse.processing.org/u/lizardking93)\
**Replies:** 2\
**Last updated:** [April 22, 2020, 9:14am UTC](https://discourse.processing.org/t/font-and-shapes-look-pixelated/20013 "2020-04-22T09:14:58Z")

</div>

Hey, my sketch is looking pretty awfull. Fonts look really bad, really pixelated. I would like the project to look smooth. When I try to use background(255) on the beggining of void draw, font shows as I wish but unfortu…

---

## [Set item's color in ButtonBar (controlp5)](https://discourse.processing.org/t/set-items-color-in-buttonbar-controlp5/19935)

<div class="topic-metadata">

**Author:** [@TimoLejeune](https://discourse.processing.org/u/TimoLejeune)\
**Replies:** 3\
**Last updated:** [April 22, 2020, 7:48am UTC](https://discourse.processing.org/t/set-items-color-in-buttonbar-controlp5/19935 "2020-04-22T07:48:31Z")

</div>

Hi everyone! I am making a GUI with ControlP5 and want to make 16 buttons that each represent a color. I could just make 16 buttons, but I thought it might be nicer to do with buttonbar (or maybe checkbox). Now I want t…

---

## [Character array question](https://discourse.processing.org/t/character-array-question/20008)

<div class="topic-metadata">

**Author:** [@dauwpunt](https://discourse.processing.org/u/dauwpunt)\
**Replies:** 4\
**Last updated:** [April 21, 2020, 8:01pm UTC](https://discourse.processing.org/t/character-array-question/20008 "2020-04-21T20:01:54Z")

</div>

Hi there, I’ve got a (hopefully easy) question regarding an array of characters/symbols that represent text. Like I have it below it doesn’t allow for one of the elements to be ‘F#’ (or anything with more than 1 symbol).…

---

## [Spreading out points](https://discourse.processing.org/t/spreading-out-points/19980)

<div class="topic-metadata">

**Author:** [@yuyu\_hakusho](https://discourse.processing.org/u/yuyu_hakusho)\
**Replies:** 3\
**Last updated:** [April 21, 2020, 3:49pm UTC](https://discourse.processing.org/t/spreading-out-points/19980 "2020-04-21T15:49:18Z")

</div>

Hi everyone, I need some help with the traveling salesman problem. The issue I am having is that the (x, y) points of each city are too close to each other. As such, I get the result in the image below. Is there a way I …

---

## [Group collision detection](https://discourse.processing.org/t/group-collision-detection/19956)

<div class="topic-metadata">

**Author:** [@mala](https://discourse.processing.org/u/mala)\
**Replies:** 3\
**Last updated:** [April 21, 2020, 1:42pm UTC](https://discourse.processing.org/t/group-collision-detection/19956 "2020-04-21T13:42:07Z")

</div>

For a while I’ve been trying to fix & improve some code that uses some form of collision detection for a user chosen and variable group of objects, these are all the same size and aligned to a grid. The user should be a…

---

## [Declaring Statements for Arrays](https://discourse.processing.org/t/declaring-statements-for-arrays/19984)

<div class="topic-metadata">

**Author:** [@confusedstudent](https://discourse.processing.org/u/confusedstudent)\
**Replies:** 2\
**Last updated:** [April 21, 2020, 12:37pm UTC](https://discourse.processing.org/t/declaring-statements-for-arrays/19984 "2020-04-21T12:37:50Z")

</div>

How would I write the declaration statement for an array with 30 integers, Would this be how? int\[\] arr = new int\[30\]; int min = arr\[0\]; int max = arr\[29\];

[Previous page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=215)

[Next page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=217)
