# Latest

**URL:** https://discourse.processing.org/latest.md?no_subcategories=false&page=526

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

**Page:** 527

---

## [Setting canvas and background color in setup() not working](https://discourse.processing.org/t/setting-canvas-and-background-color-in-setup-not-working/8162)

<div class="topic-metadata">

**Author:** [@Milky](https://discourse.processing.org/u/Milky)\
**Replies:** 2\
**Last updated:** [February 7, 2019, 4:48pm UTC](https://discourse.processing.org/t/setting-canvas-and-background-color-in-setup-not-working/8162 "2019-02-07T16:48:22Z")

</div>

function setup() { createCanvas(windowWidth, windowHeight); background(0, 0, 0); } this is pretty much how my setup() function starts. Everything in draw() works fine, but my canvas is never set and my background col…

---

## [Getting the depth image from a Real Sense camera](https://discourse.processing.org/t/getting-the-depth-image-from-a-real-sense-camera/7456)

<div class="topic-metadata">

**Author:** [@Lucca](https://discourse.processing.org/u/Lucca)\
**Replies:** 7\
**Last updated:** [February 7, 2019, 4:29pm UTC](https://discourse.processing.org/t/getting-the-depth-image-from-a-real-sense-camera/7456 "2019-02-07T16:29:37Z")

</div>

Hi @cansik I am trying to use your Java wrapper to get a depth image from a Real Sense D435, but I get a NullPointerException when the context is created in line 63 of RealSenseCamera.pde. Any ideas? this.context = Con…

---

## [Canvas black when viewing Pi via VNC](https://discourse.processing.org/t/canvas-black-when-viewing-pi-via-vnc/8185)

<div class="topic-metadata">

**Author:** [@sciss](https://discourse.processing.org/u/sciss)\
**Replies:** 5\
**Last updated:** [February 7, 2019, 3:53pm UTC](https://discourse.processing.org/t/canvas-black-when-viewing-pi-via-vnc/8185 "2019-02-07T15:53:16Z")

</div>

Hello, I noticed that while I can see the processing canvas fine on a monitor via HDMI, connecting to the Pi via VNC makes the canvas appear just as a black rectangle. Is there a trick to overcome this limitation, at l…

---

## [Timeout occured while waiting for packet n, IDE freezes](https://discourse.processing.org/t/timeout-occured-while-waiting-for-packet-n-ide-freezes/8188)

<div class="topic-metadata">

**Author:** [@kesson](https://discourse.processing.org/u/kesson)\
**Replies:** 1\
**Last updated:** [February 7, 2019, 3:18pm UTC](https://discourse.processing.org/t/timeout-occured-while-waiting-for-packet-n-ide-freezes/8188 "2019-02-07T15:18:01Z")

</div>

Hi all, Lately I am receiving quite often several errors in Processing IDE when I try to run a sketch. The error is Timeout occured while waiting for packet (random number) Not sure what can cause it, but this probl…

---

## [Cartesian to Spherical coordinates conversion issue](https://discourse.processing.org/t/cartesian-to-spherical-coordinates-conversion-issue/8174)

<div class="topic-metadata">

**Author:** [@kesson](https://discourse.processing.org/u/kesson)\
**Replies:** 2\
**Last updated:** [February 7, 2019, 11:02am UTC](https://discourse.processing.org/t/cartesian-to-spherical-coordinates-conversion-issue/8174 "2019-02-07T11:02:43Z")

</div>

Hi everyone, I am trying to convert the cartesian coordinates a PVector in 3D space, with coordinates (x, y, z) in spherical coordinates (so obtaining radius, theta and phi). Below is the code I am testing, rarely it “…

---

## [Sound Input Considerable latency](https://discourse.processing.org/t/sound-input-considerable-latency/7770)

<div class="topic-metadata">

**Author:** [@n055](https://discourse.processing.org/u/n055)\
**Replies:** 10\
**Last updated:** [February 7, 2019, 9:45am UTC](https://discourse.processing.org/t/sound-input-considerable-latency/7770 "2019-02-07T09:45:51Z")

</div>

Hi, Im using the Sound library in processing (I think it comes form the Jsyn source?) anyways,I’m using it to make an audio visualizer to be used in a live music set. Currently everything is working properly with peak am…

---

## [Loops in shader](https://discourse.processing.org/t/loops-in-shader/8176)

<div class="topic-metadata">

**Author:** [@vjjv](https://discourse.processing.org/u/vjjv)\
**Replies:** 3\
**Last updated:** [February 7, 2019, 7:05am UTC](https://discourse.processing.org/t/loops-in-shader/8176 "2019-02-07T07:05:00Z")

</div>

Hi !m trying to fix this shader. the effects is a radial blur around a point position, passing from the cpu in a array. The calculations works fine for each point and generates de effect, but as you can see in this pictu…

---

## [Errors with Weather API](https://discourse.processing.org/t/errors-with-weather-api/8180)

<div class="topic-metadata">

**Author:** [@jadenfigger](https://discourse.processing.org/u/jadenfigger)\
**Replies:** 3\
**Last updated:** [February 7, 2019, 5:59am UTC](https://discourse.processing.org/t/errors-with-weather-api/8180 "2019-02-07T05:59:45Z")

</div>

Im trying to draw a circle based on data from a weather api and when i try to draw the circle i keep getting an error. I don’t know how to fix the mistake so here is the code. If you know how to fix it could you please l…

---

## [Is it possible to draw a class that draws sub-classes within itself? For example, a 4x4 block made up of 1x1 blocks](https://discourse.processing.org/t/is-it-possible-to-draw-a-class-that-draws-sub-classes-within-itself-for-example-a-4x4-block-made-up-of-1x1-blocks/8169)

<div class="topic-metadata">

**Author:** [@domedisorder](https://discourse.processing.org/u/domedisorder)\
**Replies:** 1\
**Last updated:** [February 7, 2019, 3:23am UTC](https://discourse.processing.org/t/is-it-possible-to-draw-a-class-that-draws-sub-classes-within-itself-for-example-a-4x4-block-made-up-of-1x1-blocks/8169 "2019-02-07T03:23:57Z")

</div>

I’m attempting to make a Tetris-like game, where the game’s pieces are all made up of smaller pieces that share properties. Currently I have: export class SquareTetromino { \[x: string\]: any; constructor…

---

## [Export sketch to jar](https://discourse.processing.org/t/export-sketch-to-jar/8147)

<div class="topic-metadata">

**Author:** [@Quillbert1](https://discourse.processing.org/u/Quillbert1)\
**Replies:** 4\
**Last updated:** [February 7, 2019, 12:30am UTC](https://discourse.processing.org/t/export-sketch-to-jar/8147 "2019-02-07T00:30:14Z")

</div>

Is it possible to export a processing sketch as a jar, or to turn the exported files into an executable jar? I tried following the instructions here https://forum.processing.org/one/topic/getting-processing-to-export-as-…

---

## [PGraphics P2D background in setup issue](https://discourse.processing.org/t/pgraphics-p2d-background-in-setup-issue/8112)

<div class="topic-metadata">

**Author:** [@wqt](https://discourse.processing.org/u/wqt)\
**Replies:** 3\
**Last updated:** [February 6, 2019, 8:04pm UTC](https://discourse.processing.org/t/pgraphics-p2d-background-in-setup-issue/8112 "2019-02-06T20:04:40Z")

</div>

Hi there. I am using a PGraphics as a mask, the PGraphics’s background is set in the setup section so that my mask is not erased every frame. Somehow that works fine with the default renderer, but not in P2D, there is …

---

## [Default argument like c++](https://discourse.processing.org/t/default-argument-like-c/8131)

<div class="topic-metadata">

**Author:** [@diazdaiz](https://discourse.processing.org/u/diazdaiz)\
**Replies:** 2\
**Last updated:** [February 6, 2019, 7:42pm UTC](https://discourse.processing.org/t/default-argument-like-c/8131 "2019-02-06T19:42:27Z")

</div>

is there a way so i can write default argument in processing like c++? in c++, for example: void test(a=100) { … //some function that print value of a } so, when we call the function of test, if we dont passed val…

---

## [Pong game help me](https://discourse.processing.org/t/pong-game-help-me/7499)

<div class="topic-metadata">

**Author:** [@VLAD](https://discourse.processing.org/u/VLAD)\
**Replies:** 4\
**Last updated:** [February 6, 2019, 6:10pm UTC](https://discourse.processing.org/t/pong-game-help-me/7499 "2019-02-06T18:10:44Z")

</div>

Hello, I have to do a Pong for School but i didnt know how to do it, i’m absolut beginner. Pls help me. I’ve found some code for the game but they didnt have all i want. And I want to understand what happen in the co…

---

## [Processing with Max MSP](https://discourse.processing.org/t/processing-with-max-msp/8081)

<div class="topic-metadata">

**Author:** [@LordCacops](https://discourse.processing.org/u/LordCacops)\
**Replies:** 2\
**Last updated:** [February 6, 2019, 5:09pm UTC](https://discourse.processing.org/t/processing-with-max-msp/8081 "2019-02-06T17:09:19Z")

</div>

Hello. I am trying to link up Processing with Max. I am particularly interested in sending data from Processing into Max. I downloaded a thing called Maxlink 0.36, but its latest version is from 2010. \[http://jklabs.net…

---

## [Processing Community Day @ Orlando](https://discourse.processing.org/t/processing-community-day-orlando/7914)

<div class="topic-metadata">

**Author:** [@Synthestruct](https://discourse.processing.org/u/Synthestruct)\
**Replies:** 3\
**Last updated:** [February 6, 2019, 5:02pm UTC](https://discourse.processing.org/t/processing-community-day-orlando/7914 "2019-02-06T17:02:32Z")

</div>

Hello All! I’m the organizer for Processing Community Day in Orlando, FL! Here are the confirmed date and location the PCD meetup:: Orlando’s World Processing Day Meetup: February 9th, 1pm-4pm Melrose Center, Orland…

---

## [Help with delay/millis without influencing the framerate](https://discourse.processing.org/t/help-with-delay-millis-without-influencing-the-framerate/8153)

<div class="topic-metadata">

**Author:** [@jensemand](https://discourse.processing.org/u/jensemand)\
**Replies:** 6\
**Last updated:** [February 6, 2019, 4:45pm UTC](https://discourse.processing.org/t/help-with-delay-millis-without-influencing-the-framerate/8153 "2019-02-06T16:45:07Z")

</div>

Hi i am trying to make some text pop up each letter at a time by using a string while my framerate is at 60 however i can not use delay() because it would influence the framerate. How can i do this without using delay? p…

---

## [Little Problem with the random function](https://discourse.processing.org/t/little-problem-with-the-random-function/8155)

<div class="topic-metadata">

**Author:** [@Voltflo](https://discourse.processing.org/u/Voltflo)\
**Replies:** 2\
**Last updated:** [February 6, 2019, 3:09pm UTC](https://discourse.processing.org/t/little-problem-with-the-random-function/8155 "2019-02-06T15:09:47Z")

</div>

So for the Start I just wanted to programme a little game. So in the game you have to catch balls with a bucket. So I just wanted to randomize were the balls are dropping but instead of choosing 1 location he chooses 100…

---

## [Random position without overlapping](https://discourse.processing.org/t/random-position-without-overlapping/7904)

<div class="topic-metadata">

**Author:** [@vincentstrebelle](https://discourse.processing.org/u/vincentstrebelle)\
**Replies:** 17\
**Last updated:** [February 6, 2019, 11:48am UTC](https://discourse.processing.org/t/random-position-without-overlapping/7904 "2019-02-06T11:48:51Z")

</div>

Hi i try to find a way to place objects on my world but without overlapping and i cant find a way. here’s my code: public class World2 { PApplet parent; public int worldW = 2000; public int worldH = 2000; Playe…

---

## [Problem with frameRate](https://discourse.processing.org/t/problem-with-framerate/8151)

<div class="topic-metadata">

**Author:** [@jensemand](https://discourse.processing.org/u/jensemand)\
**Replies:** 4\
**Last updated:** [February 6, 2019, 11:02am UTC](https://discourse.processing.org/t/problem-with-framerate/8151 "2019-02-06T11:02:55Z")

</div>

Hi i am making a game where the framerate has to be 60. However when i write frameRate(60); in void setup and println(frameCount) in draw it seems the frameCount is around 20. It Would be nice to know if there’s anythi…

---

## [Live coding visualisation](https://discourse.processing.org/t/live-coding-visualisation/8123)

<div class="topic-metadata">

**Author:** [@josephh](https://discourse.processing.org/u/josephh)\
**Replies:** 3\
**Last updated:** [February 6, 2019, 10:10am UTC](https://discourse.processing.org/t/live-coding-visualisation/8123 "2019-02-06T10:10:53Z")

</div>

Hi there, Since couple weeks, I am experiencing livecoding (amazing :slight\_smile:) with FoxDot (in python : http://foxdot.org/) and I would like to make a program in processing to visualize it. I was trying to use the …

---

## [To stop part of drawings from being removed at update](https://discourse.processing.org/t/to-stop-part-of-drawings-from-being-removed-at-update/8017)

<div class="topic-metadata">

**Author:** [@Ismaiel\_Ahmed](https://discourse.processing.org/u/Ismaiel_Ahmed)\
**Replies:** 4\
**Last updated:** [February 6, 2019, 6:03am UTC](https://discourse.processing.org/t/to-stop-part-of-drawings-from-being-removed-at-update/8017 "2019-02-06T06:03:42Z")

</div>

I’m trying to simulate DDMR (Differential Drive Mobile Robot) However, draw() method makes update to all the shape and erase the previous frame I need to draw a specific shape and prevent it from being updated or remov…

---

## [How do you add up 2 numbers from a duplicate JSON key?](https://discourse.processing.org/t/how-do-you-add-up-2-numbers-from-a-duplicate-json-key/7948)

<div class="topic-metadata">

**Author:** [@anon98404100](https://discourse.processing.org/u/anon98404100)\
**Replies:** 3\
**Last updated:** [February 5, 2019, 8:45am UTC](https://discourse.processing.org/t/how-do-you-add-up-2-numbers-from-a-duplicate-json-key/7948 "2019-02-05T08:45:16Z")

</div>

I have to display data from the JSON file we got. There are a few entries that have a duplicate object. You can see it here : 2 categories called “fruit” which each have a different number. However, The way my code c…

---

## [Save a text file without utf 8](https://discourse.processing.org/t/save-a-text-file-without-utf-8/8061)

<div class="topic-metadata">

**Author:** [@Grimtin10](https://discourse.processing.org/u/Grimtin10)\
**Replies:** 2\
**Last updated:** [February 6, 2019, 4:10am UTC](https://discourse.processing.org/t/save-a-text-file-without-utf-8/8061 "2019-02-06T04:10:08Z")

</div>

How do I save a text file in Processing without it converting to UTF-8? Please help. Thanks.

---

## [saveFrame location options processing](https://discourse.processing.org/t/saveframe-location-options-processing/8136)

<div class="topic-metadata">

**Author:** [@juriaan](https://discourse.processing.org/u/juriaan)\
**Replies:** 11\
**Last updated:** [February 6, 2019, 3:36am UTC](https://discourse.processing.org/t/saveframe-location-options-processing/8136 "2019-02-06T03:36:09Z")

</div>

Hey couldn’t find this anywhere online but is it possible to save a image from a specific location on my canvas. my canvas is 1400 x 800. but I want the image of only the right 600 x 800. Thanks This is what I have: i…

---

## [Problems with equals](https://discourse.processing.org/t/problems-with-equals/8102)

<div class="topic-metadata">

**Author:** [@Woodey](https://discourse.processing.org/u/Woodey)\
**Replies:** 2\
**Last updated:** [February 6, 2019, 12:56am UTC](https://discourse.processing.org/t/problems-with-equals/8102 "2019-02-06T00:56:13Z")

</div>

Hello, excuse my english I have a problem with an If Equals query of two strings. It is a processing code for Android. The variable “Datum2” is the current date as a string without an intermediate character. The other…

---

## [Programming question, pertaining to motion](https://discourse.processing.org/t/programming-question-pertaining-to-motion/8070)

<div class="topic-metadata">

**Author:** [@superman](https://discourse.processing.org/u/superman)\
**Replies:** 6\
**Last updated:** [February 6, 2019, 12:53am UTC](https://discourse.processing.org/t/programming-question-pertaining-to-motion/8070 "2019-02-06T00:53:04Z")

</div>

I have an item obeying the laws of “projectile throw” which travels expected. If it lands on a ramph(opposite the launch), I want it’s trajectory to change–from the former path, projectile throw, to a normal path up the…

---

## [How to "attach" a box to another box](https://discourse.processing.org/t/how-to-attach-a-box-to-another-box/8053)

<div class="topic-metadata">

**Author:** [@Quilliam](https://discourse.processing.org/u/Quilliam)\
**Replies:** 3\
**Last updated:** [February 6, 2019, 12:23am UTC](https://discourse.processing.org/t/how-to-attach-a-box-to-another-box/8053 "2019-02-06T00:23:46Z")

</div>

The best example I can think of for what I mean is coding something similar to a ferris wheel. Say we have: function draw() { background(20); push(); rotateZ(frameCount \* 0.01); fill(255, 0, 0); box(300, 5, 5…

---

## [Print class variables](https://discourse.processing.org/t/print-class-variables/8142)

<div class="topic-metadata">

**Author:** [@f42ter](https://discourse.processing.org/u/f42ter)\
**Replies:** 1\
**Last updated:** [February 5, 2019, 9:01pm UTC](https://discourse.processing.org/t/print-class-variables/8142 "2019-02-05T21:01:55Z")

</div>

Sorry to bother you again but I’m working on a class with a large number of variables (in C I would implement this as a struct). For debugging purposes I want to print (loop) over all variables inside this class. Unfortu…

---

## [Image Encryption/Decryption tool bug](https://discourse.processing.org/t/image-encryption-decryption-tool-bug/8119)

<div class="topic-metadata">

**Author:** [@cheetahdoesstuff](https://discourse.processing.org/u/cheetahdoesstuff)\
**Replies:** 2\
**Last updated:** [February 5, 2019, 6:05pm UTC](https://discourse.processing.org/t/image-encryption-decryption-tool-bug/8119 "2019-02-05T18:05:08Z")

</div>

Hello I am trying to make an image encryptor/decryptor for a hobby project of mine and I’ve gotten it to work but it has a weird bug. Here are the images (code further down) Original: Encrypted file(Slightly downsca…

---

## [How to debug p5 mic input](https://discourse.processing.org/t/how-to-debug-p5-mic-input/8082)

<div class="topic-metadata">

**Author:** [@blkpanther](https://discourse.processing.org/u/blkpanther)\
**Replies:** 4\
**Last updated:** [February 5, 2019, 4:36pm UTC](https://discourse.processing.org/t/how-to-debug-p5-mic-input/8082 "2019-02-05T16:36:52Z")

</div>

I’m using the sample code on p5 website for mic input, but the screen doesn’t change on sound input - the circle doesn’t change height. I have p5.sound.js in the library folder, and another song input sample works, so th…

[Previous page](https://discourse.processing.org/latest.md?no_subcategories=false&page=525)

[Next page](https://discourse.processing.org/latest.md?no_subcategories=false&page=527)
