# Latest

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

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

**Page:** 513

---

## [Web Editor : not defined width](https://discourse.processing.org/t/web-editor-not-defined-width/8240)

<div class="topic-metadata">

**Author:** [@Pilou](https://discourse.processing.org/u/Pilou)\
**Replies:** 12\
**Last updated:** [March 16, 2019, 2:15am UTC](https://discourse.processing.org/t/web-editor-not-defined-width/8240 "2019-03-16T02:15:56Z")

</div>

When I drop an image to the screen the width is not defined…in the function “draw” part ! https://editor.p5js.org/Pilou/sketches/qEPc9d1YD I have not this problem when an image is preloaded! https://editor.p5js.org/Pi…

---

## [Trigonometry help--find third point of the triangle](https://discourse.processing.org/t/trigonometry-help-find-third-point-of-the-triangle/9127)

<div class="topic-metadata">

**Author:** [@cras](https://discourse.processing.org/u/cras)\
**Replies:** 16\
**Last updated:** [March 15, 2019, 10:35pm UTC](https://discourse.processing.org/t/trigonometry-help-find-third-point-of-the-triangle/9127 "2019-03-15T22:35:28Z")

</div>

It’s been a few too many years since I took geometry, so I’ve been beating my head against what should be a simple problem :grimacing:. The goal, illustrated by the test sketch, is to calculate the 3rd point of a triang…

---

## [Problem with running sketch on Processing for Android](https://discourse.processing.org/t/problem-with-running-sketch-on-processing-for-android/9328)

<div class="topic-metadata">

**Author:** [@alexanecula](https://discourse.processing.org/u/alexanecula)\
**Replies:** 12\
**Last updated:** [March 15, 2019, 8:58pm UTC](https://discourse.processing.org/t/problem-with-running-sketch-on-processing-for-android/9328 "2019-03-15T20:58:27Z")

</div>

Hi! I’m new in this whole programming thing and I’ve started working on Processing(Java and Android) a few weeks ago. I’ve followed a tutorial from YouTube and wanted to try it, too. The thing is when I tried to run th…

---

## [Mapping an image onto a torus](https://discourse.processing.org/t/mapping-an-image-onto-a-torus/9289)

<div class="topic-metadata">

**Author:** [@pblancos](https://discourse.processing.org/u/pblancos)\
**Replies:** 2\
**Last updated:** [March 15, 2019, 8:03pm UTC](https://discourse.processing.org/t/mapping-an-image-onto-a-torus/9289 "2019-03-15T20:03:41Z")

</div>

I would like to create same as image in this article. Map the world onto a torus by using GLSL shader. I tried, but my sketch empty. How to do?

---

## [Problem making dissapair the Space Invaders enemys](https://discourse.processing.org/t/problem-making-dissapair-the-space-invaders-enemys/9332)

<div class="topic-metadata">

**Author:** [@wakonero](https://discourse.processing.org/u/wakonero)\
**Replies:** 1\
**Last updated:** [March 15, 2019, 7:46pm UTC](https://discourse.processing.org/t/problem-making-dissapair-the-space-invaders-enemys/9332 "2019-03-15T19:46:36Z")

</div>

Hello there! Im making a space invaders games, but im stuck trying to make dissapear the enemys of an a Array when they collision with the bullet, because i dont know how to number every enemy in the array to disapear.…

---

## [Performance probelms - drawing to much stuff?](https://discourse.processing.org/t/performance-probelms-drawing-to-much-stuff/9301)

<div class="topic-metadata">

**Author:** [@Schred](https://discourse.processing.org/u/Schred)\
**Replies:** 2\
**Last updated:** [March 15, 2019, 3:45pm UTC](https://discourse.processing.org/t/performance-probelms-drawing-to-much-stuff/9301 "2019-03-15T15:45:33Z")

</div>

Hi! I have some bad fps problems with my current project. It is supposed to run on mobile devices, but only has about 5 fps when ran. I draw a lot of stuff on the screen, but there’s no way around that as it consists of…

---

## [Where to place certain values in a chart code](https://discourse.processing.org/t/where-to-place-certain-values-in-a-chart-code/8749)

<div class="topic-metadata">

**Author:** [@Floralvxins](https://discourse.processing.org/u/Floralvxins)\
**Replies:** 5\
**Last updated:** [February 27, 2019, 8:38am UTC](https://discourse.processing.org/t/where-to-place-certain-values-in-a-chart-code/8749 "2019-02-27T08:38:53Z")

</div>

I’m having a bit of confusion on understanding just simple placement of my data. I’m making a pie chart based off of a data set so I know I have to plug them into where it says diameter and such but can someone help clar…

---

## [Sublime package for Processing.py / PYDE](https://discourse.processing.org/t/sublime-package-for-processing-py-pyde/9320)

<div class="topic-metadata">

**Author:** [@lnp](https://discourse.processing.org/u/lnp)\
**Replies:** 2\
**Last updated:** [March 15, 2019, 8:06am UTC](https://discourse.processing.org/t/sublime-package-for-processing-py-pyde/9320 "2019-03-15T08:06:53Z")

</div>

First time poster here! Did a little processing way back when and recently discovered it has a Python mode. Hoohaa! So my question is the above. Is there a sublime package for working with PYDE files? Or does anyone kno…

---

## [Convert Processing to p5.js](https://discourse.processing.org/t/convert-processing-to-p5-js/9291)

<div class="topic-metadata">

**Author:** [@julia\_v](https://discourse.processing.org/u/julia_v)\
**Replies:** 5\
**Last updated:** [March 15, 2019, 6:02am UTC](https://discourse.processing.org/t/convert-processing-to-p5-js/9291 "2019-03-15T06:02:17Z")

</div>

Can’t figure out why some code doesn’t work… I highlighted what exactly doesn’t work in the code below… Please please help me to make the code working\* /\* @pjs preload="emma.jpg", "obama.jpg", "clint.jpg"; \*/ var maxT…

---

## [Introduce myself](https://discourse.processing.org/t/introduce-myself/9311)

<div class="topic-metadata">

**Author:** [@Gamal](https://discourse.processing.org/u/Gamal)\
**Replies:** 0\
**Last updated:** [March 14, 2019, 9:15pm UTC](https://discourse.processing.org/t/introduce-myself/9311 "2019-03-14T21:15:41Z")

</div>

Hello my name is Jamal Salama from Egypt. I know the Java language well and I know its basics very well, and at the moment I am studying the development and construction of Android, I will finish it soon. I want to know …

---

## [Wrapping a sentence, around a circle, letter by letter](https://discourse.processing.org/t/wrapping-a-sentence-around-a-circle-letter-by-letter/9056)

<div class="topic-metadata">

**Author:** [@DM\_Slippin](https://discourse.processing.org/u/DM_Slippin)\
**Replies:** 20\
**Last updated:** [March 15, 2019, 12:45am UTC](https://discourse.processing.org/t/wrapping-a-sentence-around-a-circle-letter-by-letter/9056 "2019-03-15T00:45:56Z")

</div>

Hi there! To cut to the chase, today I’ve signed up and submitted my code to hopefully have some answers pertaining to a project I’ve been working on. For a rundown of what I was trying for, I wanted to take a quote an…

---

## [Interesting(?) type coercion](https://discourse.processing.org/t/interesting-type-coercion/9248)

<div class="topic-metadata">

**Author:** [@saintrain](https://discourse.processing.org/u/saintrain)\
**Replies:** 4\
**Last updated:** [March 14, 2019, 11:58pm UTC](https://discourse.processing.org/t/interesting-type-coercion/9248 "2019-03-14T23:58:53Z")

</div>

Hi! Starting with int framePer = floor(1000./frameRate), bgTO = 1000; // \<- this is not interesting This is ok: int dClr = floor(255\*framePer/bgTO); // \<- expected This fails with a ‘can’t f…

---

## [Information about the project](https://discourse.processing.org/t/information-about-the-project/9312)

<div class="topic-metadata">

**Author:** [@Gamal](https://discourse.processing.org/u/Gamal)\
**Replies:** 0\
**Last updated:** [March 14, 2019, 10:00pm UTC](https://discourse.processing.org/t/information-about-the-project/9312 "2019-03-14T22:00:30Z")

</div>

Hello My name is Jamal Salama from Egypt. I know the Java language well and I know its basics very well, and at the moment I’m studying the development and construction of Android, and I will finish it soon.I want to kn…

---

## [Example 5-7 ~ BOUNCING COLOR ~ in Dan Shiffman book](https://discourse.processing.org/t/example-5-7-bouncing-color-in-dan-shiffman-book/9309)

<div class="topic-metadata">

**Author:** [@debxyz](https://discourse.processing.org/u/debxyz)\
**Replies:** 2\
**Last updated:** [March 14, 2019, 9:43pm UTC](https://discourse.processing.org/t/example-5-7-bouncing-color-in-dan-shiffman-book/9309 "2019-03-14T21:43:54Z")

</div>

When I run the code below (from Shiffman, p87, example 5-7, the color gradates back and forth only once. Why doesn’t it endlessly bounce back and forth? I thought if the “if” statement included an " = \* -1" this would …

---

## [Expanding circles, how do I do it?](https://discourse.processing.org/t/expanding-circles-how-do-i-do-it/9305)

<div class="topic-metadata">

**Author:** [@fraxinus](https://discourse.processing.org/u/fraxinus)\
**Replies:** 8\
**Last updated:** [March 14, 2019, 8:05pm UTC](https://discourse.processing.org/t/expanding-circles-how-do-i-do-it/9305 "2019-03-14T20:05:26Z")

</div>

How do I make a circle that starts as a dot and then keeps getting bigger until it disappears? Also then, how would I have more circles continuously appearing from that same point one after the other so I get what looks…

---

## [How to check if an Array was defined?](https://discourse.processing.org/t/how-to-check-if-an-array-was-defined/9297)

<div class="topic-metadata">

**Author:** [@Schred](https://discourse.processing.org/u/Schred)\
**Replies:** 2\
**Last updated:** [March 14, 2019, 4:48pm UTC](https://discourse.processing.org/t/how-to-check-if-an-array-was-defined/9297 "2019-03-14T16:48:24Z")

</div>

Hi! So I have this String Array in my little programm called allData and it is defined by allData = saveStrings(URL);. But what if there’s no wifi connection on the device? The programm will crash instantly, because I u…

---

## [Processing to Socket.Io on Unubo](https://discourse.processing.org/t/processing-to-socket-io-on-unubo/9182)

<div class="topic-metadata">

**Author:** [@Quillbert1](https://discourse.processing.org/u/Quillbert1)\
**Replies:** 4\
**Last updated:** [March 14, 2019, 4:35pm UTC](https://discourse.processing.org/t/processing-to-socket-io-on-unubo/9182 "2019-03-14T16:35:13Z")

</div>

Hi, I have a socket.io app hosted on a website called Unubo (paint.unubo.cloud), and when I try to connect to it using the Websockets library for processing, I get this error: onError(UpgradeException: Didn't switch pro…

---

## [Threading on image processing](https://discourse.processing.org/t/threading-on-image-processing/8439)

<div class="topic-metadata">

**Author:** [@doni](https://discourse.processing.org/u/doni)\
**Replies:** 3\
**Last updated:** [March 14, 2019, 12:45pm UTC](https://discourse.processing.org/t/threading-on-image-processing/8439 "2019-03-14T12:45:20Z")

</div>

hi i try to add another thread to improve fps or might be rendering process but my code do not succed import processing.video.\*; Capture video; void setup() { size(640, 480); // Uses the default video input, see t…

---

## [A Circle tile instead of square one](https://discourse.processing.org/t/a-circle-tile-instead-of-square-one/9140)

<div class="topic-metadata">

**Author:** [@l3ehfar](https://discourse.processing.org/u/l3ehfar)\
**Replies:** 4\
**Last updated:** [March 14, 2019, 7:36am UTC](https://discourse.processing.org/t/a-circle-tile-instead-of-square-one/9140 "2019-03-14T07:36:30Z")

</div>

here’s my hexagonal tiling in a square shape, I would like to convert the square shape into a circle one, can anyone help me? float unitSize = 15; float eqTriH = 0.8660254; int w = 600; int h = 600; int cellsX = int(w/(…

---

## [AES - Login algorithm](https://discourse.processing.org/t/aes-login-algorithm/8951)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 5\
**Last updated:** [March 14, 2019, 2:35am UTC](https://discourse.processing.org/t/aes-login-algorithm/8951 "2019-03-14T02:35:12Z")

</div>

Hi. I want to create a login system, not a different one. How would you not have a sample code created through a security algorithm? Please help me.

---

## [What means x\[\] = \[\] in p5.js](https://discourse.processing.org/t/what-means-x-in-p5-js/9287)

<div class="topic-metadata">

**Author:** [@vjjv](https://discourse.processing.org/u/vjjv)\
**Replies:** 1\
**Last updated:** [March 14, 2019, 1:54am UTC](https://discourse.processing.org/t/what-means-x-in-p5-js/9287 "2019-03-14T01:54:34Z")

</div>

hi! im trying to translate some code from p5.js var st = \[\]; function setup(){ for (var i=0; i\<maxW; i++) { st\[i\]=\[\]; // what means this? bright\[i\]=\[\]; } } what means ? st is a two dimensional array!

---

## [Need Help Understanding Code (Gravity)](https://discourse.processing.org/t/need-help-understanding-code-gravity/9217)

<div class="topic-metadata">

**Author:** [@gaggiatoraya](https://discourse.processing.org/u/gaggiatoraya)\
**Replies:** 3\
**Last updated:** [March 13, 2019, 9:00pm UTC](https://discourse.processing.org/t/need-help-understanding-code-gravity/9217 "2019-03-13T21:00:09Z")

</div>

I’m fairly new to processing and while attempting to code Gravity into my assignment I came across a template for coding gravity and acceleration. The problem is im not sure what the point of the last line y=height is. f…

---

## [Unable to get matter.js working again](https://discourse.processing.org/t/unable-to-get-matter-js-working-again/9275)

<div class="topic-metadata">

**Author:** [@Code\_Caffeine](https://discourse.processing.org/u/Code_Caffeine)\
**Replies:** 2\
**Last updated:** [March 13, 2019, 8:53pm UTC](https://discourse.processing.org/t/unable-to-get-matter-js-working-again/9275 "2019-03-13T20:53:42Z")

</div>

I am very new to the matter.js library, and I have already made a project using it, which works fine. However, I am now attempting to create another project but cannot get the same results. It seems like I have tried eve…

---

## [How to circle pack ellipses of pre-defined sizes in p5.js](https://discourse.processing.org/t/how-to-circle-pack-ellipses-of-pre-defined-sizes-in-p5-js/8891)

<div class="topic-metadata">

**Author:** [@blkpanther](https://discourse.processing.org/u/blkpanther)\
**Replies:** 5\
**Last updated:** [March 13, 2019, 8:39pm UTC](https://discourse.processing.org/t/how-to-circle-pack-ellipses-of-pre-defined-sizes-in-p5-js/8891 "2019-03-13T20:39:05Z")

</div>

I saw the coding train tutorials on how to grow circles until they touch each other in circle packing, but if I already have some circles of specific sizes, say 10 circles of the sizes in the range of random(5,10), how c…

---

## [Image processing, find coordinates in an image](https://discourse.processing.org/t/image-processing-find-coordinates-in-an-image/9235)

<div class="topic-metadata">

**Author:** [@Daniel\_Kamel](https://discourse.processing.org/u/Daniel_Kamel)\
**Replies:** 4\
**Last updated:** [March 13, 2019, 7:11pm UTC](https://discourse.processing.org/t/image-processing-find-coordinates-in-an-image/9235 "2019-03-13T19:11:22Z")

</div>

Hello everyone, I’m new to image processing so any help would be appreciated, I have an image with 2 red lines in it(the image only contains those 2 lines with a black or white background), what method or algorithm would…

---

## [Bouncing ball hang up (The Nature of Code)](https://discourse.processing.org/t/bouncing-ball-hang-up-the-nature-of-code/8733)

<div class="topic-metadata">

**Author:** [@steinlav](https://discourse.processing.org/u/steinlav)\
**Replies:** 9\
**Last updated:** [March 13, 2019, 5:35pm UTC](https://discourse.processing.org/t/bouncing-ball-hang-up-the-nature-of-code/8733 "2019-03-13T17:35:53Z")

</div>

Example 2.3 The Nature of Code The code: \[https://editor.p5js.org/steinlav/sketches/Y8qlyS9I6\] In the method checkEdges(), line 84 this.pos.y = height; () Problem: Why do the ball not loose bouncer over time when li…

---

## [How to detect simultaneous keypress in p5.js](https://discourse.processing.org/t/how-to-detect-simultaneous-keypress-in-p5-js/9264)

<div class="topic-metadata">

**Author:** [@Jithin](https://discourse.processing.org/u/Jithin)\
**Replies:** 2\
**Last updated:** [March 13, 2019, 1:34pm UTC](https://discourse.processing.org/t/how-to-detect-simultaneous-keypress-in-p5-js/9264 "2019-03-13T13:34:54Z")

</div>

I’m trying to implement an undo functionality in a sketch. I need to detect simultaneous key press in p5. i.e ‘Ctrl’ and ‘z’ together? Is it possible?

---

## [Rotating an object based upon mouse position](https://discourse.processing.org/t/rotating-an-object-based-upon-mouse-position/9236)

<div class="topic-metadata">

**Author:** [@P1505](https://discourse.processing.org/u/P1505)\
**Replies:** 3\
**Last updated:** [March 13, 2019, 9:12am UTC](https://discourse.processing.org/t/rotating-an-object-based-upon-mouse-position/9236 "2019-03-13T09:12:33Z")

</div>

Hi all. I have a couple of questions I’m stumped on. I’m trying to make a basic dial control, where rotation outputs a +1 or -1 so I can update a number on the screen. Before I get to that though I’m struggling with the…

---

## [Dynamic image masking, I made it! But how can I improve it?](https://discourse.processing.org/t/dynamic-image-masking-i-made-it-but-how-can-i-improve-it/9040)

<div class="topic-metadata">

**Author:** [@sundftig](https://discourse.processing.org/u/sundftig)\
**Replies:** 11\
**Last updated:** [March 13, 2019, 6:17am UTC](https://discourse.processing.org/t/dynamic-image-masking-i-made-it-but-how-can-i-improve-it/9040 "2019-03-13T06:17:18Z")

</div>

Hi everyone, this is my first post in this forum and I hope I will get some good help from you here! I´ve been looking for a way to mask images with a custom made shape in both Processing and p5.js but I couldn’t find a…

---

## [How does p5, or JS handle decimal drawing on canvas?](https://discourse.processing.org/t/how-does-p5-or-js-handle-decimal-drawing-on-canvas/9196)

<div class="topic-metadata">

**Author:** [@Milky](https://discourse.processing.org/u/Milky)\
**Replies:** 9\
**Last updated:** [March 12, 2019, 11:55pm UTC](https://discourse.processing.org/t/how-does-p5-or-js-handle-decimal-drawing-on-canvas/9196 "2019-03-12T23:55:51Z")

</div>

I am very confused about how this works. I always thought about pixels as whole numbers, and I was writing my game having this constantly in mind. I thought, okay this has to work with whole numbers, I can’t have decimal…

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

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