# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?page=273

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

**Page:** 274

---

## [How to print with 2 decimals?](https://discourse.processing.org/t/how-to-print-with-2-decimals/13929)

<div class="topic-metadata">

**Author:** [@GuilhermeVolker](https://discourse.processing.org/u/GuilhermeVolker)\
**Replies:** 4\
**Last updated:** [September 12, 2019, 2:04am UTC](https://discourse.processing.org/t/how-to-print-with-2-decimals/13929 "2019-09-12T02:04:13Z")

</div>

Hello. I need to print a float variable with 2 decimals. I couldn’t find on processing reference :expressionless:

---

## [Use the Arduino Processing Interface](https://discourse.processing.org/t/use-the-arduino-processing-interface/9409)

<div class="topic-metadata">

**Author:** [@bking](https://discourse.processing.org/u/bking)\
**Replies:** 10\
**Last updated:** [September 10, 2019, 10:42pm UTC](https://discourse.processing.org/t/use-the-arduino-processing-interface/9409 "2019-09-10T22:42:17Z")

</div>

Hello everyone, I can not transmit or receive PWM information, sent with analogWrite from Arduino and find it in Processing. I used the Arduino Input example in Processing and I can get the information from the Arduino…

---

## [Which commands are implemented in the SFTP library](https://discourse.processing.org/t/which-commands-are-implemented-in-the-sftp-library/13914)

<div class="topic-metadata">

**Author:** [@michaelkpierce](https://discourse.processing.org/u/michaelkpierce)\
**Replies:** 1\
**Last updated:** [September 10, 2019, 6:46pm UTC](https://discourse.processing.org/t/which-commands-are-implemented-in-the-sftp-library/13914 "2019-09-10T18:46:13Z")

</div>

Hi, I want to use this library to update a library of images in multiple remote raspberry pis. Can you tell which commands are implemented? In particular, can I write files from the local machine to a remote machines. T…

---

## [Change or fix text Background in P3D](https://discourse.processing.org/t/change-or-fix-text-background-in-p3d/13903)

<div class="topic-metadata">

**Author:** [@Waboqueox](https://discourse.processing.org/u/Waboqueox)\
**Replies:** 3\
**Last updated:** [September 10, 2019, 4:22pm UTC](https://discourse.processing.org/t/change-or-fix-text-background-in-p3d/13903 "2019-09-10T16:22:48Z")

</div>

Hi people, have a new question: When using P3D the text is written with the original background of your sketch (or any color, don’t know from where it takes the color). I was trying to put a text but there appear a tex…

---

## [How to make a bezier curver not start at top left corner when using mouseX, mouseY as the initial anchor point?](https://discourse.processing.org/t/how-to-make-a-bezier-curver-not-start-at-top-left-corner-when-using-mousex-mousey-as-the-initial-anchor-point/13912)

<div class="topic-metadata">

**Author:** [@nathanchun](https://discourse.processing.org/u/nathanchun)\
**Replies:** 4\
**Last updated:** [September 10, 2019, 2:04pm UTC](https://discourse.processing.org/t/how-to-make-a-bezier-curver-not-start-at-top-left-corner-when-using-mousex-mousey-as-the-initial-anchor-point/13912 "2019-09-10T14:04:42Z")

</div>

I am new to processing and was assigned in class to create a bezier curve that makes one of the control points mouseX and mouseY along with some other necessary shapes needed for the assignment. Whenever I hit run, howev…

---

## [Clock, reset hour and new day statement](https://discourse.processing.org/t/clock-reset-hour-and-new-day-statement/13837)

<div class="topic-metadata">

**Author:** [@vincentstrebelle](https://discourse.processing.org/u/vincentstrebelle)\
**Replies:** 6\
**Last updated:** [September 6, 2019, 7:27pm UTC](https://discourse.processing.org/t/clock-reset-hour-and-new-day-statement/13837 "2019-09-06T19:27:37Z")

</div>

Hi, i made a very basic clock and i have two questions. 1: I wonder how can i reset the hours. Like when it past 24 it restart to 0. 2: How can i make a statement when a new day start. Can i use a boolean ? void setup…

---

## [Quadtree vs grid](https://discourse.processing.org/t/quadtree-vs-grid/13844)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 4\
**Last updated:** [September 10, 2019, 11:35am UTC](https://discourse.processing.org/t/quadtree-vs-grid/13844 "2019-09-10T11:35:45Z")

</div>

Hi, after experimenting with processing it becomes increasingly clear that there is a need for some kind of space management when dealing with particles and their collisions. I’m currently partitioning the canvas using a…

---

## [Display images alternately](https://discourse.processing.org/t/display-images-alternately/13567)

<div class="topic-metadata">

**Author:** [@Moene](https://discourse.processing.org/u/Moene)\
**Replies:** 3\
**Last updated:** [August 24, 2019, 11:11am UTC](https://discourse.processing.org/t/display-images-alternately/13567 "2019-08-24T11:11:16Z")

</div>

How can I display an image in draw() successively with a delay between them? PImage img1; PImage img2; void setup () { img1 = loadImage("step5.png"); img2 = loadImage("fail2.png"); size(801,583); background(…

---

## [Shapes3D.pickShape and G4P P3D view combine?](https://discourse.processing.org/t/shapes3d-pickshape-and-g4p-p3d-view-combine/13849)

<div class="topic-metadata">

**Author:** [@mala](https://discourse.processing.org/u/mala)\
**Replies:** 9\
**Last updated:** [September 10, 2019, 8:04am UTC](https://discourse.processing.org/t/shapes3d-pickshape-and-g4p-p3d-view-combine/13849 "2019-09-10T08:04:06Z")

</div>

Can the pickshape function of Shapes3D be used with a 3D gview in G4P ? I can’t seem to make it work, I think possibly something is going wrong with a matrix transform somewhere between the gview and the pickbuffer … or…

---

## [Vectors not adding?](https://discourse.processing.org/t/vectors-not-adding/13900)

<div class="topic-metadata">

**Author:** [@blue1](https://discourse.processing.org/u/blue1)\
**Replies:** 2\
**Last updated:** [September 10, 2019, 7:21am UTC](https://discourse.processing.org/t/vectors-not-adding/13900 "2019-09-10T07:21:54Z")

</div>

//I cant figure out how to get the isMoving function to work, im kind of comfortable with p5js and trying to learn processing but it seems there are always small bugs i cant find. Ground ground; Character character; PVe…

---

## [Chain hierarchy](https://discourse.processing.org/t/chain-hierarchy/13845)

<div class="topic-metadata">

**Author:** [@TimoL](https://discourse.processing.org/u/TimoL)\
**Replies:** 6\
**Last updated:** [September 9, 2019, 9:20pm UTC](https://discourse.processing.org/t/chain-hierarchy/13845 "2019-09-09T21:20:20Z")

</div>

Here’s something I’ve been trying to figure out. Im trying to build a hierarchy of ellipses such that each child ellipse has to stay within a certain range of its parent. I understand how it needs to work, Im just not…

---

## [Float Precision](https://discourse.processing.org/t/float-precision/13836)

<div class="topic-metadata">

**Author:** [@grumo](https://discourse.processing.org/u/grumo)\
**Replies:** 15\
**Last updated:** [September 7, 2019, 4:10am UTC](https://discourse.processing.org/t/float-precision/13836 "2019-09-07T04:10:43Z")

</div>

I’m using doubles for some mathematical calculations and I’m getting these two values: a = -69.49068165087722 n = 304.2372372266157 The problem is when I do this: float fa = (float) a; float fb = (float) b; I get: …

---

## [Can't draw on main window, calling methods from a secondary window (PApplet, image())](https://discourse.processing.org/t/cant-draw-on-main-window-calling-methods-from-a-secondary-window-papplet-image/13889)

<div class="topic-metadata">

**Author:** [@Pvag](https://discourse.processing.org/u/Pvag)\
**Replies:** 1\
**Last updated:** [September 9, 2019, 7:32am UTC](https://discourse.processing.org/t/cant-draw-on-main-window-calling-methods-from-a-secondary-window-papplet-image/13889 "2019-09-09T07:32:14Z")

</div>

Hello ! From the main processing sketch file, I am instantiating objectA that defines methodA, which draws stuff on a PImage, that it then draws on the main window, using the image() function. This works as expected, wh…

---

## [Issue With Making a House](https://discourse.processing.org/t/issue-with-making-a-house/13875)

<div class="topic-metadata">

**Author:** [@Katerina\_P](https://discourse.processing.org/u/Katerina_P)\
**Replies:** 13\
**Last updated:** [September 9, 2019, 12:37am UTC](https://discourse.processing.org/t/issue-with-making-a-house/13875 "2019-09-09T00:37:01Z")

</div>

Hi Guys, Im trying to make a house and my code isn’t running. Can someone please tell me why? This is the code: void setup() { size(200, 200); background(255); smooth(); } void draw () { fill(#1E4609); rect (0…

---

## [Getting amplitude values from a SoundFile (processing.sound)](https://discourse.processing.org/t/getting-amplitude-values-from-a-soundfile-processing-sound/13877)

<div class="topic-metadata">

**Author:** [@Brunehilde](https://discourse.processing.org/u/Brunehilde)\
**Replies:** 1\
**Last updated:** [September 8, 2019, 9:54pm UTC](https://discourse.processing.org/t/getting-amplitude-values-from-a-soundfile-processing-sound/13877 "2019-09-08T21:54:42Z")

</div>

Hi ! I’ve been playing around with the Sound library for a bit to make a simple music visualizer, but I can’t seem to get the amp values for specific points in the music to make a nice timeline. Here’s how I defined al…

---

## [Applying Class to each character in a string](https://discourse.processing.org/t/applying-class-to-each-character-in-a-string/13870)

<div class="topic-metadata">

**Author:** [@tylerowens](https://discourse.processing.org/u/tylerowens)\
**Replies:** 7\
**Last updated:** [September 8, 2019, 10:13am UTC](https://discourse.processing.org/t/applying-class-to-each-character-in-a-string/13870 "2019-09-08T10:13:32Z")

</div>

Hello all, I am going to try my best to describe what I am trying to make so I can hopefully receive some help. I am trying to make each character in a string accelerate towards the mouse. With the code I have currently…

---

## [This code works in my friend's pc but I get error](https://discourse.processing.org/t/this-code-works-in-my-friends-pc-but-i-get-error/13859)

<div class="topic-metadata">

**Author:** [@sp\_sarvesh](https://discourse.processing.org/u/sp_sarvesh)\
**Replies:** 7\
**Last updated:** [September 8, 2019, 12:34am UTC](https://discourse.processing.org/t/this-code-works-in-my-friends-pc-but-i-get-error/13859 "2019-09-08T00:34:00Z")

</div>

I get ArrayOutOf BoundsException: 0 on line 12 when I run this code, and then java sm has stopped responding when I try to close the small window. Can anyone please help me with this? This same code works for my friend. …

---

## [Dividing a round number doesn't work. Dividing as a variable does?](https://discourse.processing.org/t/dividing-a-round-number-doesnt-work-dividing-as-a-variable-does/13862)

<div class="topic-metadata">

**Author:** [@Marinus](https://discourse.processing.org/u/Marinus)\
**Replies:** 6\
**Last updated:** [September 7, 2019, 7:06pm UTC](https://discourse.processing.org/t/dividing-a-round-number-doesnt-work-dividing-as-a-variable-does/13862 "2019-09-07T19:06:15Z")

</div>

Hi, I am having a question why something doesn’t work one way, but it does the other way. I was sketching something out in processing with this variable: float k = 5 / 8; It didn’t want to work. But when I did it like…

---

## [Piston effect in Processing simulation](https://discourse.processing.org/t/piston-effect-in-processing-simulation/13867)

<div class="topic-metadata">

**Author:** [@harvious](https://discourse.processing.org/u/harvious)\
**Replies:** 1\
**Last updated:** [September 7, 2019, 2:38pm UTC](https://discourse.processing.org/t/piston-effect-in-processing-simulation/13867 "2019-09-07T14:38:17Z")

</div>

0 I am trying to set up a simulation of a 2D box containing a number of particles (circles of radius r) colliding elastically with each other and the wall. I then tried to add in a piston (a line object with some stroke…

---

## [Is there a way to make random grids/layouts in Processing?](https://discourse.processing.org/t/is-there-a-way-to-make-random-grids-layouts-in-processing/13854)

<div class="topic-metadata">

**Author:** [@jb99](https://discourse.processing.org/u/jb99)\
**Replies:** 10\
**Last updated:** [September 7, 2019, 5:55pm UTC](https://discourse.processing.org/t/is-there-a-way-to-make-random-grids-layouts-in-processing/13854 "2019-09-07T17:55:37Z")

</div>

Hi everyone, I’m a visual designer and I’m new to processing. I would like to know if there are any possibilities in Processing to create random aesthetic grids/layouts for editorial projects let’s say that are very sim…

---

## [How to generate something like this (concrete choreography)?](https://discourse.processing.org/t/how-to-generate-something-like-this-concrete-choreography/13850)

<div class="topic-metadata">

**Author:** [@Rohith\_DJ](https://discourse.processing.org/u/Rohith_DJ)\
**Replies:** 3\
**Last updated:** [September 6, 2019, 8:43pm UTC](https://discourse.processing.org/t/how-to-generate-something-like-this-concrete-choreography/13850 "2019-09-06T20:43:01Z")

</div>

How do we generate something like this? What kind of systems (attractors, etc) or tools that could be used to generate these kind of forms?

---

## [How to snap mouse to a shape/coordinate?](https://discourse.processing.org/t/how-to-snap-mouse-to-a-shape-coordinate/13414)

<div class="topic-metadata">

**Author:** [@NadeW](https://discourse.processing.org/u/NadeW)\
**Replies:** 8\
**Last updated:** [August 18, 2019, 2:48pm UTC](https://discourse.processing.org/t/how-to-snap-mouse-to-a-shape-coordinate/13414 "2019-08-18T14:48:45Z")

</div>

Hello my idea is to snap the mouse cursor to intersections on a grid when the user approaches them (this will center the mouse pointer to that cross on the grid). I did some digging but I haven’t found anything that can …

---

## [Can any one tell me why do I get this error while quitting any P3D seketch](https://discourse.processing.org/t/can-any-one-tell-me-why-do-i-get-this-error-while-quitting-any-p3d-seketch/13800)

<div class="topic-metadata">

**Author:** [@shoccho](https://discourse.processing.org/u/shoccho)\
**Replies:** 5\
**Last updated:** [September 6, 2019, 5:29pm UTC](https://discourse.processing.org/t/can-any-one-tell-me-why-do-i-get-this-error-while-quitting-any-p3d-seketch/13800 "2019-09-06T17:29:53Z")

</div>

X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 2/2, reusable (open, marked uncloseable): 0, pending (open in creation order): 2) X11Util: Open X11 Display Connections: 2 X11Util: Open\[0\]: NamedX1…

---

## [String is not null, but it behaves as if it were](https://discourse.processing.org/t/string-is-not-null-but-it-behaves-as-if-it-were/13840)

<div class="topic-metadata">

**Author:** [@AngelRF](https://discourse.processing.org/u/AngelRF)\
**Replies:** 8\
**Last updated:** [September 6, 2019, 2:49pm UTC](https://discourse.processing.org/t/string-is-not-null-but-it-behaves-as-if-it-were/13840 "2019-09-06T14:49:39Z")

</div>

Hi, i’m trying to read a ASCII object (.obj) file and i’m having troubles. In the file, there are some empty lines with only \\r\\n (CRLF) line breaks, for example, line 1 and 3 (the 1st line is 0). When I do things with…

---

## [Allowing sketch to use OS window snap features](https://discourse.processing.org/t/allowing-sketch-to-use-os-window-snap-features/13829)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 1\
**Last updated:** [September 6, 2019, 12:53pm UTC](https://discourse.processing.org/t/allowing-sketch-to-use-os-window-snap-features/13829 "2019-09-06T12:53:24Z")

</div>

Not really too sure how to categorize this, but is there an easy way to allow the processing application to make use of Windows native snap/maximize feature, or can this be programmed using a simple mouse-pressed functio…

---

## [Getting User input](https://discourse.processing.org/t/getting-user-input/1670)

<div class="topic-metadata">

**Author:** [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Replies:** 16\
**Last updated:** [September 6, 2019, 12:46pm UTC](https://discourse.processing.org/t/getting-user-input/1670 "2019-09-06T12:46:42Z")

</div>

Java Proccessing OK, I’ve watched several youtube shows of getting the user’s input. Even though I didn’t like the way they did it I tried it since I have no other idea of how to do it. So in the game I’m making my high…

---

## [Exporting Point Cloud](https://discourse.processing.org/t/exporting-point-cloud/13797)

<div class="topic-metadata">

**Author:** [@kud7](https://discourse.processing.org/u/kud7)\
**Replies:** 4\
**Last updated:** [September 6, 2019, 4:27am UTC](https://discourse.processing.org/t/exporting-point-cloud/13797 "2019-09-06T04:27:59Z")

</div>

Hi, what’re my options to export Kinect point cloud data, alembic or obj format from Processing? The idea is to import point cloud data or sequence to Cinema 4D? Thanks!

---

## [Transform shapes so part of wall appears to be decaying](https://discourse.processing.org/t/transform-shapes-so-part-of-wall-appears-to-be-decaying/13742)

<div class="topic-metadata">

**Author:** [@helpMe](https://discourse.processing.org/u/helpMe)\
**Replies:** 8\
**Last updated:** [September 5, 2019, 9:16am UTC](https://discourse.processing.org/t/transform-shapes-so-part-of-wall-appears-to-be-decaying/13742 "2019-09-05T09:16:16Z")

</div>

Hi, I’m working in a project. I did some code, but which is not done. I’m very new in processing. I don’t understand properly how everything works. I’ll share the project idea and code below. Can someone help me with the…

---

## [Can't use image with SVG library](https://discourse.processing.org/t/cant-use-image-with-svg-library/13795)

<div class="topic-metadata">

**Author:** [@Sahan](https://discourse.processing.org/u/Sahan)\
**Replies:** 0\
**Last updated:** [September 4, 2019, 11:03am UTC](https://discourse.processing.org/t/cant-use-image-with-svg-library/13795 "2019-09-04T11:03:51Z")

</div>

hello I am using processing p3, I want to convert a bitmap image to SVG. i edited one of the programs in SVG libraries of Processing with image() function, it throws an error. as I am new to programming, Pl suggest me …

---

## [YAML file editing](https://discourse.processing.org/t/yaml-file-editing/13602)

<div class="topic-metadata">

**Author:** [@RockyHawk](https://discourse.processing.org/u/RockyHawk)\
**Replies:** 2\
**Last updated:** [August 26, 2019, 2:22pm UTC](https://discourse.processing.org/t/yaml-file-editing/13602 "2019-08-26T14:22:22Z")

</div>

I was wondering if there was a way to edit a YAML file and save the edited version… So it would be something like this maybe: File yaml = new File(System.getProperty("user.home") + "/Desktop/\*.\*"); selectInput("Choose …

[Previous page](https://discourse.processing.org/c/processing/6.md?page=272)

[Next page](https://discourse.processing.org/c/processing/6.md?page=274)
