# Coding Questions

**URL:** https://discourse.processing.org/c/processing/processing-questions/15.md?page=35

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

**Page:** 36

---

## [Draw-order based transparency issue](https://discourse.processing.org/t/draw-order-based-transparency-issue/22675)

<div class="topic-metadata">

**Author:** [@chittyxz](https://discourse.processing.org/u/chittyxz)\
**Replies:** 5\
**Last updated:** [January 23, 2022, 8:32pm UTC](https://discourse.processing.org/t/draw-order-based-transparency-issue/22675 "2022-01-23T20:32:36Z")

</div>

I am having a transparency issue with drawing multiple POINTS style PShapes into a P3D PGraphics object. Each Vertex inside the PShapes has its own image-driven alpha value. Vertices with partial transparency misbehave. …

---

## [How do I measure the angle of a vertex?](https://discourse.processing.org/t/how-do-i-measure-the-angle-of-a-vertex/34511)

<div class="topic-metadata">

**Author:** [@mario60](https://discourse.processing.org/u/mario60)\
**Replies:** 4\
**Last updated:** [January 23, 2022, 5:11pm UTC](https://discourse.processing.org/t/how-do-i-measure-the-angle-of-a-vertex/34511 "2022-01-23T17:11:47Z")

</div>

Let me have three points, and the two lines from one of them, the vertex point, to the others two. How do I calculate the angle between the two lines? I am trying not to use PVectors.

---

## [Proper way to do full screen](https://discourse.processing.org/t/proper-way-to-do-full-screen/34778)

<div class="topic-metadata">

**Author:** [@Slien](https://discourse.processing.org/u/Slien)\
**Replies:** 4\
**Last updated:** [January 23, 2022, 12:07pm UTC](https://discourse.processing.org/t/proper-way-to-do-full-screen/34778 "2022-01-23T12:07:48Z")

</div>

I’ve finished making a game (simple 2D platformer) and I’m trying to improve some aspects of it. One of those aspects is making the game full screen. I unfortunately wrote the entire game with a 1440 x 900 window in mind…

---

## [How to Restart or Shutdown Windows 10 PC using Processing 3](https://discourse.processing.org/t/how-to-restart-or-shutdown-windows-10-pc-using-processing-3/34687)

<div class="topic-metadata">

**Author:** [@CaseyJ](https://discourse.processing.org/u/CaseyJ)\
**Replies:** 7\
**Last updated:** [January 21, 2022, 8:52pm UTC](https://discourse.processing.org/t/how-to-restart-or-shutdown-windows-10-pc-using-processing-3/34687 "2022-01-21T20:52:01Z")

</div>

I am making an arcade station with a Latte Panda v1.0 as the main computer which plays fun games like “The Game of Life” an others. In the middle there is a “World Reset” button and pressing it is supposed to reset the …

---

## [Line not drawing (PVector)](https://discourse.processing.org/t/line-not-drawing-pvector/34776)

<div class="topic-metadata">

**Author:** [@Ex1ne](https://discourse.processing.org/u/Ex1ne)\
**Replies:** 5\
**Last updated:** [January 21, 2022, 3:09pm UTC](https://discourse.processing.org/t/line-not-drawing-pvector/34776 "2022-01-21T15:09:15Z")

</div>

I’m about done scratching my head over this. What I’m trying to do is this: Make a point A. Make a new point B in refference to point A with an added x and y using PVector, aswell as rotate by an amount. Make a line b…

---

## [Even stroke weight on distorted svg](https://discourse.processing.org/t/even-stroke-weight-on-distorted-svg/34749)

<div class="topic-metadata">

**Author:** [@danielkozma](https://discourse.processing.org/u/danielkozma)\
**Replies:** 3\
**Last updated:** [January 21, 2022, 9:17am UTC](https://discourse.processing.org/t/even-stroke-weight-on-distorted-svg/34749 "2022-01-21T09:17:50Z")

</div>

Hi! I would like to use an imported svg in various distorted aspect ratios. Is there a way to get an even stroke weight on the distorted versions (right), just like on the original (left)? PShape gl; void setup() { …

---

## [Switching title images](https://discourse.processing.org/t/switching-title-images/34735)

<div class="topic-metadata">

**Author:** [@cisky](https://discourse.processing.org/u/cisky)\
**Replies:** 9\
**Last updated:** [January 20, 2022, 11:32pm UTC](https://discourse.processing.org/t/switching-title-images/34735 "2022-01-20T23:32:39Z")

</div>

Hi everyone, I’ve just started working with Processing and I need your help on my project. I’m tryna make the classic “Breakout” game and, to start, I’d like to have a “blinking” title. My goal is to have this red and …

---

## [P3D performance with 62500 boxes](https://discourse.processing.org/t/p3d-performance-with-62500-boxes/3821)

<div class="topic-metadata">

**Author:** [@coco](https://discourse.processing.org/u/coco)\
**Replies:** 56\
**Last updated:** [January 20, 2022, 4:38pm UTC](https://discourse.processing.org/t/p3d-performance-with-62500-boxes/3821 "2022-01-20T16:38:24Z")

</div>

I have a program that I wrote a long time ago using the GLGraphics library and that I’m trying to port into Processing 3.0. It is a program that has 62500 boxes independently moving all over the place. In P151 I used coo…

---

## [Compile time OutOfMemoryError](https://discourse.processing.org/t/compile-time-outofmemoryerror/34683)

<div class="topic-metadata">

**Author:** [@codebodger](https://discourse.processing.org/u/codebodger)\
**Replies:** 0\
**Last updated:** [January 17, 2022, 12:14am UTC](https://discourse.processing.org/t/compile-time-outofmemoryerror/34683 "2022-01-17T00:14:25Z")

</div>

I have a sketch that is quite big (about 8 MiB) that will not compile. When I run it, it gives me an OutOfMemoryError while compiling. It will not even do print("hi"); if I put it at the beginning. Does anyone know ho…

---

## [Drag and Drop an Object](https://discourse.processing.org/t/drag-and-drop-an-object/34609)

<div class="topic-metadata">

**Author:** [@Kristina](https://discourse.processing.org/u/Kristina)\
**Replies:** 3\
**Last updated:** [January 16, 2022, 1:06pm UTC](https://discourse.processing.org/t/drag-and-drop-an-object/34609 "2022-01-16T13:06:31Z")

</div>

Hello, I was wondering if someone could explain how I can drag and drop an object if its part of an arrayList. I know how to look if the mouse is inside or how to remove it but for a drag and drop function I really have …

---

## [Beads library and Arduino controller](https://discourse.processing.org/t/beads-library-and-arduino-controller/34639)

<div class="topic-metadata">

**Author:** [@aejstr20](https://discourse.processing.org/u/aejstr20)\
**Replies:** 0\
**Last updated:** [January 15, 2022, 4:59pm UTC](https://discourse.processing.org/t/beads-library-and-arduino-controller/34639 "2022-01-15T16:59:16Z")

</div>

Hey everyone! So, as some of you might’ve seen over the last couple of days, me and my group are working on a project, where sensor values from an Arduino need to control some sort of sound input. At this point, we’ve g…

---

## [Create a wall made of cube](https://discourse.processing.org/t/create-a-wall-made-of-cube/34532)

<div class="topic-metadata">

**Author:** [@Bapoivre](https://discourse.processing.org/u/Bapoivre)\
**Replies:** 3\
**Last updated:** [January 14, 2022, 10:10pm UTC](https://discourse.processing.org/t/create-a-wall-made-of-cube/34532 "2022-01-14T22:10:01Z")

</div>

Hello, I am having a hard time solving a problem. To make it simple : I created a cube using quad, and I want to make a wall made of these cubes, so they have to all stick together. Here is the code float x1 = 0; flo…

---

## [Objects don't appear](https://discourse.processing.org/t/objects-dont-appear/34581)

<div class="topic-metadata">

**Author:** [@Kristina](https://discourse.processing.org/u/Kristina)\
**Replies:** 11\
**Last updated:** [January 11, 2022, 9:00pm UTC](https://discourse.processing.org/t/objects-dont-appear/34581 "2022-01-11T21:00:45Z")

</div>

Hello, I’ve been working on this code and I can’t seem to find out what the problem is. You have Buttons at the bottom and depending on which one you press you can do different things. I am currently working on the Lawn …

---

## [Encoding show text](https://discourse.processing.org/t/encoding-show-text/34414)

<div class="topic-metadata">

**Author:** [@Kristina](https://discourse.processing.org/u/Kristina)\
**Replies:** 4\
**Last updated:** [January 11, 2022, 5:34pm UTC](https://discourse.processing.org/t/encoding-show-text/34414 "2022-01-11T17:34:57Z")

</div>

Hello! Ive been working on this code we got for homework, we can’t change anything about it but we can just add in between two comments. Its supposed to count the letters and then show the result as a text underneath fo…

---

## [Struggling to add enemy projectiles to my project (array within an array?)](https://discourse.processing.org/t/struggling-to-add-enemy-projectiles-to-my-project-array-within-an-array/34444)

<div class="topic-metadata">

**Author:** [@HollowRadio](https://discourse.processing.org/u/HollowRadio)\
**Replies:** 2\
**Last updated:** [January 10, 2022, 2:55pm UTC](https://discourse.processing.org/t/struggling-to-add-enemy-projectiles-to-my-project-array-within-an-array/34444 "2022-01-10T14:55:31Z")

</div>

I created a game for a course this last semester, but wanted to add a few things before being officially done with it on my own. One of those things is adding the ability for enemies to fire projectiles that can damage/k…

---

## [Rotation issue with frameCount - how could i solve this with modulo?](https://discourse.processing.org/t/rotation-issue-with-framecount-how-could-i-solve-this-with-modulo/34538)

<div class="topic-metadata">

**Author:** [@srt](https://discourse.processing.org/u/srt)\
**Replies:** 3\
**Last updated:** [January 10, 2022, 1:14am UTC](https://discourse.processing.org/t/rotation-issue-with-framecount-how-could-i-solve-this-with-modulo/34538 "2022-01-10T01:14:08Z")

</div>

Hey i need your help with the rotation. here the part of the code which relates to my question: float rotation = map(sin(radians(frameCount)), 1, -1, 45, -45); rotateY(radians(rotation));

---

## [Changing values?](https://discourse.processing.org/t/changing-values/34530)

<div class="topic-metadata">

**Author:** [@NigelWoollard](https://discourse.processing.org/u/NigelWoollard)\
**Replies:** 3\
**Last updated:** [January 8, 2022, 9:49pm UTC](https://discourse.processing.org/t/changing-values/34530 "2022-01-08T21:49:37Z")

</div>

Hi is anybody clever enough to explain to me why this program creates changing values , I realize that it resets the arrays with each draw loop , But why are they different ? please format code with \</\> button \* homewo…

---

## [I have a bit of a problem with a collision check loop](https://discourse.processing.org/t/i-have-a-bit-of-a-problem-with-a-collision-check-loop/34390)

<div class="topic-metadata">

**Author:** [@NigelWoollard](https://discourse.processing.org/u/NigelWoollard)\
**Replies:** 24\
**Last updated:** [January 8, 2022, 6:46pm UTC](https://discourse.processing.org/t/i-have-a-bit-of-a-problem-with-a-collision-check-loop/34390 "2022-01-08T18:46:04Z")

</div>

Hi there , I have been working (playworking), on this this P3D program and am confused as to why the collision check loop does not detect any of the posts other than the last in the array (which I have coloured red.) ! …

---

## [Processing - ControlP5 error . pls help!](https://discourse.processing.org/t/processing-controlp5-error-pls-help/34514)

<div class="topic-metadata">

**Author:** [@R4R31](https://discourse.processing.org/u/R4R31)\
**Replies:** 0\
**Last updated:** [January 7, 2022, 10:02pm UTC](https://discourse.processing.org/t/processing-controlp5-error-pls-help/34514 "2022-01-07T22:02:10Z")

</div>

I don’t know why I get this error. The guy who wrote it has no problem with it. can u help me? The ERROR appears when you press the “Move to position” button THIS IS THE ERROR: Jan 07, 2022 10:47:12 PM controlP5.Contr…

---

## [Method of custom type not returning?](https://discourse.processing.org/t/method-of-custom-type-not-returning/34495)

<div class="topic-metadata">

**Author:** [@millibyte](https://discourse.processing.org/u/millibyte)\
**Replies:** 4\
**Last updated:** [January 7, 2022, 7:25pm UTC](https://discourse.processing.org/t/method-of-custom-type-not-returning/34495 "2022-01-07T19:25:48Z")

</div>

I’m creating a simple football video game with object oriented programming. One problem I’m having is a method with a return type of a custom object is not returning with said object. More specifically: I wrote the Play…

---

## [Seperating a function from mousePressed function?](https://discourse.processing.org/t/seperating-a-function-from-mousepressed-function/34503)

<div class="topic-metadata">

**Author:** [@aejstr20](https://discourse.processing.org/u/aejstr20)\
**Replies:** 0\
**Last updated:** [January 7, 2022, 2:36pm UTC](https://discourse.processing.org/t/seperating-a-function-from-mousepressed-function/34503 "2022-01-07T14:36:21Z")

</div>

Hi! So, I’m at uni trying to figure out this code and how to get it to work how I want it. The project consists of an Arduino, which measures voltage going through a plant and also has a potentiometer. These inputs will…

---

## [Get mouseX and mouseY position with current transformation](https://discourse.processing.org/t/get-mousex-and-mousey-position-with-current-transformation/34489)

<div class="topic-metadata">

**Author:** [@clankill3r](https://discourse.processing.org/u/clankill3r)\
**Replies:** 2\
**Last updated:** [January 7, 2022, 11:49am UTC](https://discourse.processing.org/t/get-mousex-and-mousey-position-with-current-transformation/34489 "2022-01-07T11:49:01Z")

</div>

How can I get the mouse position (and where z hits the camera plane), inside the transformation. So I need this before the popMatrix(). void setup() { size(600, 600, P3D); } public void draw() { background(0); …

---

## [Three parallel beziers](https://discourse.processing.org/t/three-parallel-beziers/34471)

<div class="topic-metadata">

**Author:** [@jaspervb](https://discourse.processing.org/u/jaspervb)\
**Replies:** 14\
**Last updated:** [January 6, 2022, 7:10pm UTC](https://discourse.processing.org/t/three-parallel-beziers/34471 "2022-01-06T19:10:53Z")

</div>

Hi there. I was wondering if there is a method to make three beziers parallel to each other with the same spacing between them. I have already made in example with three beziers.

---

## [How to create Minimum bounding shapes such as ellipse, triangle, quadrilateral from a given 2d shape](https://discourse.processing.org/t/how-to-create-minimum-bounding-shapes-such-as-ellipse-triangle-quadrilateral-from-a-given-2d-shape/29460)

<div class="topic-metadata">

**Author:** [@Goodman](https://discourse.processing.org/u/Goodman)\
**Replies:** 8\
**Last updated:** [January 6, 2022, 5:20pm UTC](https://discourse.processing.org/t/how-to-create-minimum-bounding-shapes-such-as-ellipse-triangle-quadrilateral-from-a-given-2d-shape/29460 "2022-01-06T17:20:00Z")

</div>

I have a 2d shape(boundary) and generated the convex hull. Now, I want to create a minimum bounding quadrilateral, minimum bounding triangle, and minimum bounding ellipse for that boundary. I have generated these minimum…

---

## [Swing works until](https://discourse.processing.org/t/swing-works-until/33322)

<div class="topic-metadata">

**Author:** [@HackinHarry](https://discourse.processing.org/u/HackinHarry)\
**Replies:** 13\
**Last updated:** [January 6, 2022, 1:36pm UTC](https://discourse.processing.org/t/swing-works-until/33322 "2022-01-06T13:36:22Z")

</div>

I’m using a swing gui to control some variables and if I just insert that into a sketch with nothing except a setup() and the code to get swing gui to launch, I can edit text and use that to update a slider. I can also …

---

## [Composite shape collision detection](https://discourse.processing.org/t/composite-shape-collision-detection/34473)

<div class="topic-metadata">

**Author:** [@myhatzulu](https://discourse.processing.org/u/myhatzulu)\
**Replies:** 1\
**Last updated:** [January 4, 2022, 11:45pm UTC](https://discourse.processing.org/t/composite-shape-collision-detection/34473 "2022-01-04T23:45:20Z")

</div>

I really need some help, I’m trying to make a composite shape of 2 ellipses, shaped like a snow man’s body with no arms, move (using arrows) towards 3 randomly positioned small circles that were created with an array, up…

---

## [Blinking random objects in arrays](https://discourse.processing.org/t/blinking-random-objects-in-arrays/34470)

<div class="topic-metadata">

**Author:** [@myhatzulu](https://discourse.processing.org/u/myhatzulu)\
**Replies:** 3\
**Last updated:** [January 4, 2022, 11:42pm UTC](https://discourse.processing.org/t/blinking-random-objects-in-arrays/34470 "2022-01-04T23:42:39Z")

</div>

hi I really need some tips, I’m trying to make my object array “blink” once it’s executed, the 10 ellipses in the array appear in random positions, and then they flash in and out while staying in that initial random posi…

---

## [Drag and drop file and obtain path](https://discourse.processing.org/t/drag-and-drop-file-and-obtain-path/16737)

<div class="topic-metadata">

**Author:** [@molo32](https://discourse.processing.org/u/molo32)\
**Replies:** 3\
**Last updated:** [January 3, 2022, 3:37pm UTC](https://discourse.processing.org/t/drag-and-drop-file-and-obtain-path/16737 "2022-01-03T15:37:51Z")

</div>

How drag and drop file inside screen sketch and obtain path of file. do not use the sDrop library

---

## [Automatic git commits on run with shell commands in Processing](https://discourse.processing.org/t/automatic-git-commits-on-run-with-shell-commands-in-processing/34423)

<div class="topic-metadata">

**Author:** [@Misha.studio](https://discourse.processing.org/u/Misha.studio)\
**Replies:** 11\
**Last updated:** [January 3, 2022, 7:37am UTC](https://discourse.processing.org/t/automatic-git-commits-on-run-with-shell-commands-in-processing/34423 "2022-01-03T07:37:24Z")

</div>

A couple of weeks ago I came across a great talk of Matt Deslauriers where he talks about his generative workflow. He created his own command line interface called canvas-sketch and one of the things I really liked was t…

---

## [Points on the surface of a Sphere using beginShape(POINTS or QUADS)](https://discourse.processing.org/t/points-on-the-surface-of-a-sphere-using-beginshape-points-or-quads/34425)

<div class="topic-metadata">

**Author:** [@companje](https://discourse.processing.org/u/companje)\
**Replies:** 8\
**Last updated:** [January 2, 2022, 7:52pm UTC](https://discourse.processing.org/t/points-on-the-surface-of-a-sphere-using-beginshape-points-or-quads/34425 "2022-01-02T19:52:16Z")

</div>

Hi everyone, I’m looking for a way to draw a couple of thousands of points on the surface of a sphere. beginShape/endShape feels like an efficient way to draw them. For example as POINTS with strokeWeight(10). However, …

[Previous page](https://discourse.processing.org/c/processing/processing-questions/15.md?page=34)

[Next page](https://discourse.processing.org/c/processing/processing-questions/15.md?page=36)
