# Latest

**URL:** https://discourse.processing.org/latest.md?page=470

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

**Page:** 471

---

## [Why is it that when I zoom in the frameRate drops massively?](https://discourse.processing.org/t/why-is-it-that-when-i-zoom-in-the-framerate-drops-massively/12349)

<div class="topic-metadata">

**Author:** [@LoliProcessor](https://discourse.processing.org/u/LoliProcessor)\
**Replies:** 9\
**Last updated:** [June 29, 2019, 1:21pm UTC](https://discourse.processing.org/t/why-is-it-that-when-i-zoom-in-the-framerate-drops-massively/12349 "2019-06-29T13:21:58Z")

</div>

I wrote a game where when you increase the zoom factor by even the slightest, the frameRate drops massively until it barely renders the next frame anymore; weirdly, that doesn’t occur when zooming out. reversely, zoomin…

---

## [What is the difference between pixelDensity() and displayDensity()?](https://discourse.processing.org/t/what-is-the-difference-between-pixeldensity-and-displaydensity/12381)

<div class="topic-metadata">

**Author:** [@matias.silva](https://discourse.processing.org/u/matias.silva)\
**Replies:** 2\
**Last updated:** [June 29, 2019, 2:31pm UTC](https://discourse.processing.org/t/what-is-the-difference-between-pixeldensity-and-displaydensity/12381 "2019-06-29T14:31:36Z")

</div>

Hey! I’ve started to use p5.Graphics in my sketches and ran into a problem with pixel densities. I’m familiar with p5 and Processing but can’t quite grasp the meaning of these two functions and how they differ. Also, wh…

---

## [Odd behaviour when using copy()](https://discourse.processing.org/t/odd-behaviour-when-using-copy/12375)

<div class="topic-metadata">

**Author:** [@lsk](https://discourse.processing.org/u/lsk)\
**Replies:** 2\
**Last updated:** [June 29, 2019, 1:26pm UTC](https://discourse.processing.org/t/odd-behaviour-when-using-copy/12375 "2019-06-29T13:26:54Z")

</div>

I create a PGraphics object pg1 and set its color to blue. Then I want to copy a tile from pg1 to a PImage object the size of 1 tile. I use pImg.copy(src, sx, sy, sw, sh, dx, dy, dw, dh); This should - if I understood …

---

## [Time line without Flash](https://discourse.processing.org/t/time-line-without-flash/12037)

<div class="topic-metadata">

**Author:** [@Thiru](https://discourse.processing.org/u/Thiru)\
**Replies:** 20\
**Last updated:** [June 29, 2019, 12:24pm UTC](https://discourse.processing.org/t/time-line-without-flash/12037 "2019-06-29T12:24:47Z")

</div>

Hi, I have basic knowledge of programming. After doing a bit of research, it looks like the timeline shown in this link can be done in HTML, Canvas, JS,… (without adobe flash). I would very much appreciate if you wo…

---

## [Pixel to String length](https://discourse.processing.org/t/pixel-to-string-length/12330)

<div class="topic-metadata">

**Author:** [@The\_nish](https://discourse.processing.org/u/The_nish)\
**Replies:** 4\
**Last updated:** [June 27, 2019, 11:25am UTC](https://discourse.processing.org/t/pixel-to-string-length/12330 "2019-06-27T11:25:50Z")

</div>

i am converting my image pixel as a string and print of its length then i get output is given in example image. what is wrong with it. void function() { for(int x=0; x\<img.height;x++) { for(int y=0; y…

---

## [Why is p5.js preload so slow?](https://discourse.processing.org/t/why-is-p5-js-preload-so-slow/12176)

<div class="topic-metadata">

**Author:** [@clankill3r](https://discourse.processing.org/u/clankill3r)\
**Replies:** 3\
**Last updated:** [June 29, 2019, 10:39am UTC](https://discourse.processing.org/t/why-is-p5-js-preload-so-slow/12176 "2019-06-29T10:39:53Z")

</div>

I load a few mp3 files that are 2 minutes long. function preload() { sound\_dancer\_1\_l = loadSound('data/GH010103\_1-L.mp3'); sound\_dancer\_1\_r = loadSound('data/GH010103\_1-R.mp3'); sound\_dancer\_2\_l = loadSound('data/…

---

## [I want to count the number of occurrences of a name of "sato"](https://discourse.processing.org/t/i-want-to-count-the-number-of-occurrences-of-a-name-of-sato/12257)

<div class="topic-metadata">

**Author:** [@henry](https://discourse.processing.org/u/henry)\
**Replies:** 17\
**Last updated:** [June 29, 2019, 10:16am UTC](https://discourse.processing.org/t/i-want-to-count-the-number-of-occurrences-of-a-name-of-sato/12257 "2019-06-29T10:16:02Z")

</div>

what’s wrong with my code? It should be print out “4” for “sato”'s appearance times String\[\]lines= loadStrings("data.txt"); String\[\]sato= loadStrings("keyword.txt"); int count=0; for (int i=0; i\<lines.length; i++) { …

---

## [Insufficient memory for Java – Sketch on RaspberryPi](https://discourse.processing.org/t/insufficient-memory-for-java-sketch-on-raspberrypi/12331)

<div class="topic-metadata">

**Author:** [@o\_b](https://discourse.processing.org/u/o_b)\
**Replies:** 10\
**Last updated:** [June 28, 2019, 11:40pm UTC](https://discourse.processing.org/t/insufficient-memory-for-java-sketch-on-raspberrypi/12331 "2019-06-28T23:40:53Z")

</div>

Hi there, I’m running a sketch thats plays random sound every 5 seconds, on a RaspberryPi, using the minim library and the sampler class. The sketch is running fine but only for 5 minutes, then the sounds starts to det…

---

## [How to save console output as a .txt file](https://discourse.processing.org/t/how-to-save-console-output-as-a-txt-file/12353)

<div class="topic-metadata">

**Author:** [@The\_nish](https://discourse.processing.org/u/The_nish)\
**Replies:** 14\
**Last updated:** [June 28, 2019, 7:52pm UTC](https://discourse.processing.org/t/how-to-save-console-output-as-a-txt-file/12353 "2019-06-28T19:52:20Z")

</div>

i am printing an image of binary and i want to print exactly this Image of String in .txt file. is this possible to take ouput of console print data to save as .txt file

---

## [How to make grid of image pixels in nested loop](https://discourse.processing.org/t/how-to-make-grid-of-image-pixels-in-nested-loop/12356)

<div class="topic-metadata">

**Author:** [@The\_nish](https://discourse.processing.org/u/The_nish)\
**Replies:** 2\
**Last updated:** [June 28, 2019, 7:57pm UTC](https://discourse.processing.org/t/how-to-make-grid-of-image-pixels-in-nested-loop/12356 "2019-06-28T19:57:32Z")

</div>

i have image pixel length from 0 to 10000 . i want to make a grid of 100\*100 in nested loop. please tell me how can i do that… for (int y=0; y\<img.height; y++) { for (int x=0; x\<img.width; x++) { int…

---

## [How to use tint() with copy()](https://discourse.processing.org/t/how-to-use-tint-with-copy/12359)

<div class="topic-metadata">

**Author:** [@TheWizardBear](https://discourse.processing.org/u/TheWizardBear)\
**Replies:** 7\
**Last updated:** [June 28, 2019, 6:05pm UTC](https://discourse.processing.org/t/how-to-use-tint-with-copy/12359 "2019-06-28T18:05:13Z")

</div>

To put a tint on an image you use the tint function followed by the image function like so: tint(255, 0, 0); image(img, 0, 0); //red image But when I try to use the copy function, the tint isn’t applied as it is only e…

---

## [How shall I make get(mouseX, mouseY)) return RGB triplets](https://discourse.processing.org/t/how-shall-i-make-get-mousex-mousey-return-rgb-triplets/12364)

<div class="topic-metadata">

**Author:** [@andre](https://discourse.processing.org/u/andre)\
**Replies:** 2\
**Last updated:** [June 28, 2019, 6:03pm UTC](https://discourse.processing.org/t/how-shall-i-make-get-mousex-mousey-return-rgb-triplets/12364 "2019-06-28T18:03:03Z")

</div>

Tried to see pixels color using void mousePressed() { println(get(mouseX, mouseY));} It returns -1 for white spots, close to -16581375 on black spots and in between for the rest. How shall I get it as RGB triplets?

---

## [Unwanted scrollbar showing because of canvas](https://discourse.processing.org/t/unwanted-scrollbar-showing-because-of-canvas/12214)

<div class="topic-metadata">

**Author:** [@Halhex](https://discourse.processing.org/u/Halhex)\
**Replies:** 8\
**Last updated:** [June 28, 2019, 5:51pm UTC](https://discourse.processing.org/t/unwanted-scrollbar-showing-because-of-canvas/12214 "2019-06-28T17:51:27Z")

</div>

I am creating a simple p5.js canvas using the values from it’s parent, which takes up exactly half the screen. When I add the canvas which has the exact size as my html , body and #musicscape elements, a vertical scr…

---

## [How to start an animation again from the beginning at specific point](https://discourse.processing.org/t/how-to-start-an-animation-again-from-the-beginning-at-specific-point/12232)

<div class="topic-metadata">

**Author:** [@TurboUrpo](https://discourse.processing.org/u/TurboUrpo)\
**Replies:** 6\
**Last updated:** [June 28, 2019, 3:27pm UTC](https://discourse.processing.org/t/how-to-start-an-animation-again-from-the-beginning-at-specific-point/12232 "2019-06-28T15:27:44Z")

</div>

Yep, that’s the thing where I need some help and advice. How to set it the way that it runs the animation from beginning, and at the specific point the animation starts again from the beginning and runs again at the same…

---

## [Type + Code (Caligraft Sketch)](https://discourse.processing.org/t/type-code-caligraft-sketch/12237)

<div class="topic-metadata">

**Author:** [@PixelMx](https://discourse.processing.org/u/PixelMx)\
**Replies:** 6\
**Last updated:** [June 28, 2019, 3:24pm UTC](https://discourse.processing.org/t/type-code-caligraft-sketch/12237 "2019-06-28T15:24:26Z")

</div>

I was trying to replicate some code from the book Type + Code (page 68) I was surprised to see that the size function is called with variables, as I expected I’m getting an error. I changed the values with 800, 600, P3D…

---

## [String not converted Properly from int](https://discourse.processing.org/t/string-not-converted-properly-from-int/12295)

<div class="topic-metadata">

**Author:** [@The\_nish](https://discourse.processing.org/u/The_nish)\
**Replies:** 15\
**Last updated:** [June 28, 2019, 5:25am UTC](https://discourse.processing.org/t/string-not-converted-properly-from-int/12295 "2019-06-28T05:25:54Z")

</div>

post is deleted…

---

## [Code for artDCGAN?](https://discourse.processing.org/t/code-for-artdcgan/287)

<div class="topic-metadata">

**Author:** [@ezyryder](https://discourse.processing.org/u/ezyryder)\
**Replies:** 6\
**Last updated:** [June 28, 2019, 1:01am UTC](https://discourse.processing.org/t/code-for-artdcgan/287 "2019-06-28T01:01:19Z")

</div>

Hello! I am a complete newbie to coding and Processing and I need some help with my art project. So I was wondering if I can make one generative digital painting based on few of my paintings (something like this, nude…

---

## [Are slide pages possible with p5js?](https://discourse.processing.org/t/are-slide-pages-possible-with-p5js/12341)

<div class="topic-metadata">

**Author:** [@umt](https://discourse.processing.org/u/umt)\
**Replies:** 0\
**Last updated:** [June 27, 2019, 2:05pm UTC](https://discourse.processing.org/t/are-slide-pages-possible-with-p5js/12341 "2019-06-27T14:05:28Z")

</div>

Hi guys, I want to make like slide with p5js canvas arrays. If previous and next buttons clicks change the canvas on screen. Finally ı want to export all pages( all canvas) to pdf . Is it possible?

---

## [3D Snake & 3D Tetris](https://discourse.processing.org/t/3d-snake-3d-tetris/11951)

<div class="topic-metadata">

**Author:** [@Skys](https://discourse.processing.org/u/Skys)\
**Replies:** 9\
**Last updated:** [June 27, 2019, 11:48am UTC](https://discourse.processing.org/t/3d-snake-3d-tetris/11951 "2019-06-27T11:48:53Z")

</div>

To improve my skills with Arrays and Translate i start coding 3D Snake & 3D Tetris. Because the 3D Snake like game 3DNatter ist better than i aspected, I will rewrite QubeBuiler. In the beginnig i thought Translate i…

---

## [G4P: GTextField text modification](https://discourse.processing.org/t/g4p-gtextfield-text-modification/12292)

<div class="topic-metadata">

**Author:** [@graysonh](https://discourse.processing.org/u/graysonh)\
**Replies:** 8\
**Last updated:** [June 27, 2019, 11:42am UTC](https://discourse.processing.org/t/g4p-gtextfield-text-modification/12292 "2019-06-27T11:42:40Z")

</div>

Hi all, I am using a GTextField to allow the user to specify values being used in other processes. In the event handler for the GTextField I want to check what’s being typed and make sure that it is a valid value for my…

---

## [Copying a color](https://discourse.processing.org/t/copying-a-color/12312)

<div class="topic-metadata">

**Author:** [@marcusround](https://discourse.processing.org/u/marcusround)\
**Replies:** 4\
**Last updated:** [June 27, 2019, 9:08am UTC](https://discourse.processing.org/t/copying-a-color/12312 "2019-06-27T09:08:52Z")

</div>

Is this the best/most succinct way of copying a color? c2 = color( red(c1), green(c1), blue(c1), alpha(c1) ) I wish I could just do c2 = c1.copy() or something like that, which you can do with vectors.

---

## [If else statement not working](https://discourse.processing.org/t/if-else-statement-not-working/12325)

<div class="topic-metadata">

**Author:** [@julan](https://discourse.processing.org/u/julan)\
**Replies:** 2\
**Last updated:** [June 27, 2019, 6:04am UTC](https://discourse.processing.org/t/if-else-statement-not-working/12325 "2019-06-27T06:04:20Z")

</div>

hey, I am a beginner and wanted to made this sketch of a ball that squishes before it bounces back, hover it doesn’t squisches at al and I don’t get the squishing part of the sketch to work without removing all of the m…

---

## [HiScapes roast my game!](https://discourse.processing.org/t/hiscapes-roast-my-game/12082)

<div class="topic-metadata">

**Author:** [@InferNova](https://discourse.processing.org/u/InferNova)\
**Replies:** 7\
**Last updated:** [June 26, 2019, 10:44pm UTC](https://discourse.processing.org/t/hiscapes-roast-my-game/12082 "2019-06-26T22:44:41Z")

</div>

Hey guys ! I am working on a game, and I am looking for constructive criticism on how can efficiency can be increased / minimize unecessary use of resources. Things to note: This is a version that I am happy to share wi…

---

## [Issue when using loadShape()](https://discourse.processing.org/t/issue-when-using-loadshape/12216)

<div class="topic-metadata">

**Author:** [@macbrayne](https://discourse.processing.org/u/macbrayne)\
**Replies:** 4\
**Last updated:** [June 26, 2019, 9:49pm UTC](https://discourse.processing.org/t/issue-when-using-loadshape/12216 "2019-06-26T21:49:05Z")

</div>

Hello there! I’m currently migrating a game I’m currently writing from .png to .svg for better scaling however I’m having issues with using a certain icon from material.io (Settings icon).Processing throws an error when…

---

## [Help: what am I missing?](https://discourse.processing.org/t/help-what-am-i-missing/12241)

<div class="topic-metadata">

**Author:** [@PixelMx](https://discourse.processing.org/u/PixelMx)\
**Replies:** 3\
**Last updated:** [June 26, 2019, 9:29pm UTC](https://discourse.processing.org/t/help-what-am-i-missing/12241 "2019-06-26T21:29:03Z")

</div>

hello everyone. I’ve been asking a lot of questions lately, I’m learning to code by copying. Last night I found a sketch in openprocessing that I liked that it was created with P5, I thought translating was a good exerc…

---

## [Downloading CSV from web server](https://discourse.processing.org/t/downloading-csv-from-web-server/12286)

<div class="topic-metadata">

**Author:** [@pablogott](https://discourse.processing.org/u/pablogott)\
**Replies:** 5\
**Last updated:** [June 26, 2019, 8:20pm UTC](https://discourse.processing.org/t/downloading-csv-from-web-server/12286 "2019-06-26T20:20:38Z")

</div>

I have a CSV that constantly gets updated on a web server. How can I download the data? I already have code for processing if the data exists locally, but I’d rather not have to store it locally and just read it from the…

---

## [Problem with displaying a PShape](https://discourse.processing.org/t/problem-with-displaying-a-pshape/12267)

<div class="topic-metadata">

**Author:** [@elijb](https://discourse.processing.org/u/elijb)\
**Replies:** 2\
**Last updated:** [June 26, 2019, 6:56pm UTC](https://discourse.processing.org/t/problem-with-displaying-a-pshape/12267 "2019-06-26T18:56:12Z")

</div>

ShapeMaker sm; void setup() { size(600, 600, P3D); sm = new ShapeMaker(); sm.makeCylinder(100, 100, 200, 40); //sm.makeEllipse(200); } void draw() { background(0); translate(width/2, height/2); sm.displayS…

---

## [Sharing objects between multiple PApplets - Processing in Eclipse - runSketch()](https://discourse.processing.org/t/sharing-objects-between-multiple-papplets-processing-in-eclipse-runsketch/9427)

<div class="topic-metadata">

**Author:** [@rgthings](https://discourse.processing.org/u/rgthings)\
**Replies:** 7\
**Last updated:** [June 26, 2019, 6:11pm UTC](https://discourse.processing.org/t/sharing-objects-between-multiple-papplets-processing-in-eclipse-runsketch/9427 "2019-06-26T18:11:40Z")

</div>

hello, I am using Processing (3.2.3) in Eclipse and I have managed to produce a second PApplet window using using runSketch(). I would like to use the second window to control what goes on in the first (and vice versa a…

---

## [Error: cannot convert from float to int,, when I use map()](https://discourse.processing.org/t/error-cannot-convert-from-float-to-int-when-i-use-map/12315)

<div class="topic-metadata">

**Author:** [@bu.aus](https://discourse.processing.org/u/bu.aus)\
**Replies:** 2\
**Last updated:** [June 26, 2019, 6:09pm UTC](https://discourse.processing.org/t/error-cannot-convert-from-float-to-int-when-i-use-map/12315 "2019-06-26T18:09:42Z")

</div>

Hello, I am a beginner and finding a problem. I wrote the following code and had error message “cannot convert from float to int”. void serialEvent (Serial Port) { brightness = float(port.readStringUntil('\\n')); n=i…

---

## [Shader code for show selected part of image - OpenTk](https://discourse.processing.org/t/shader-code-for-show-selected-part-of-image-opentk/12316)

<div class="topic-metadata">

**Author:** [@NSDS](https://discourse.processing.org/u/NSDS)\
**Replies:** 0\
**Last updated:** [June 26, 2019, 6:09pm UTC](https://discourse.processing.org/t/shader-code-for-show-selected-part-of-image-opentk/12316 "2019-06-26T18:09:22Z")

</div>

I want to show second half portion of an image in my glcontrol, in a condition that only 0.7 to 0. 9 of second half is want to see in glControl. For that I have done like below. But it shows portion of first half of imag…

[Previous page](https://discourse.processing.org/latest.md?page=469)

[Next page](https://discourse.processing.org/latest.md?page=471)
