# Latest

**URL:** https://discourse.processing.org/latest.md?page=177

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

**Page:** 178

---

## [Difference between directionalLight() and pointLight() on basic 3D shapes and P5.Geometry shapes](https://discourse.processing.org/t/difference-between-directionallight-and-pointlight-on-basic-3d-shapes-and-p5-geometry-shapes/33419)

<div class="topic-metadata">

**Author:** [@J\_Silva](https://discourse.processing.org/u/J_Silva)\
**Replies:** 8\
**Last updated:** [November 15, 2021, 6:09am UTC](https://discourse.processing.org/t/difference-between-directionallight-and-pointlight-on-basic-3d-shapes-and-p5-geometry-shapes/33419 "2021-11-15T06:09:31Z")

</div>

Hi. When using directionalLight() I need to give a negative z value to actually see the light. If I understand it well the z value is positive towards the ‘viewer’, and that’s what happens when I use a positive z value…

---

## [Anti-aliased edges in WEBGL mode in p5js](https://discourse.processing.org/t/anti-aliased-edges-in-webgl-mode-in-p5js/33524)

<div class="topic-metadata">

**Author:** [@ippsketch](https://discourse.processing.org/u/ippsketch)\
**Replies:** 0\
**Last updated:** [November 15, 2021, 5:19am UTC](https://discourse.processing.org/t/anti-aliased-edges-in-webgl-mode-in-p5js/33524 "2021-11-15T05:19:35Z")

</div>

Shape edges are jagged in p5js WEBGL mode compared to the default 2D mode. smooth() and setAttributes(‘antialias’,true) did not work or improve this. Does anyone know how to achieve clean anti-aliased edges for p5js WE…

---

## [Help with processing and minim on Raspberry Pi](https://discourse.processing.org/t/help-with-processing-and-minim-on-raspberry-pi/33523)

<div class="topic-metadata">

**Author:** [@cupofjava](https://discourse.processing.org/u/cupofjava)\
**Replies:** 0\
**Last updated:** [November 15, 2021, 5:16am UTC](https://discourse.processing.org/t/help-with-processing-and-minim-on-raspberry-pi/33523 "2021-11-15T05:16:53Z")

</div>

Beginner programming student here. I’ve decided to take what I’ve done outside the classroom and have started fiddling around with java programming, a raspberry pi and some electronics. I’ve written a program using the m…

---

## [Setting a value once by turning off a boolean doesn't work](https://discourse.processing.org/t/setting-a-value-once-by-turning-off-a-boolean-doesnt-work/33467)

<div class="topic-metadata">

**Author:** [@Kenga123456](https://discourse.processing.org/u/Kenga123456)\
**Replies:** 6\
**Last updated:** [November 15, 2021, 1:28am UTC](https://discourse.processing.org/t/setting-a-value-once-by-turning-off-a-boolean-doesnt-work/33467 "2021-11-15T01:28:01Z")

</div>

float x1 = random(50, 450); float y1 = random(50, 450); int size1 = 100; float inc1X = 3; float inc1Y = 3; float x2 =x1; float y2 = x1; int size2 = 50; float inc2X = 3; float inc2Y = 3; boolean place1 = true; …

---

## [Processing 3 Object Class not Being Displayed](https://discourse.processing.org/t/processing-3-object-class-not-being-displayed/33508)

<div class="topic-metadata">

**Author:** [@sebest\_design](https://discourse.processing.org/u/sebest_design)\
**Replies:** 2\
**Last updated:** [November 14, 2021, 9:49pm UTC](https://discourse.processing.org/t/processing-3-object-class-not-being-displayed/33508 "2021-11-14T21:49:55Z")

</div>

Hi. I am a total noob to object classes. I do not know what I am doing wrong. Here’s an image of the prototype: I am trying to create an object class for the encircled cards. I have saved the class on a separate pag…

---

## [Processing 3 Translate and Rotate function taking triangle out of canvas](https://discourse.processing.org/t/processing-3-translate-and-rotate-function-taking-triangle-out-of-canvas/33509)

<div class="topic-metadata">

**Author:** [@sebest\_design](https://discourse.processing.org/u/sebest_design)\
**Replies:** 1\
**Last updated:** [November 14, 2021, 6:14pm UTC](https://discourse.processing.org/t/processing-3-translate-and-rotate-function-taking-triangle-out-of-canvas/33509 "2021-11-14T18:14:34Z")

</div>

Hi. I am trying to horizontally flip a triangle and have it placed on the canvas. I want to create buttons for a carousel slide… Here’s the code: //Buttons noStroke(); triangle(triangleRX1, triangleRY1, triangleRX2and3,…

---

## [Using substring. What am I doing wrong?](https://discourse.processing.org/t/using-substring-what-am-i-doing-wrong/33503)

<div class="topic-metadata">

**Author:** [@FlyingApple](https://discourse.processing.org/u/FlyingApple)\
**Replies:** 2\
**Last updated:** [November 14, 2021, 3:02pm UTC](https://discourse.processing.org/t/using-substring-what-am-i-doing-wrong/33503 "2021-11-14T15:02:55Z")

</div>

println(p.state.substring(0,1), p.state); if (p.state.substring(0,1) == "W") { println("this is a test"); } p.state is “WPawn” p.state.substring(0, 1) is “W” However, “this is a test” is not being printed and I have…

---

## [Processing 4.0 is not starting](https://discourse.processing.org/t/processing-4-0-is-not-starting/33490)

<div class="topic-metadata">

**Author:** [@alex119](https://discourse.processing.org/u/alex119)\
**Replies:** 0\
**Last updated:** [November 13, 2021, 6:18pm UTC](https://discourse.processing.org/t/processing-4-0-is-not-starting/33490 "2021-11-13T18:18:47Z")

</div>

Hello, I have a problem. I deleted the old processing (3.0 version )and installed the 4th version. When I start processing it appears an error: “Could not load Java Mode, please reinstall Processing”. I tried to inst…

---

## [Connecting MySQL database with Processing](https://discourse.processing.org/t/connecting-mysql-database-with-processing/33349)

<div class="topic-metadata">

**Author:** [@Arabesque0210](https://discourse.processing.org/u/Arabesque0210)\
**Replies:** 4\
**Last updated:** [November 14, 2021, 12:54am UTC](https://discourse.processing.org/t/connecting-mysql-database-with-processing/33349 "2021-11-14T00:54:08Z")

</div>

Hi, I’m trying to use the data from mysql as text to complete my processing project. I thought it would be easy to find some tutorials about it, but maybe I made some mistakes, I only found a few very old methods and not…

---

## [Get alpha value from pixels array](https://discourse.processing.org/t/get-alpha-value-from-pixels-array/33479)

<div class="topic-metadata">

**Author:** [@bobodoustaud](https://discourse.processing.org/u/bobodoustaud)\
**Replies:** 3\
**Last updated:** [November 13, 2021, 11:15pm UTC](https://discourse.processing.org/t/get-alpha-value-from-pixels-array/33479 "2021-11-13T23:15:14Z")

</div>

So i opened a png with transparent pixels in a new PGraphics object. If i load it and render it in the main canvas, it has transparency, which means that the PGraphics background is transparent. But if i create a pixel …

---

## [Mandelbrot set explorer V0 - Super Zoom](https://discourse.processing.org/t/mandelbrot-set-explorer-v0-super-zoom/33487)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 2\
**Last updated:** [November 13, 2021, 7:58pm UTC](https://discourse.processing.org/t/mandelbrot-set-explorer-v0-super-zoom/33487 "2021-11-13T19:58:57Z")

</div>

Hello everyone! After a long time of struggling with the scroll to zoom feature, I finally made it! This program can zoom into the mandelbrot set with huge accuracy. The largest zoom is 10^-17. That means that for ever…

---

## [Standing a Cube on its Corner](https://discourse.processing.org/t/standing-a-cube-on-its-corner/33477)

<div class="topic-metadata">

**Author:** [@kingnine](https://discourse.processing.org/u/kingnine)\
**Replies:** 1\
**Last updated:** [November 13, 2021, 1:14am UTC](https://discourse.processing.org/t/standing-a-cube-on-its-corner/33477 "2021-11-13T01:14:53Z")

</div>

Hi all, I have a question that sounds incredibly simple, but is proving very challenging, and I think it would be educational for me to learn where I’m going wrong. All I’m trying to do is make a cube and stand it on it…

---

## [Line loop to create volume](https://discourse.processing.org/t/line-loop-to-create-volume/33447)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 9\
**Last updated:** [November 13, 2021, 4:49pm UTC](https://discourse.processing.org/t/line-loop-to-create-volume/33447 "2021-11-13T16:49:30Z")

</div>

Hi there! I am practising with loops and I would like to create something similar to the black picture attached. I have made a loop and I have made this: As you can see, I would need: To increase gradually the …

---

## [G4P - Each window is displayed for a moment on the display](https://discourse.processing.org/t/g4p-each-window-is-displayed-for-a-moment-on-the-display/33486)

<div class="topic-metadata">

**Author:** [@csokasi](https://discourse.processing.org/u/csokasi)\
**Replies:** 0\
**Last updated:** [November 13, 2021, 10:13am UTC](https://discourse.processing.org/t/g4p-each-window-is-displayed-for-a-moment-on-the-display/33486 "2021-11-13T10:13:31Z")

</div>

import g4p\_controls.\*; public void setup(){ size(480, 320, JAVA2D); createGUI(); // Each window is displayed for a moment on the display. // I want this to happen in the background. customGU…

---

## [Needs help scaling my project to the correct size](https://discourse.processing.org/t/needs-help-scaling-my-project-to-the-correct-size/33414)

<div class="topic-metadata">

**Author:** [@timtam198](https://discourse.processing.org/u/timtam198)\
**Replies:** 1\
**Last updated:** [November 13, 2021, 9:44am UTC](https://discourse.processing.org/t/needs-help-scaling-my-project-to-the-correct-size/33414 "2021-11-13T09:44:49Z")

</div>

Hello, does anyone know how to make my object stay the same size even when the canvas size changes? I am currently using windowWidth/Height for my canvas size and while it look great like this, my shapes distorts we…

---

## [Adapt display window size to image](https://discourse.processing.org/t/adapt-display-window-size-to-image/33472)

<div class="topic-metadata">

**Author:** [@elemau](https://discourse.processing.org/u/elemau)\
**Replies:** 2\
**Last updated:** [November 12, 2021, 4:48pm UTC](https://discourse.processing.org/t/adapt-display-window-size-to-image/33472 "2021-11-12T16:48:31Z")

</div>

I want to simply adapt the display window size to the image I load. I read that with processing3 it is not possible anymore to use variables for defining size and that it is necessary to use settings. I tried but it doe…

---

## [How to add library from github to openprocessing p5js sketch?](https://discourse.processing.org/t/how-to-add-library-from-github-to-openprocessing-p5js-sketch/33468)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 4\
**Last updated:** [November 12, 2021, 3:42pm UTC](https://discourse.processing.org/t/how-to-add-library-from-github-to-openprocessing-p5js-sketch/33468 "2021-11-12T15:42:00Z")

</div>

I want to add this library to this sketch but I cant figure out how to do it. how to I do this?

---

## [Creating a death animation for snake](https://discourse.processing.org/t/creating-a-death-animation-for-snake/33475)

<div class="topic-metadata">

**Author:** [@Addvac](https://discourse.processing.org/u/Addvac)\
**Replies:** 0\
**Last updated:** [November 12, 2021, 2:47pm UTC](https://discourse.processing.org/t/creating-a-death-animation-for-snake/33475 "2021-11-12T14:47:16Z")

</div>

//Defining necessary variables and arrays ArrayList\<Integer\> x = new ArrayList\<Integer\>(), y = new ArrayList\<Integer\>(); //creates array lists for the x and y positions of the snake int …

---

## [Is the pixels offset calculation correct in the p5.js reference?](https://discourse.processing.org/t/is-the-pixels-offset-calculation-correct-in-the-p5-js-reference/33460)

<div class="topic-metadata">

**Author:** [@hamoid](https://discourse.processing.org/u/hamoid)\
**Replies:** 2\
**Last updated:** [November 12, 2021, 8:24am UTC](https://discourse.processing.org/t/is-the-pixels-offset-calculation-correct-in-the-p5-js-reference/33460 "2021-11-12T08:24:55Z")

</div>

Hi hi, I’m using the webcam on a high dpi tablet, showing the webcam image and overlaying a few rectangles matching the webcam pixel color below. I based my code on the reference: // From https://p5js.org/reference/#/p…

---

## [Help with incorporating mic inputs into my visuals](https://discourse.processing.org/t/help-with-incorporating-mic-inputs-into-my-visuals/33448)

<div class="topic-metadata">

**Author:** [@YourLocalGrandma](https://discourse.processing.org/u/YourLocalGrandma)\
**Replies:** 0\
**Last updated:** [November 10, 2021, 9:46pm UTC](https://discourse.processing.org/t/help-with-incorporating-mic-inputs-into-my-visuals/33448 "2021-11-10T21:46:45Z")

</div>

Hi Guys, would love it if someone could point me in the right direction here because I’m very stuck. My goal is to use the mic inputs to move the amplitude of the lines across the screen, creating sort of a sound visuali…

---

## [Make a realtime serial plotter](https://discourse.processing.org/t/make-a-realtime-serial-plotter/33438)

<div class="topic-metadata">

**Author:** [@anwar05](https://discourse.processing.org/u/anwar05)\
**Replies:** 12\
**Last updated:** [November 11, 2021, 9:31pm UTC](https://discourse.processing.org/t/make-a-realtime-serial-plotter/33438 "2021-11-11T21:31:32Z")

</div>

Hello, I want to ask about the real time serial plotter, I have downloaded it from Sebastian Nilsson’s github, and have modified it as needed. But I’m confused to make my serial value as input update in the graph I creat…

---

## [Russian letter android](https://discourse.processing.org/t/russian-letter-android/33462)

<div class="topic-metadata">

**Author:** [@Filatov](https://discourse.processing.org/u/Filatov)\
**Replies:** 0\
**Last updated:** [November 11, 2021, 5:12pm UTC](https://discourse.processing.org/t/russian-letter-android/33462 "2021-11-11T17:12:25Z")

</div>

Hello. Tell me how you can use the Russian language in the text output in the application. Shows the broken encoding. I also tried to load fonts, it does not display. I’m using Processing3. I looked at the forum, ther…

---

## [Skia Graphics Library as a renderer in Processing](https://discourse.processing.org/t/skia-graphics-library-as-a-renderer-in-processing/25580)

<div class="topic-metadata">

**Author:** [@micycle](https://discourse.processing.org/u/micycle)\
**Replies:** 21\
**Last updated:** [November 11, 2021, 4:45pm UTC](https://discourse.processing.org/t/skia-graphics-library-as-a-renderer-in-processing/25580 "2021-11-11T16:45:39Z")

</div>

I’ve just developed a small library to enable you to use Google’s Open Source Skia Graphics Library (via Skija) as a rendering engine for Processing. README, a basic example and .jars here: Because Skija targets JOGL…

---

## [No idea what happened, getting a weird effect](https://discourse.processing.org/t/no-idea-what-happened-getting-a-weird-effect/33459)

<div class="topic-metadata">

**Author:** [@Kenga123456](https://discourse.processing.org/u/Kenga123456)\
**Replies:** 0\
**Last updated:** [November 11, 2021, 2:24pm UTC](https://discourse.processing.org/t/no-idea-what-happened-getting-a-weird-effect/33459 "2021-11-11T14:24:24Z")

</div>

int x = 10; int y = 10; int spacingX = 10; int spacingY = 10; int scalingNot = 255; void setup() { size(500, 500); } void draw () { background(255); for (int x = 0; x \< width; x = x + spacingX) { for (int y = 0; …

---

## [Text following a sine wave pattern](https://discourse.processing.org/t/text-following-a-sine-wave-pattern/33453)

<div class="topic-metadata">

**Author:** [@clintonva32](https://discourse.processing.org/u/clintonva32)\
**Replies:** 3\
**Last updated:** [November 11, 2021, 11:02am UTC](https://discourse.processing.org/t/text-following-a-sine-wave-pattern/33453 "2021-11-11T11:02:20Z")

</div>

Hi. Trying to get some help with this code. Pretty much want to have each letter in the string be a part of a sine wave. Any idea how to do this? My code seems to be stacking each letter on top of each other. Might be th…

---

## [Converting Vectors to vertices in py5](https://discourse.processing.org/t/converting-vectors-to-vertices-in-py5/33454)

<div class="topic-metadata">

**Author:** [@monkstone](https://discourse.processing.org/u/monkstone)\
**Replies:** 0\
**Last updated:** [November 11, 2021, 7:47am UTC](https://discourse.processing.org/t/converting-vectors-to-vertices-in-py5/33454 "2021-11-11T07:47:15Z")

</div>

Previously I reported on creating a Vec2D class for py5 and using it to create sketches. Now I’ve added a (work in progress) Vec3D class. I have found a neat way to use py5.vertices with both vector types, by implementin…

---

## [My side scroller has a problem finding where the ground is](https://discourse.processing.org/t/my-side-scroller-has-a-problem-finding-where-the-ground-is/33444)

<div class="topic-metadata">

**Author:** [@DividedRabbit](https://discourse.processing.org/u/DividedRabbit)\
**Replies:** 4\
**Last updated:** [November 11, 2021, 6:41am UTC](https://discourse.processing.org/t/my-side-scroller-has-a-problem-finding-where-the-ground-is/33444 "2021-11-11T06:41:16Z")

</div>

https://drive.google.com/drive/folders/1qZGnHtEltQCCeqCsDzOSHIyZKUQMSOJt?usp=sharing Here is the drive with all of my code. I am trying to use a linear equation to determine the height of the ground, but for some reason…

---

## [Android notification pls help](https://discourse.processing.org/t/android-notification-pls-help/33309)

<div class="topic-metadata">

**Author:** [@MonteliaRO](https://discourse.processing.org/u/MonteliaRO)\
**Replies:** 6\
**Last updated:** [November 11, 2021, 12:17am UTC](https://discourse.processing.org/t/android-notification-pls-help/33309 "2021-11-11T00:17:37Z")

</div>

Hello i want thus and i found thus Code but don’t Work! import android.app.NotificationChannel; import android.app.NotificationManager; import android.support.v4.app.NotificationCompat; import android.support.v4.app.N…

---

## [Getting yellow color despite only entering one value on fill()](https://discourse.processing.org/t/getting-yellow-color-despite-only-entering-one-value-on-fill/33446)

<div class="topic-metadata">

**Author:** [@Kenga123456](https://discourse.processing.org/u/Kenga123456)\
**Replies:** 3\
**Last updated:** [November 10, 2021, 8:43pm UTC](https://discourse.processing.org/t/getting-yellow-color-despite-only-entering-one-value-on-fill/33446 "2021-11-10T20:43:10Z")

</div>

int x = 10; int y = 10; int spacingX = 10; int spacingY = 10; void setup() { size(500, 500); } void draw () { background(255); for (int x = 0; x \< width; x = x + spacingX) { for (int y = 0; y \< height; y = y + sp…

---

## [Grid of rectangles produces weird triangle pattern](https://discourse.processing.org/t/grid-of-rectangles-produces-weird-triangle-pattern/33432)

<div class="topic-metadata">

**Author:** [@UnusualUsual](https://discourse.processing.org/u/UnusualUsual)\
**Replies:** 3\
**Last updated:** [November 10, 2021, 5:29pm UTC](https://discourse.processing.org/t/grid-of-rectangles-produces-weird-triangle-pattern/33432 "2021-11-10T17:29:55Z")

</div>

I’m creating a grid of black rectangles on a white background and for some reason unknown to me, part of some rectangles are split and pushed up a pixel to make a weird triangle looking thing in the middle of the grid. …

[Previous page](https://discourse.processing.org/latest.md?page=176)

[Next page](https://discourse.processing.org/latest.md?page=178)
