# Coding Questions

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

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

**Page:** 131

---

## [VHS/lo-fi Glitch Effect](https://discourse.processing.org/t/vhs-lo-fi-glitch-effect/12746)

<div class="topic-metadata">

**Author:** [@Armin](https://discourse.processing.org/u/Armin)\
**Replies:** 10\
**Last updated:** [August 6, 2019, 1:41pm UTC](https://discourse.processing.org/t/vhs-lo-fi-glitch-effect/12746 "2019-08-06T13:41:37Z")

</div>

Hi How can I get a VHS/lo-fi image effect like this? I’ve googled to find the algorithm and codes to get this effect but i didn’t find anything!

---

## [Library that allows for mouse control](https://discourse.processing.org/t/library-that-allows-for-mouse-control/12969)

<div class="topic-metadata">

**Author:** [@WeinSim](https://discourse.processing.org/u/WeinSim)\
**Replies:** 7\
**Last updated:** [August 5, 2019, 10:58pm UTC](https://discourse.processing.org/t/library-that-allows-for-mouse-control/12969 "2019-08-05T22:58:42Z")

</div>

Ok, so I wanted to know wether there is some library that allows you to control what the mouse does (which buttons are being pressed and where it moves). I think I’ve seen something like this in c# or something idk and w…

---

## [Detect the state of the wifi](https://discourse.processing.org/t/detect-the-state-of-the-wifi/13021)

<div class="topic-metadata">

**Author:** [@hugo](https://discourse.processing.org/u/hugo)\
**Replies:** 1\
**Last updated:** [August 5, 2019, 10:44pm UTC](https://discourse.processing.org/t/detect-the-state-of-the-wifi/13021 "2019-08-05T22:44:46Z")

</div>

Hello, I would like to change the background depending on the state of the wifi : if (//wifi is activated\\\\) { background(0,255,0); } else { background(255,0,0); } What should we put in place of “//wifi is acti…

---

## [Storing multiple values of the mouse position in a class](https://discourse.processing.org/t/storing-multiple-values-of-the-mouse-position-in-a-class/13153)

<div class="topic-metadata">

**Author:** [@beardedalien](https://discourse.processing.org/u/beardedalien)\
**Replies:** 5\
**Last updated:** [August 4, 2019, 6:32pm UTC](https://discourse.processing.org/t/storing-multiple-values-of-the-mouse-position-in-a-class/13153 "2019-08-04T18:32:02Z")

</div>

Hello! I am trying to program a rectangular “layout” creator that allows the user to draw multiple rectangles across the screen referencing the initial mouse pressed and the following mouse released coordinates as values…

---

## [I need know vertex after rotate](https://discourse.processing.org/t/i-need-know-vertex-after-rotate/12719)

<div class="topic-metadata">

**Author:** [@NoName](https://discourse.processing.org/u/NoName)\
**Replies:** 21\
**Last updated:** [August 4, 2019, 2:10pm UTC](https://discourse.processing.org/t/i-need-know-vertex-after-rotate/12719 "2019-08-04T14:10:58Z")

</div>

How to find the coordinates of the already drawn Shape? More precisely, I need to know its vertex coordinates in order to work with them later. I would just count it from the point of creation, but I rotate it. Is the…

---

## [Line thickness in P3D](https://discourse.processing.org/t/line-thickness-in-p3d/12995)

<div class="topic-metadata">

**Author:** [@rapatski](https://discourse.processing.org/u/rapatski)\
**Replies:** 8\
**Last updated:** [August 3, 2019, 11:54pm UTC](https://discourse.processing.org/t/line-thickness-in-p3d/12995 "2019-08-03T23:54:26Z")

</div>

Hello everyone! Been a little while, and I enjoy exploring what Processing 3 has brought us. Have a rather simple question though transitioning from the old OpenGL way of thinking to the new P3D rendering – one being li…

---

## [Auto adjusting list](https://discourse.processing.org/t/auto-adjusting-list/13091)

<div class="topic-metadata">

**Author:** [@TrustyFox](https://discourse.processing.org/u/TrustyFox)\
**Replies:** 21\
**Last updated:** [August 3, 2019, 3:45pm UTC](https://discourse.processing.org/t/auto-adjusting-list/13091 "2019-08-03T15:45:57Z")

</div>

I’m trying to make a game kill feed in processing. It would have rectangles with text coming in from the top, every new rectangle would push down all the rectangles under it to make space. How should I go about making …

---

## [Image Processing program running just fine- added in variables and freezes](https://discourse.processing.org/t/image-processing-program-running-just-fine-added-in-variables-and-freezes/13132)

<div class="topic-metadata">

**Author:** [@eric](https://discourse.processing.org/u/eric)\
**Replies:** 3\
**Last updated:** [August 2, 2019, 9:52am UTC](https://discourse.processing.org/t/image-processing-program-running-just-fine-added-in-variables-and-freezes/13132 "2019-08-02T09:52:17Z")

</div>

I was tidying up my first ever program (that worked), wanting to make it adjust to different circumstances like any good code is able to do, I recognized numbers that were being used more than once in the same context an…

---

## [Map lat lng to a portion of the world map](https://discourse.processing.org/t/map-lat-lng-to-a-portion-of-the-world-map/13124)

<div class="topic-metadata">

**Author:** [@l-arc-en-ciel](https://discourse.processing.org/u/l-arc-en-ciel)\
**Replies:** 2\
**Last updated:** [August 2, 2019, 12:29am UTC](https://discourse.processing.org/t/map-lat-lng-to-a-portion-of-the-world-map/13124 "2019-08-02T00:29:09Z")

</div>

Hello, I want to project GPS coordinates on a screen of a specific size. This screen must not be representing the entire world map, but a small portion, something like 200 meters x 100 meters at a certain place . This …

---

## [Filling a vertex shape](https://discourse.processing.org/t/filling-a-vertex-shape/13099)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 12\
**Last updated:** [August 1, 2019, 8:59pm UTC](https://discourse.processing.org/t/filling-a-vertex-shape/13099 "2019-08-01T20:59:50Z")

</div>

Hi im attempting to create complex shapes using a ray casting and the vertex function to fill the space that the light touches as opposed to simply drawing the lines. At the moment the code works fine but requires me to …

---

## [Reveal bg image with circle following mouse](https://discourse.processing.org/t/reveal-bg-image-with-circle-following-mouse/13102)

<div class="topic-metadata">

**Author:** [@harkusch](https://discourse.processing.org/u/harkusch)\
**Replies:** 5\
**Last updated:** [August 1, 2019, 2:26pm UTC](https://discourse.processing.org/t/reveal-bg-image-with-circle-following-mouse/13102 "2019-08-01T14:26:57Z")

</div>

i have two layers, both are flat pictures. i want to uncover the lower picture with the mouse pointer. an circle has to follow the mouse. \>\>\>\> that’s what I´ve got right now. PVector theBallPosition; PVector theBallVelo…

---

## [Image Processing for measuring](https://discourse.processing.org/t/image-processing-for-measuring/13058)

<div class="topic-metadata">

**Author:** [@eric](https://discourse.processing.org/u/eric)\
**Replies:** 6\
**Last updated:** [August 1, 2019, 10:26am UTC](https://discourse.processing.org/t/image-processing-for-measuring/13058 "2019-08-01T10:26:24Z")

</div>

Hello, very new to the coding world, started last week learning, and have been searching around for a simple solution to my problem but can’t find anything specific. Here is my situation: My end goal is to have an app …

---

## [Arrow Keys and Death counter](https://discourse.processing.org/t/arrow-keys-and-death-counter/12825)

<div class="topic-metadata">

**Author:** [@Prantzz](https://discourse.processing.org/u/Prantzz)\
**Replies:** 11\
**Last updated:** [July 31, 2019, 9:19pm UTC](https://discourse.processing.org/t/arrow-keys-and-death-counter/12825 "2019-07-31T21:19:03Z")

</div>

Guys i need some help with player movement and death counter, here’s my code Main code: Player Player; enemy enemy; int score; int deaths; void setup() { size ( 640, 480); noStroke(); enemy = new enemy(); …

---

## [Using PGraphics convenience methods for drawing on PImage](https://discourse.processing.org/t/using-pgraphics-convenience-methods-for-drawing-on-pimage/13076)

<div class="topic-metadata">

**Author:** [@LoliProcessor](https://discourse.processing.org/u/LoliProcessor)\
**Replies:** 2\
**Last updated:** [July 31, 2019, 7:19am UTC](https://discourse.processing.org/t/using-pgraphics-convenience-methods-for-drawing-on-pimage/13076 "2019-07-31T07:19:40Z")

</div>

Is there any way to use the convenience methods of PGraphics ( rect, circle, line, etc ) on a PImage / to get a PGraphics from a PImage. Also, what is the easiest way to convert from PImage to a BufferedImage and the ot…

---

## [Circumcircle of Triangle](https://discourse.processing.org/t/circumcircle-of-triangle/13030)

<div class="topic-metadata">

**Author:** [@McTuble](https://discourse.processing.org/u/McTuble)\
**Replies:** 4\
**Last updated:** [July 30, 2019, 10:21pm UTC](https://discourse.processing.org/t/circumcircle-of-triangle/13030 "2019-07-30T22:21:07Z")

</div>

My ultimate goal in the use of this is to implement my own code to use for the Delaunay Triangulation algorithm. I hear all this talk about needing to find the circumcircle of a triangle and I am unsure about how to do t…

---

## [Save multiple PDFs during the sketch run](https://discourse.processing.org/t/save-multiple-pdfs-during-the-sketch-run/13015)

<div class="topic-metadata">

**Author:** [@Pvag](https://discourse.processing.org/u/Pvag)\
**Replies:** 3\
**Last updated:** [July 30, 2019, 1:30pm UTC](https://discourse.processing.org/t/save-multiple-pdfs-during-the-sketch-run/13015 "2019-07-30T13:30:55Z")

</div>

Hello, I would like to add this functionality to my sketch: save the drawing to a new pdf file, each time the key ‘s’ is pressed. In order to do this, I am using a PGraphics for the pdf, with a pdf renderer. When I disp…

---

## [How to apply two textures to the same PShape?](https://discourse.processing.org/t/how-to-apply-two-textures-to-the-same-pshape/5971)

<div class="topic-metadata">

**Author:** [@hamoid](https://discourse.processing.org/u/hamoid)\
**Replies:** 10\
**Last updated:** [July 30, 2019, 12:26pm UTC](https://discourse.processing.org/t/how-to-apply-two-textures-to-the-same-pshape/5971 "2019-07-30T12:26:42Z")

</div>

Hi, I have created some code that takes a polyline and creates a mesh surrounding the polyline (in the image there’s a bunch of them). Next I want to add a second texture to control the transparency. I want this mask …

---

## [Ball movement is stuttery. How to achieve smooth movement?](https://discourse.processing.org/t/ball-movement-is-stuttery-how-to-achieve-smooth-movement/12094)

<div class="topic-metadata">

**Author:** [@rusagent](https://discourse.processing.org/u/rusagent)\
**Replies:** 21\
**Last updated:** [July 30, 2019, 7:37am UTC](https://discourse.processing.org/t/ball-movement-is-stuttery-how-to-achieve-smooth-movement/12094 "2019-07-30T07:37:19Z")

</div>

I opened a SO article here: Hope it’s ok to post it https://stackoverflow.com/questions/56496427/my-ball-doesnt-move-smoothly-but-with-stutters-how-can-i-achieve-smoother-move Basically, i want to achieve smooth movemen…

---

## [What difference can the amount of parameters have for stroke()?](https://discourse.processing.org/t/what-difference-can-the-amount-of-parameters-have-for-stroke/12921)

<div class="topic-metadata">

**Author:** [@Ludmuterol](https://discourse.processing.org/u/Ludmuterol)\
**Replies:** 1\
**Last updated:** [July 23, 2019, 9:22pm UTC](https://discourse.processing.org/t/what-difference-can-the-amount-of-parameters-have-for-stroke/12921 "2019-07-23T21:22:21Z")

</div>

I have a project, which draws lines along Lissajous-like paths. Every now and then i want the line to change from one path to a newly generated one. In that moment i let the currentline disappear and the new one appear.…

---

## [Data Visualization with svg maps](https://discourse.processing.org/t/data-visualization-with-svg-maps/12966)

<div class="topic-metadata">

**Author:** [@NamanSharma](https://discourse.processing.org/u/NamanSharma)\
**Replies:** 2\
**Last updated:** [July 29, 2019, 5:42am UTC](https://discourse.processing.org/t/data-visualization-with-svg-maps/12966 "2019-07-29T05:42:01Z")

</div>

Hi guys. There used to be really good example of code to visualize the US election results on a SVG map. Could someone please help with that same or some similar code, as I want to build a similar thing for depicting wa…

---

## [How to break line using loadspring()?](https://discourse.processing.org/t/how-to-break-line-using-loadspring/12668)

<div class="topic-metadata">

**Author:** [@lolonulu](https://discourse.processing.org/u/lolonulu)\
**Replies:** 20\
**Last updated:** [July 28, 2019, 10:06pm UTC](https://discourse.processing.org/t/how-to-break-line-using-loadspring/12668 "2019-07-28T22:06:48Z")

</div>

Hello, I’d like to split my text into Strings and to move the same Strings to new coordinates. First when I split the text I don’t manage to insert a line break, how should I proceed? Thanks a lot in advance for your h…

---

## [\[SOLVED\] Slicing arrayList](https://discourse.processing.org/t/solved-slicing-arraylist/12974)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 2\
**Last updated:** [July 28, 2019, 6:42pm UTC](https://discourse.processing.org/t/solved-slicing-arraylist/12974 "2019-07-28T18:42:53Z")

</div>

Coming from a p5.js background, and I understand the use of slicing to make a copy of an array. This is done as setting a variable to the array you wish to copy makes a link which will modify the original arrays values s…

---

## [Rotate circle around it´s own center](https://discourse.processing.org/t/rotate-circle-around-it-s-own-center/12937)

<div class="topic-metadata">

**Author:** [@Sweetiefraise](https://discourse.processing.org/u/Sweetiefraise)\
**Replies:** 2\
**Last updated:** [July 28, 2019, 4:54pm UTC](https://discourse.processing.org/t/rotate-circle-around-it-s-own-center/12937 "2019-07-28T16:54:49Z")

</div>

I want to rotate the eyes of this bear inside de white circles, so I want to know what I shoould put there This part specifically: //left eye fill (#000000); strokeWeight(6); stroke (#050302); circle (320, 190, 50); fi…

---

## [Using another text renderer](https://discourse.processing.org/t/using-another-text-renderer/13016)

<div class="topic-metadata">

**Author:** [@clankill3r](https://discourse.processing.org/u/clankill3r)\
**Replies:** 4\
**Last updated:** [July 28, 2019, 2:05pm UTC](https://discourse.processing.org/t/using-another-text-renderer/13016 "2019-07-28T14:05:23Z")

</div>

I was looking if it was possible to render text a different way. For those who are interested: Not made user friendly yet. Unfortunately it needs PJOGL.profile = 1; so it’s kinda bad… import java.awt.Font; import c…

---

## [Correct practice line intersect](https://discourse.processing.org/t/correct-practice-line-intersect/13017)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 4\
**Last updated:** [July 27, 2019, 9:34pm UTC](https://discourse.processing.org/t/correct-practice-line-intersect/13017 "2019-07-27T21:34:31Z")

</div>

I’m trying to replicate a line line intersection algorithm whilst putting my own spin on it. Heres the code in Javascript from (Coding Math - youtube channel) ----- Amazing channel do check it out if you have time!!! N…

---

## [How can I use Thread() with functions that has inputs](https://discourse.processing.org/t/how-can-i-use-thread-with-functions-that-has-inputs/12964)

<div class="topic-metadata">

**Author:** [@Majorminus](https://discourse.processing.org/u/Majorminus)\
**Replies:** 4\
**Last updated:** [July 27, 2019, 1:35pm UTC](https://discourse.processing.org/t/how-can-i-use-thread-with-functions-that-has-inputs/12964 "2019-07-27T13:35:16Z")

</div>

Hi, I had to run some functions asynchronously and I found a function called “Thread()”. I’ve been using it easily with functions that have no inputs like… void Something(){ } thread("Something"); But I got a probl…

---

## [Processing not recognizing enum](https://discourse.processing.org/t/processing-not-recognizing-enum/12899)

<div class="topic-metadata">

**Author:** [@hey](https://discourse.processing.org/u/hey)\
**Replies:** 4\
**Last updated:** [July 26, 2019, 1:52pm UTC](https://discourse.processing.org/t/processing-not-recognizing-enum/12899 "2019-07-26T13:52:33Z")

</div>

I am trying to program an interpreter in Processing, and I’m trying to use enums. However, when I try to reference one of the values from the enum, Processing tells me that the value cannot be resolved into a variable.

---

## [Need help adding a border so my guy doesn't go off screen](https://discourse.processing.org/t/need-help-adding-a-border-so-my-guy-doesnt-go-off-screen/12987)

<div class="topic-metadata">

**Author:** [@kjiiller](https://discourse.processing.org/u/kjiiller)\
**Replies:** 3\
**Last updated:** [July 26, 2019, 11:56am UTC](https://discourse.processing.org/t/need-help-adding-a-border-so-my-guy-doesnt-go-off-screen/12987 "2019-07-26T11:56:26Z")

</div>

My code class player{ int x,y,spd,size; boolean\[\] keys=new boolean\[5\]; player(int x1,int y1,int spd1,int size1){ x=x1; y=y1; spd=spd1; size=size1; } void update(){ if(k…

---

## [Exporting and pictures issue](https://discourse.processing.org/t/exporting-and-pictures-issue/12931)

<div class="topic-metadata">

**Author:** [@gillyboat4](https://discourse.processing.org/u/gillyboat4)\
**Replies:** 6\
**Last updated:** [July 25, 2019, 12:59am UTC](https://discourse.processing.org/t/exporting-and-pictures-issue/12931 "2019-07-25T00:59:55Z")

</div>

In my experience, whenever I try to export a sketch containing a PImage, loadImage and image(); functions, the sketch will fail to load those parts. PImage I = loadImage(“hi.png”); image(I,0,0,100,100); this code when…

---

## [Bug with ArrayList](https://discourse.processing.org/t/bug-with-arraylist/5949)

<div class="topic-metadata">

**Author:** [@bitCrasher](https://discourse.processing.org/u/bitCrasher)\
**Replies:** 20\
**Last updated:** [November 26, 2018, 5:30pm UTC](https://discourse.processing.org/t/bug-with-arraylist/5949 "2018-11-26T17:30:37Z")

</div>

hi guys, I’m having a bug that I just can not solve, I think it’s a very stupid thing. in practice I would like this code to generate a map of points, which save in an arreyList, and then that there are 4 lines that in…

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

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