# Processing

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

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

**Page:** 70

---

## [How to optimize HSB color comparisons?](https://discourse.processing.org/t/how-to-optimize-hsb-color-comparisons/38551)

<div class="topic-metadata">

**Author:** [@i-make-robots](https://discourse.processing.org/u/i-make-robots)\
**Replies:** 1\
**Last updated:** [August 29, 2022, 10:23pm UTC](https://discourse.processing.org/t/how-to-optimize-hsb-color-comparisons/38551 "2022-08-29T22:23:03Z")

</div>

This sketch takes a picture and interprets it as though it was woven from colored string wrapped around a circle of nails. It was originally written in RGB space where I am most comfortable. I tried swapping out the …

---

## [Confusing Syntax Error Code (TicTacToe)](https://discourse.processing.org/t/confusing-syntax-error-code-tictactoe/38550)

<div class="topic-metadata">

**Author:** [@user10012201](https://discourse.processing.org/u/user10012201)\
**Replies:** 6\
**Last updated:** [August 29, 2022, 9:20pm UTC](https://discourse.processing.org/t/confusing-syntax-error-code-tictactoe/38550 "2022-08-29T21:20:53Z")

</div>

I am trying to make a TicTacToe game as part of a java lesson I am following along with. I completed the lesson, but there is a single line that processing claims is a syntax error that is stopping it from compiling. I c…

---

## [Unable to build tool for Processing 4.0.1](https://discourse.processing.org/t/unable-to-build-tool-for-processing-4-0-1/38539)

<div class="topic-metadata">

**Author:** [@quark](https://discourse.processing.org/u/quark)\
**Replies:** 0\
**Last updated:** [August 29, 2022, 11:44am UTC](https://discourse.processing.org/t/unable-to-build-tool-for-processing-4-0-1/38539 "2022-08-29T11:44:20Z")

</div>

I am trying to build GUI Builder for Processing 4.0.1 using Eclipse. With PS v3 this has never been a problem but now the pde is compiled to Java 11 (major version 55) so I get import processing.app.Base; \[javac\] …

---

## [Creating a library, errors while building javadoc](https://discourse.processing.org/t/creating-a-library-errors-while-building-javadoc/38528)

<div class="topic-metadata">

**Author:** [@f42ter](https://discourse.processing.org/u/f42ter)\
**Replies:** 1\
**Last updated:** [August 29, 2022, 8:18am UTC](https://discourse.processing.org/t/creating-a-library-errors-while-building-javadoc/38528 "2022-08-29T08:18:30Z")

</div>

Dear world ;-\> As already requested a couple of weeks ago volunteers, supporters needed ;-\> I start to build an opencv lib for processing → 4.x on Raspberry 4 using opencv 4.5.5 (java). Make some progress so far, the…

---

## [Name of variable (file exists)](https://discourse.processing.org/t/name-of-variable-file-exists/38527)

<div class="topic-metadata">

**Author:** [@jensemand](https://discourse.processing.org/u/jensemand)\
**Replies:** 5\
**Last updated:** [August 28, 2022, 6:01pm UTC](https://discourse.processing.org/t/name-of-variable-file-exists/38527 "2022-08-28T18:01:21Z")

</div>

Hi, I need to check if i have a specific file named positions1, positions2, positions3,… I thought I could combine a string with an integer and then write something like File nameofString+number= new File(sketchPath()…

---

## [Make an ASCII Video](https://discourse.processing.org/t/make-an-ascii-video/38507)

<div class="topic-metadata">

**Author:** [@Roklair](https://discourse.processing.org/u/Roklair)\
**Replies:** 2\
**Last updated:** [August 28, 2022, 7:31am UTC](https://discourse.processing.org/t/make-an-ascii-video/38507 "2022-08-28T07:31:05Z")

</div>

Hello everyone. Recently I got interested in ASCII art, I could see that there was an example created by Ben Fry in the Processing library. My problem is that I want to use this code but with an imported video and not …

---

## [How to Read Data from Google Calendar (or similar) in Processing](https://discourse.processing.org/t/how-to-read-data-from-google-calendar-or-similar-in-processing/38525)

<div class="topic-metadata">

**Author:** [@CaseyJ](https://discourse.processing.org/u/CaseyJ)\
**Replies:** 1\
**Last updated:** [August 27, 2022, 7:17pm UTC](https://discourse.processing.org/t/how-to-read-data-from-google-calendar-or-similar-in-processing/38525 "2022-08-27T19:17:08Z")

</div>

I have been thinking of ways to read data from a collaborative cloud based calendar, like Google Calendar. I imagine there may be other services but let’s roll with this one for now. Would it be possible to read data fr…

---

## [How to map an object to JSON in Processing](https://discourse.processing.org/t/how-to-map-an-object-to-json-in-processing/38432)

<div class="topic-metadata">

**Author:** [@Rico](https://discourse.processing.org/u/Rico)\
**Replies:** 2\
**Last updated:** [August 27, 2022, 4:49pm UTC](https://discourse.processing.org/t/how-to-map-an-object-to-json-in-processing/38432 "2022-08-27T16:49:29Z")

</div>

Hi all, I’ve been looking into various ways of mapping object to json in Processing and I can’t seem to get anything to work. I have tried GSON, Javax and Jackson. but all throw errors. Maybe I’m not loading all the de…

---

## [Dynamically Setting the Window as Undecorated](https://discourse.processing.org/t/dynamically-setting-the-window-as-undecorated/33327)

<div class="topic-metadata">

**Author:** [@Brahvim](https://discourse.processing.org/u/Brahvim)\
**Replies:** 5\
**Last updated:** [August 26, 2022, 12:02pm UTC](https://discourse.processing.org/t/dynamically-setting-the-window-as-undecorated/33327 "2022-08-26T12:02:49Z")

</div>

Just as the title says: I want to be able to set the window as ‘undecorated’, while the sketch is running. It causes some errors inside “handleDraw()”, however. I felt that it may be possible if I call noLoop(), wait f…

---

## [Can't detect PDE vs command line, PDE no longer passing --external](https://discourse.processing.org/t/cant-detect-pde-vs-command-line-pde-no-longer-passing-external/10508)

<div class="topic-metadata">

**Author:** [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Replies:** 9\
**Last updated:** [August 26, 2022, 11:49am UTC](https://discourse.processing.org/t/cant-detect-pde-vs-command-line-pde-no-longer-passing-external/10508 "2022-08-26T11:49:54Z")

</div>

Two years ago I developed a sketch that could be run from PDE or from the command line (processing-java) – optionally with arguments. I wanted the sketch to know which way it had been run (PDE or command line). Detect …

---

## [How to change FrameRate](https://discourse.processing.org/t/how-to-change-framerate/38455)

<div class="topic-metadata">

**Author:** [@aladin](https://discourse.processing.org/u/aladin)\
**Replies:** 4\
**Last updated:** [August 26, 2022, 11:03am UTC](https://discourse.processing.org/t/how-to-change-framerate/38455 "2022-08-26T11:03:33Z")

</div>

I am trying to set FrameRate using the framerate() function but it is not working, the actual framerate while running the code ranges between 1.8 - 4 fps , here is my setup code: void setup (){ System.out.println("dis…

---

## [Simple Sketch Lagging Despite Low Draw Time](https://discourse.processing.org/t/simple-sketch-lagging-despite-low-draw-time/38491)

<div class="topic-metadata">

**Author:** [@sudonym](https://discourse.processing.org/u/sudonym)\
**Replies:** 3\
**Last updated:** [August 26, 2022, 5:12am UTC](https://discourse.processing.org/t/simple-sketch-lagging-despite-low-draw-time/38491 "2022-08-26T05:12:57Z")

</div>

I have been using Processing for a while, and though my code can get pretty long it never lags. However, while working on this relatively simple sketch the display lags like crazy (~3-4fps). This is the code for my sket…

---

## [How do I push UART data into the sound library's FFT function?](https://discourse.processing.org/t/how-do-i-push-uart-data-into-the-sound-librarys-fft-function/38484)

<div class="topic-metadata">

**Author:** [@onelectron](https://discourse.processing.org/u/onelectron)\
**Replies:** 0\
**Last updated:** [August 25, 2022, 11:25am UTC](https://discourse.processing.org/t/how-do-i-push-uart-data-into-the-sound-librarys-fft-function/38484 "2022-08-25T11:25:17Z")

</div>

Hello, I am trying to send data from an accelerometer to the Processing through UART. I was able to accomplish that portion of my project. My final goal is to use the sensor data to create an FFT visual interface to vis…

---

## [FFT in Processing](https://discourse.processing.org/t/fft-in-processing/38463)

<div class="topic-metadata">

**Author:** [@onelectron](https://discourse.processing.org/u/onelectron)\
**Replies:** 4\
**Last updated:** [August 25, 2022, 2:01pm UTC](https://discourse.processing.org/t/fft-in-processing/38463 "2022-08-25T14:01:38Z")

</div>

Hello, I am trying to send data from an accelerometer to the Processing through UART. It’s working. My final goal is to use the sensor data to create an FFT visual interface to visualize the vibration frequency. I have …

---

## [Creating SVG limited to canvas size](https://discourse.processing.org/t/creating-svg-limited-to-canvas-size/38426)

<div class="topic-metadata">

**Author:** [@i-draw-monkeys](https://discourse.processing.org/u/i-draw-monkeys)\
**Replies:** 13\
**Last updated:** [August 25, 2022, 6:52am UTC](https://discourse.processing.org/t/creating-svg-limited-to-canvas-size/38426 "2022-08-25T06:52:36Z")

</div>

I am just learning Processing to make files for the Axidraw. I have figured out my best workflow in terms of saving SVGs but just hit a snag. I am using simplified code for this example here using one line (but in the fi…

---

## [Splitting a list of ints, using a special number as a "separator"](https://discourse.processing.org/t/splitting-a-list-of-ints-using-a-special-number-as-a-separator/38471)

<div class="topic-metadata">

**Author:** [@eltrem](https://discourse.processing.org/u/eltrem)\
**Replies:** 10\
**Last updated:** [August 24, 2022, 10:02pm UTC](https://discourse.processing.org/t/splitting-a-list-of-ints-using-a-special-number-as-a-separator/38471 "2022-08-24T22:02:27Z")

</div>

I’m trying to split an incoming list of numbers to fill an ArrayList. Each new chopped IntList would have a different size, and on the incoming -unchopped- list i can use -1 as the separator. I’m having problems to pars…

---

## [Set Height and Width of Display Area using Variables?](https://discourse.processing.org/t/set-height-and-width-of-display-area-using-variables/38468)

<div class="topic-metadata">

**Author:** [@digitalArtform](https://discourse.processing.org/u/digitalArtform)\
**Replies:** 1\
**Last updated:** [August 23, 2022, 8:14pm UTC](https://discourse.processing.org/t/set-height-and-width-of-display-area-using-variables/38468 "2022-08-23T20:14:42Z")

</div>

Is it possible to first load an image, and then use the height and width of the loaded image to specify the height and width of the Processing canvas? Every example I see already knows the needed canvas height and width …

---

## [Feedback on tutorial](https://discourse.processing.org/t/feedback-on-tutorial/38467)

<div class="topic-metadata">

**Author:** [@hl5hl5](https://discourse.processing.org/u/hl5hl5)\
**Replies:** 0\
**Last updated:** [August 23, 2022, 8:04pm UTC](https://discourse.processing.org/t/feedback-on-tutorial/38467 "2022-08-23T20:04:37Z")

</div>

Wonderful tutorial by Dan. Hope to keep learning code. I’m new at all this but it’s very exciting.

---

## [Can someone help draw a robot?](https://discourse.processing.org/t/can-someone-help-draw-a-robot/38461)

<div class="topic-metadata">

**Author:** [@Frost](https://discourse.processing.org/u/Frost)\
**Replies:** 11\
**Last updated:** [August 23, 2022, 12:39pm UTC](https://discourse.processing.org/t/can-someone-help-draw-a-robot/38461 "2022-08-23T12:39:40Z")

</div>

i need to make a target that includes ellipses, triangles, rectangles and lines. so im trying to make a robot but im struggling on drawing the triangles and lines. i was thinking to have two triangles for ears directly a…

---

## [Reversing Projection like \`gluUnproject()\`](https://discourse.processing.org/t/reversing-projection-like-gluunproject/35964)

<div class="topic-metadata">

**Author:** [@Brahvim](https://discourse.processing.org/u/Brahvim)\
**Replies:** 3\
**Last updated:** [August 23, 2022, 9:09am UTC](https://discourse.processing.org/t/reversing-projection-like-gluunproject/35964 "2022-08-23T09:09:16Z")

</div>

Edit, made a day later: This Stackoverflow Post seems to be of some help. ORIGINAL POST: Hello there! As the title states, I want to “reverse” the effect that applying projection makes to a vector. So, in Processing, …

---

## [How to make gradient color in controlP5](https://discourse.processing.org/t/how-to-make-gradient-color-in-controlp5/15539)

<div class="topic-metadata">

**Author:** [@yty](https://discourse.processing.org/u/yty)\
**Replies:** 7\
**Last updated:** [August 23, 2022, 1:01am UTC](https://discourse.processing.org/t/how-to-make-gradient-color-in-controlp5/15539 "2022-08-23T01:01:06Z")

</div>

Hello, I’m fairly new to processing therefore I have some issues with my program. I have made a slider using the cp5 library in Processing. However, I have some issues when it comes to changing the color to a gradient…

---

## [Processing cheat sheet for generative art, animation, and art pictures](https://discourse.processing.org/t/processing-cheat-sheet-for-generative-art-animation-and-art-pictures/38429)

<div class="topic-metadata">

**Author:** [@Ahmed24633](https://discourse.processing.org/u/Ahmed24633)\
**Replies:** 6\
**Last updated:** [August 22, 2022, 2:38pm UTC](https://discourse.processing.org/t/processing-cheat-sheet-for-generative-art-animation-and-art-pictures/38429 "2022-08-22T14:38:20Z")

</div>

Can anyone provide me a good processing cheat sheet? I think large cheat sheet will work for may purpose. I want to make generative art, animations, and some beautiful art work pictures. The cheat sheet should cover pro…

---

## [Adding Timestamps in Applications at time of Export](https://discourse.processing.org/t/adding-timestamps-in-applications-at-time-of-export/38431)

<div class="topic-metadata">

**Author:** [@pyronox](https://discourse.processing.org/u/pyronox)\
**Replies:** 3\
**Last updated:** [August 22, 2022, 10:15am UTC](https://discourse.processing.org/t/adding-timestamps-in-applications-at-time-of-export/38431 "2022-08-22T10:15:45Z")

</div>

Hi all, I was hoping this might be quite an easy one. but haven’t been able to find an answer. When exporting an application in processing4 , does anybody know an easy way to store the time at export into the code with…

---

## [Saving SVG: I only want to save the canvas, not lines drawn outside](https://discourse.processing.org/t/saving-svg-i-only-want-to-save-the-canvas-not-lines-drawn-outside/38421)

<div class="topic-metadata">

**Author:** [@i-draw-monkeys](https://discourse.processing.org/u/i-draw-monkeys)\
**Replies:** 1\
**Last updated:** [August 21, 2022, 9:02pm UTC](https://discourse.processing.org/t/saving-svg-i-only-want-to-save-the-canvas-not-lines-drawn-outside/38421 "2022-08-21T21:02:17Z")

</div>

I am trying to make some SVGs for my pen plotter using math to draw lines. I define the canvas size in setup, but some points that the math designates are outside of this. Here is example code that I simplified where thi…

---

## [Check key for Pos1, End, Ctrl-1, Ctrl-Pos1, Ctrl-End](https://discourse.processing.org/t/check-key-for-pos1-end-ctrl-1-ctrl-pos1-ctrl-end/38413)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 10\
**Last updated:** [August 21, 2022, 11:52am UTC](https://discourse.processing.org/t/check-key-for-pos1-end-ctrl-1-ctrl-pos1-ctrl-end/38413 "2022-08-21T11:52:28Z")

</div>

Hello all, how can I check the aforementioned keys please? Cheers! Chrisir

---

## [Processing camera](https://discourse.processing.org/t/processing-camera/38415)

<div class="topic-metadata">

**Author:** [@madtolla](https://discourse.processing.org/u/madtolla)\
**Replies:** 7\
**Last updated:** [August 21, 2022, 9:36am UTC](https://discourse.processing.org/t/processing-camera/38415 "2022-08-21T09:36:13Z")

</div>

Hello guys I’m trying to run the code below for 2 days to open the camera by using processing and literally tried every single method but I didn’t solve it, plz need your help import processing.video.\*; Capture video; …

---

## [TRIANGLE\_STRIP lighting problem](https://discourse.processing.org/t/triangle-strip-lighting-problem/38348)

<div class="topic-metadata">

**Author:** [@Tsskyx](https://discourse.processing.org/u/Tsskyx)\
**Replies:** 9\
**Last updated:** [August 21, 2022, 3:31am UTC](https://discourse.processing.org/t/triangle-strip-lighting-problem/38348 "2022-08-21T03:31:12Z")

</div>

I want to add some simple lighting to my 3D terrain that I’m generating using beginShape with TRIANGLE\_STRIP like this: for (int i = 0; i \< count - 1; i++) { beginShape(TRIANGLE\_STRIP); for (int j = 0; j \< count; j+…

---

## [Creating Stills](https://discourse.processing.org/t/creating-stills/38284)

<div class="topic-metadata">

**Author:** [@asymmetric](https://discourse.processing.org/u/asymmetric)\
**Replies:** 16\
**Last updated:** [August 19, 2022, 4:51pm UTC](https://discourse.processing.org/t/creating-stills/38284 "2022-08-19T16:51:58Z")

</div>

Hi, I used the following code under void draw(); in order to save images of my code rather than a screenshot. When I do so, I receive an error message saying Error “void”? void keyPressed(){ if(keyCode == ENTER){ …

---

## [Network module help](https://discourse.processing.org/t/network-module-help/38368)

<div class="topic-metadata">

**Author:** [@Broadcaster](https://discourse.processing.org/u/Broadcaster)\
**Replies:** 5\
**Last updated:** [August 17, 2022, 9:03pm UTC](https://discourse.processing.org/t/network-module-help/38368 "2022-08-17T21:03:29Z")

</div>

Hi! I know this is vage but i have problems using network to get a pastebin post. I tried this: import processing.net.\*; Client myClient; int dataIn; void setup() { size(200, 200); myClient = new Client(this…

---

## [How to create a low resolution video with data received from UART?](https://discourse.processing.org/t/how-to-create-a-low-resolution-video-with-data-received-from-uart/38376)

<div class="topic-metadata">

**Author:** [@onelectron](https://discourse.processing.org/u/onelectron)\
**Replies:** 4\
**Last updated:** [August 17, 2022, 12:55pm UTC](https://discourse.processing.org/t/how-to-create-a-low-resolution-video-with-data-received-from-uart/38376 "2022-08-17T12:55:37Z")

</div>

Hello, I am planning to send data through the COM port to Processing to construct a low-resolution image based on the collected data. As it is being sent over UART, I assume that the refresh rate will be very low. My id…

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

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