# Processing

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

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

**Page:** 136

---

## [Userinput String to formula](https://discourse.processing.org/t/userinput-string-to-formula/29585)

<div class="topic-metadata">

**Author:** [@Flolo](https://discourse.processing.org/u/Flolo)\
**Replies:** 7\
**Last updated:** [April 24, 2021, 10:41pm UTC](https://discourse.processing.org/t/userinput-string-to-formula/29585 "2021-04-24T22:41:51Z")

</div>

Hey I want to write a program where the user can enter a formula in a text field and that program then converts this string to the “correct” formula and then calculates it. Here a example: //This would appear in front …

---

## [Comment faire une rotation d'image dans un tableau](https://discourse.processing.org/t/comment-faire-une-rotation-dimage-dans-un-tableau/29551)

<div class="topic-metadata">

**Author:** [@Macarongirl](https://discourse.processing.org/u/Macarongirl)\
**Replies:** 4\
**Last updated:** [April 24, 2021, 10:07pm UTC](https://discourse.processing.org/t/comment-faire-une-rotation-dimage-dans-un-tableau/29551 "2021-04-24T22:07:48Z")

</div>

Bonjour, Je suis une étudiante en design et pour un projet je souhaitais réaliser un jardin numérique. Je débute dans le milieu de processing et la base du code est faite en collaboration avec mon professeur de techno.…

---

## [Cycling through days of the week](https://discourse.processing.org/t/cycling-through-days-of-the-week/29609)

<div class="topic-metadata">

**Author:** [@Th3cG](https://discourse.processing.org/u/Th3cG)\
**Replies:** 2\
**Last updated:** [April 24, 2021, 9:29pm UTC](https://discourse.processing.org/t/cycling-through-days-of-the-week/29609 "2021-04-24T21:29:58Z")

</div>

Hi. I’m trying to write a code that cycles through the days of the week. Specifically, if today is Saturday, my code has to print today is Saturday tomorrow is Sunday the day after tomorrow is Monday and this has to…

---

## [About a project of processing .. I need a help](https://discourse.processing.org/t/about-a-project-of-processing-i-need-a-help/28865)

<div class="topic-metadata">

**Author:** [@Tassadit](https://discourse.processing.org/u/Tassadit)\
**Replies:** 20\
**Last updated:** [April 24, 2021, 6:04pm UTC](https://discourse.processing.org/t/about-a-project-of-processing-i-need-a-help/28865 "2021-04-24T18:04:39Z")

</div>

Please i need a help in my project . i hope that you help me to have the correct code. Nombres rationnels Sur le modèle des nombres complexes, on se propose de réaliser une classe qui représente les nombres rationnels. …

---

## [Why am I Accessing Private Variables](https://discourse.processing.org/t/why-am-i-accessing-private-variables/29607)

<div class="topic-metadata">

**Author:** [@emersonbastos](https://discourse.processing.org/u/emersonbastos)\
**Replies:** 1\
**Last updated:** [April 24, 2021, 5:58pm UTC](https://discourse.processing.org/t/why-am-i-accessing-private-variables/29607 "2021-04-24T17:58:21Z")

</div>

Hi, I’m learning to program with Processing and a question came to me ! I created a class called Estrela (Star) and I created some private attributes in it, but I’m noticing that I can access these private variables fr…

---

## [Parallel&horizontal lines using loops](https://discourse.processing.org/t/parallel-horizontal-lines-using-loops/29591)

<div class="topic-metadata">

**Author:** [@lelapin](https://discourse.processing.org/u/lelapin)\
**Replies:** 3\
**Last updated:** [April 24, 2021, 5:07pm UTC](https://discourse.processing.org/t/parallel-horizontal-lines-using-loops/29591 "2021-04-24T17:07:01Z")

</div>

Hello please i need help in my homework: Exercise: draw random parallel and horizontal lines using loops.The length of each line is a random number between 0 and 44. Thanks

---

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

<div class="topic-metadata">

**Author:** [@jensemand](https://discourse.processing.org/u/jensemand)\
**Replies:** 2\
**Last updated:** [April 24, 2021, 5:06pm UTC](https://discourse.processing.org/t/problems-with-fractions/29605 "2021-04-24T17:06:20Z")

</div>

Hi, I am trying to make a program where i need to calculate a fraction (3-2)/2 or just 1/2 which is 0,5 ofcourse, however processing says it is 0. I don’t know if it’s a bug or what. I would just like to know how i can f…

---

## [My program isn't doing what I want it to do (x and o game / Tic Tac Toe)](https://discourse.processing.org/t/my-program-isnt-doing-what-i-want-it-to-do-x-and-o-game-tic-tac-toe/25516)

<div class="topic-metadata">

**Author:** [@DijaAngel](https://discourse.processing.org/u/DijaAngel)\
**Replies:** 68\
**Last updated:** [April 24, 2021, 3:19pm UTC](https://discourse.processing.org/t/my-program-isnt-doing-what-i-want-it-to-do-x-and-o-game-tic-tac-toe/25516 "2021-04-24T15:19:44Z")

</div>

char player=‘X’; void setup(){ size(600,600); background(255); strokeWeight(6); noFill(); } void draw(){ stroke(0); line(200,100,200,500); line(400,100,400,500); } void mouseClicked(){ if(player==‘X’){ stro…

---

## [Interactive shape masking with PGraphics](https://discourse.processing.org/t/interactive-shape-masking-with-pgraphics/29601)

<div class="topic-metadata">

**Author:** [@PatJOAO](https://discourse.processing.org/u/PatJOAO)\
**Replies:** 1\
**Last updated:** [April 24, 2021, 12:32pm UTC](https://discourse.processing.org/t/interactive-shape-masking-with-pgraphics/29601 "2021-04-24T12:32:10Z")

</div>

Hi there! Building up on a great post from the old forum: https://forum.processing.org/two/discussion/comment/77997/#Comment\_77997 shape. masking with PGraphics — was wondering if some one can give me a tip to how to a…

---

## [How to force a path to write a file outside of the sketch directory?](https://discourse.processing.org/t/how-to-force-a-path-to-write-a-file-outside-of-the-sketch-directory/29579)

<div class="topic-metadata">

**Author:** [@Liu.Exit](https://discourse.processing.org/u/Liu.Exit)\
**Replies:** 3\
**Last updated:** [April 24, 2021, 8:41am UTC](https://discourse.processing.org/t/how-to-force-a-path-to-write-a-file-outside-of-the-sketch-directory/29579 "2021-04-24T08:41:02Z")

</div>

SelectFolder is not suitable for me because it opens a window … Thanks.

---

## [Svg scale start again when svg size is too big](https://discourse.processing.org/t/svg-scale-start-again-when-svg-size-is-too-big/29580)

<div class="topic-metadata">

**Author:** [@yves](https://discourse.processing.org/u/yves)\
**Replies:** 2\
**Last updated:** [April 24, 2021, 5:11am UTC](https://discourse.processing.org/t/svg-scale-start-again-when-svg-size-is-too-big/29580 "2021-04-24T05:11:18Z")

</div>

Hi everyone, I’m new in processing dev, I have this code to scale a svg, I don’t know how to start again the scale when the svg go out the screen, like being at the original size and position . Thank’s Yves PShape bo…

---

## [Finding nearest neighbor points](https://discourse.processing.org/t/finding-nearest-neighbor-points/29593)

<div class="topic-metadata">

**Author:** [@Mort](https://discourse.processing.org/u/Mort)\
**Replies:** 1\
**Last updated:** [April 24, 2021, 3:36am UTC](https://discourse.processing.org/t/finding-nearest-neighbor-points/29593 "2021-04-24T03:36:36Z")

</div>

Hi, I am having trouble with finding the nearest neighbor points. I am trying to create a web of lines connecting randomly generated points to each other. these lines are supposed to connect the nearest points to each ot…

---

## [Removing current X values from a possible arrayList object spawn](https://discourse.processing.org/t/removing-current-x-values-from-a-possible-arraylist-object-spawn/29560)

<div class="topic-metadata">

**Author:** [@spamelim](https://discourse.processing.org/u/spamelim)\
**Replies:** 3\
**Last updated:** [April 23, 2021, 9:52pm UTC](https://discourse.processing.org/t/removing-current-x-values-from-a-possible-arraylist-object-spawn/29560 "2021-04-23T21:52:47Z")

</div>

Hello, I am working on a game where a ship avoids walls in 3D. I wanted to make sure the walls do not overlap in x values. Currently, they spawn in on a timed interval like so: if (walls.size() \<= max) { // max is a…

---

## [Bezier & ellipse](https://discourse.processing.org/t/bezier-ellipse/29572)

<div class="topic-metadata">

**Author:** [@kylu](https://discourse.processing.org/u/kylu)\
**Replies:** 3\
**Last updated:** [April 23, 2021, 8:37pm UTC](https://discourse.processing.org/t/bezier-ellipse/29572 "2021-04-23T20:37:41Z")

</div>

Hey! i need some help, i’m working in a code, and i have a question, can i uso bezier in a ellipse? I need the shape of the ellipse to change as I go through it. Depending on the position of the mouse, the bezier posit…

---

## [Why aren't my svg images rendering properly in processing?](https://discourse.processing.org/t/why-arent-my-svg-images-rendering-properly-in-processing/29548)

<div class="topic-metadata">

**Author:** [@canslp](https://discourse.processing.org/u/canslp)\
**Replies:** 7\
**Last updated:** [April 23, 2021, 6:50pm UTC](https://discourse.processing.org/t/why-arent-my-svg-images-rendering-properly-in-processing/29548 "2021-04-23T18:50:11Z")

</div>

i am using PShape to draw an svg image with shape(); but it’s not closing all the way. it basically looks like how the shape would look if i was doing beginShape() vertices and endShape() without using endShape(CLOSE); t…

---

## [Bluetooth issue - com port busy when restarting a new program](https://discourse.processing.org/t/bluetooth-issue-com-port-busy-when-restarting-a-new-program/29297)

<div class="topic-metadata">

**Author:** [@Neuro503](https://discourse.processing.org/u/Neuro503)\
**Replies:** 4\
**Last updated:** [April 23, 2021, 6:23pm UTC](https://discourse.processing.org/t/bluetooth-issue-com-port-busy-when-restarting-a-new-program/29297 "2021-04-23T18:23:14Z")

</div>

Hi All, This is essentially a com port busy issue. I am unable to find a solution for this other than resetting the M5stickC. (Basically a ESP32) The M5stickC is programmed as a bluetooth device. It sends data out cons…

---

## [Switching the location of two values in a IntList](https://discourse.processing.org/t/switching-the-location-of-two-values-in-a-intlist/29567)

<div class="topic-metadata">

**Author:** [@jensemand](https://discourse.processing.org/u/jensemand)\
**Replies:** 2\
**Last updated:** [April 23, 2021, 5:12pm UTC](https://discourse.processing.org/t/switching-the-location-of-two-values-in-a-intlist/29567 "2021-04-23T17:12:04Z")

</div>

As the title says, I was wondering if there’s a command for switching the location of two values in a IntList. I am trying to make a function so i can create a minheap and it just seems kind of boring to save the value i…

---

## [Making a class move](https://discourse.processing.org/t/making-a-class-move/29571)

<div class="topic-metadata">

**Author:** [@chatters22](https://discourse.processing.org/u/chatters22)\
**Replies:** 8\
**Last updated:** [April 23, 2021, 11:14am UTC](https://discourse.processing.org/t/making-a-class-move/29571 "2021-04-23T11:14:38Z")

</div>

I’m quite new to Processing, earlier when I wasn’t working with classes I could easily make my objects move with simple code like xLoc = xLoc + 1. But now I’m working with classes, and I can’t get them to move for some r…

---

## [Need help: problems with light and material of the 3d object](https://discourse.processing.org/t/need-help-problems-with-light-and-material-of-the-3d-object/29566)

<div class="topic-metadata">

**Author:** [@sergio\_dm](https://discourse.processing.org/u/sergio_dm)\
**Replies:** 1\
**Last updated:** [April 23, 2021, 8:43am UTC](https://discourse.processing.org/t/need-help-problems-with-light-and-material-of-the-3d-object/29566 "2021-04-23T08:43:13Z")

</div>

Hi everyone, for my university project I have implemented the marching cubes algorithm and everything seems to work, the only problem is that I can’t manage the lights and the surface material. Here is an example: T…

---

## [Font Install Issues](https://discourse.processing.org/t/font-install-issues/29557)

<div class="topic-metadata">

**Author:** [@YellowGTM](https://discourse.processing.org/u/YellowGTM)\
**Replies:** 5\
**Last updated:** [April 23, 2021, 12:00am UTC](https://discourse.processing.org/t/font-install-issues/29557 "2021-04-23T00:00:10Z")

</div>

Good morning all. I see this topic has been posted before, and resolved to some extent. I’m trying to add a font called “Conthrax”, however the Processing IDE will not load it. The font works in other programs such a…

---

## [Creating basically a slideshow but a bit different](https://discourse.processing.org/t/creating-basically-a-slideshow-but-a-bit-different/29522)

<div class="topic-metadata">

**Author:** [@JoeyS](https://discourse.processing.org/u/JoeyS)\
**Replies:** 14\
**Last updated:** [April 22, 2021, 9:10pm UTC](https://discourse.processing.org/t/creating-basically-a-slideshow-but-a-bit-different/29522 "2021-04-22T21:10:05Z")

</div>

Hi, In our course we are learning prototyping with Arduino Nano BLE 33 Sense. To our physical prototype we are creating a user interface to be run from a computer through Processing. The plan was to upload images we’ve …

---

## [Processing to rhino/Grasshopper](https://discourse.processing.org/t/processing-to-rhino-grasshopper/29532)

<div class="topic-metadata">

**Author:** [@Shruhman](https://discourse.processing.org/u/Shruhman)\
**Replies:** 5\
**Last updated:** [April 22, 2021, 6:31pm UTC](https://discourse.processing.org/t/processing-to-rhino-grasshopper/29532 "2021-04-22T18:31:14Z")

</div>

Hi, I was wondering if there is any way to connect Processing and Rhino/grasshopper together. I am interested to write the code and generate geometries in processing and later transfer the geometries into Rhino/Grasshop…

---

## [Computing a moving average](https://discourse.processing.org/t/computing-a-moving-average/28996)

<div class="topic-metadata">

**Author:** [@bking](https://discourse.processing.org/u/bking)\
**Replies:** 18\
**Last updated:** [April 22, 2021, 6:21pm UTC](https://discourse.processing.org/t/computing-a-moving-average/28996 "2021-04-22T18:21:01Z")

</div>

Hi there, I often and manually change the values of a data. In order to make the transitions less abrupt, I would like to have for a short time the average between the last value and the value just before. If I choose …

---

## [The cursor is a horizontal line](https://discourse.processing.org/t/the-cursor-is-a-horizontal-line/29559)

<div class="topic-metadata">

**Author:** [@Dialias](https://discourse.processing.org/u/Dialias)\
**Replies:** 1\
**Last updated:** [April 22, 2021, 2:57pm UTC](https://discourse.processing.org/t/the-cursor-is-a-horizontal-line/29559 "2021-04-22T14:57:36Z")

</div>

Hey as you can see my Cursor isnt a normal Line, now its horizontal, this is only in Processing so i think its a cringe feature. How do i reset it?

---

## [Processing crashes when trying to open a file](https://discourse.processing.org/t/processing-crashes-when-trying-to-open-a-file/16697)

<div class="topic-metadata">

**Author:** [@Flo](https://discourse.processing.org/u/Flo)\
**Replies:** 1\
**Last updated:** [April 22, 2021, 6:23am UTC](https://discourse.processing.org/t/processing-crashes-when-trying-to-open-a-file/16697 "2021-04-22T06:23:52Z")

</div>

Processing works fine in an empty sketch, but the moment I use ctrl-o or any other way to open a file, the gui doesn’t show any of the textfiles, and when you then press cancel processing crashes with the following messa…

---

## [Move Vertex from SVG](https://discourse.processing.org/t/move-vertex-from-svg/29542)

<div class="topic-metadata">

**Author:** [@p\_a](https://discourse.processing.org/u/p_a)\
**Replies:** 1\
**Last updated:** [April 21, 2021, 5:32pm UTC](https://discourse.processing.org/t/move-vertex-from-svg/29542 "2021-04-21T17:32:55Z")

</div>

Hello! Currently I am working on moving backgrounds for music, don’t bother the sound analysis stuff, my only problem is that I want to move the Vertex points from one SVG Child to my created frequency bands. It works i…

---

## [How do I find the rotateX,rotateY, and rotateZ values to make any vector vertical?](https://discourse.processing.org/t/how-do-i-find-the-rotatex-rotatey-and-rotatez-values-to-make-any-vector-vertical/29220)

<div class="topic-metadata">

**Author:** [@neel](https://discourse.processing.org/u/neel)\
**Replies:** 4\
**Last updated:** [April 21, 2021, 5:04pm UTC](https://discourse.processing.org/t/how-do-i-find-the-rotatex-rotatey-and-rotatez-values-to-make-any-vector-vertical/29220 "2021-04-21T17:04:47Z")

</div>

I’ve got two points in 3d space, and I want to draw a box between them that acts like a line. If I can translate to get to the first point, how would I find the rotation values that could make my box aligned so that one …

---

## [Exception in Toxiclibs voronoi.addPoint() when image is large (5k x 5k or larger)](https://discourse.processing.org/t/exception-in-toxiclibs-voronoi-addpoint-when-image-is-large-5k-x-5k-or-larger/29541)

<div class="topic-metadata">

**Author:** [@mocelet](https://discourse.processing.org/u/mocelet)\
**Replies:** 2\
**Last updated:** [April 21, 2021, 1:02pm UTC](https://discourse.processing.org/t/exception-in-toxiclibs-voronoi-addpoint-when-image-is-large-5k-x-5k-or-larger/29541 "2021-04-21T13:02:08Z")

</div>

I am using the Toxiclibs voronoi mesh to generate a set of non-overlapping lines in a circle, and have based my sketch on the example code I found at https://forum.processing.org/one/topic/toxiclib-voronoi-example-sketch…

---

## [Problems with creating soft body in processing](https://discourse.processing.org/t/problems-with-creating-soft-body-in-processing/29535)

<div class="topic-metadata">

**Author:** [@Rafsing](https://discourse.processing.org/u/Rafsing)\
**Replies:** 1\
**Last updated:** [April 21, 2021, 10:09am UTC](https://discourse.processing.org/t/problems-with-creating-soft-body-in-processing/29535 "2021-04-21T10:09:05Z")

</div>

I am having trouble forming a soft body where each side is a spring. When they are created, they do not merge into one object, but create as many springs as there are vertices in the figure. This code is responsible for …

---

## [Presentation in processing? Is my idea doable?](https://discourse.processing.org/t/presentation-in-processing-is-my-idea-doable/28489)

<div class="topic-metadata">

**Author:** [@Teljemo](https://discourse.processing.org/u/Teljemo)\
**Replies:** 10\
**Last updated:** [April 21, 2021, 9:47am UTC](https://discourse.processing.org/t/presentation-in-processing-is-my-idea-doable/28489 "2021-04-21T09:47:26Z")

</div>

Hi, Me and a co-worker are about to make a presentation of a project that’s almost completed. Its a change in layout in production flow in a factory. Since we cant have a “grand opening” cause of the pandemic we are do…

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

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