# Latest

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

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

**Page:** 531

---

## [Function keyPressed problems](https://discourse.processing.org/t/function-keypressed-problems/7924)

<div class="topic-metadata">

**Author:** [@hiitisme](https://discourse.processing.org/u/hiitisme)\
**Replies:** 1\
**Last updated:** [January 29, 2019, 9:19am UTC](https://discourse.processing.org/t/function-keypressed-problems/7924 "2019-01-29T09:19:29Z")

</div>

I am trying to make controls to my game. I am very new to javascript and other programming languages. I have made the controls, but they aren’t that smooth. when you take a sharp turn you just stop. Can someone help me m…

---

## [Make button disappear when clicked](https://discourse.processing.org/t/make-button-disappear-when-clicked/7916)

<div class="topic-metadata">

**Author:** [@madsstella](https://discourse.processing.org/u/madsstella)\
**Replies:** 2\
**Last updated:** [January 29, 2019, 3:20am UTC](https://discourse.processing.org/t/make-button-disappear-when-clicked/7916 "2019-01-29T03:20:49Z")

</div>

I know this is simple, probably. I just can’t figure it out on my own :frowning: I want to make an interactive character builder through asking questions and choosing options. I got the start menu up, with a button that …

---

## [Trying to draw grid of rotated rectangles -- not centering?](https://discourse.processing.org/t/trying-to-draw-grid-of-rotated-rectangles-not-centering/7906)

<div class="topic-metadata">

**Author:** [@sorenkirk](https://discourse.processing.org/u/sorenkirk)\
**Replies:** 3\
**Last updated:** [January 29, 2019, 3:07am UTC](https://discourse.processing.org/t/trying-to-draw-grid-of-rotated-rectangles-not-centering/7906 "2019-01-29T03:07:44Z")

</div>

I am trying to simply draw a centered grid of 5 rectangles but (1) the grid is not centered and (2) it draws 6. Can anyone help me out on what I’m doing wrong? int margin = 150; int rectH = 60; int rectW = 20; int n\_rec…

---

## [Multiple Objects question](https://discourse.processing.org/t/multiple-objects-question/7910)

<div class="topic-metadata">

**Author:** [@CodeTime](https://discourse.processing.org/u/CodeTime)\
**Replies:** 2\
**Last updated:** [January 29, 2019, 1:47am UTC](https://discourse.processing.org/t/multiple-objects-question/7910 "2019-01-29T01:47:58Z")

</div>

So I am trying to make chess with my limited knowledge and got stuck at a part. I have two objects (two white pawns) on the board but if I move them, they leave behind themselves as they are dragged across the screen. Th…

---

## [Convert java bufferedimage to PImage](https://discourse.processing.org/t/convert-java-bufferedimage-to-pimage/3059)

<div class="topic-metadata">

**Author:** [@sulin](https://discourse.processing.org/u/sulin)\
**Replies:** 12\
**Last updated:** [January 28, 2019, 10:44pm UTC](https://discourse.processing.org/t/convert-java-bufferedimage-to-pimage/3059 "2019-01-28T22:44:55Z")

</div>

I am using processing.core in java to work with layered psd images using TwelveMonkeys imageIO plugins. I can successfully read and display the layers of the image using swift but cant seem to figure out how to convert t…

---

## [The package “META” does not exist. You might be missing a library](https://discourse.processing.org/t/the-package-meta-does-not-exist-you-might-be-missing-a-library/7912)

<div class="topic-metadata">

**Author:** [@clankill3r](https://discourse.processing.org/u/clankill3r)\
**Replies:** 0\
**Last updated:** [January 28, 2019, 9:25pm UTC](https://discourse.processing.org/t/the-package-meta-does-not-exist-you-might-be-missing-a-library/7912 "2019-01-28T21:25:43Z")

</div>

I try to use the library byte-buddy. Located here: https://mvnrepository.com/artifact/net.bytebuddy/byte-buddy/1.9.2 In VSCode it works fine but now I want to use it in processing. When dragging it on a sketch (so it…

---

## [Change line() color in a nested while-loop](https://discourse.processing.org/t/change-line-color-in-a-nested-while-loop/7421)

<div class="topic-metadata">

**Author:** [@anon98404100](https://discourse.processing.org/u/anon98404100)\
**Replies:** 6\
**Last updated:** [January 28, 2019, 8:23pm UTC](https://discourse.processing.org/t/change-line-color-in-a-nested-while-loop/7421 "2019-01-28T20:23:46Z")

</div>

I am doing a small assignment that requires the following: I have to create a while-loop that draws 30 lines on-screen. Line number 7 and line number 23 should be colored red. Because I am still trying to figure things…

---

## [Unsupported OpenType signature \<!DO](https://discourse.processing.org/t/unsupported-opentype-signature-do/7459)

<div class="topic-metadata">

**Author:** [@Pyrros](https://discourse.processing.org/u/Pyrros)\
**Replies:** 3\
**Last updated:** [January 28, 2019, 8:10pm UTC](https://discourse.processing.org/t/unsupported-opentype-signature-do/7459 "2019-01-28T20:10:42Z")

</div>

I am working on klimablomst.tk and using Firebase as hosting, database and storage provider. I have successfully implemented the first two, but I am having some trouble with storage. I am unsure if the problem is server-…

---

## [Adding the twirl effect to the background in p5js](https://discourse.processing.org/t/adding-the-twirl-effect-to-the-background-in-p5js/7875)

<div class="topic-metadata">

**Author:** [@Gwerbyn](https://discourse.processing.org/u/Gwerbyn)\
**Replies:** 1\
**Last updated:** [January 28, 2019, 6:55pm UTC](https://discourse.processing.org/t/adding-the-twirl-effect-to-the-background-in-p5js/7875 "2019-01-28T18:55:34Z")

</div>

Is there any way to create the twirl effect to the background in p5js?? I want to be able to do stuff like this: https://gyazo.com/7380ed923b08a07f632e4106fa0fb56e with code. If anyone knows how to do this i would really…

---

## [Giving variable thickness to a line (calculating normals)](https://discourse.processing.org/t/giving-variable-thickness-to-a-line-calculating-normals/5890)

<div class="topic-metadata">

**Author:** [@hamoid](https://discourse.processing.org/u/hamoid)\
**Replies:** 4\
**Last updated:** [January 28, 2019, 6:35pm UTC](https://discourse.processing.org/t/giving-variable-thickness-to-a-line-calculating-normals/5890 "2019-01-28T18:35:32Z")

</div>

ArrayList\<PVector\> points; ArrayList\<PVector\> normals; void setup() { size(400, 400); background(255); // 1. Define polyline points points = new ArrayList\<PVector\>(); points.add(new PVector(61, 183)); poi…

---

## [Inverse matrix and linear equation](https://discourse.processing.org/t/inverse-matrix-and-linear-equation/7711)

<div class="topic-metadata">

**Author:** [@Feltopi](https://discourse.processing.org/u/Feltopi)\
**Replies:** 5\
**Last updated:** [January 27, 2019, 10:59pm UTC](https://discourse.processing.org/t/inverse-matrix-and-linear-equation/7711 "2019-01-27T22:59:31Z")

</div>

Hello there, is there any way to make inverse matrix to solve linear equation, or any other way of doing it? Im new to programing and processing itself, but i would like to make a program to building statics, which inv…

---

## [How to embed a Processing sketch onto an HTML](https://discourse.processing.org/t/how-to-embed-a-processing-sketch-onto-an-html/7265)

<div class="topic-metadata">

**Author:** [@delorean](https://discourse.processing.org/u/delorean)\
**Replies:** 6\
**Last updated:** [January 28, 2019, 2:21pm UTC](https://discourse.processing.org/t/how-to-embed-a-processing-sketch-onto-an-html/7265 "2019-01-28T14:21:47Z")

</div>

Hi everyone, I’m very new to processing and programming, I hope you can help, I have bee trying to embed a Processing sketch onto an HTML using this information: https://cs.nyu.edu/~kapp/cs101/processing\_on\_the\_web/ th…

---

## [\[SOLVED\] Strange behavior using PGraphics as a recursive draw buffer](https://discourse.processing.org/t/solved-strange-behavior-using-pgraphics-as-a-recursive-draw-buffer/7699)

<div class="topic-metadata">

**Author:** [@picunrelated](https://discourse.processing.org/u/picunrelated)\
**Replies:** 9\
**Last updated:** [January 28, 2019, 10:05am UTC](https://discourse.processing.org/t/solved-strange-behavior-using-pgraphics-as-a-recursive-draw-buffer/7699 "2019-01-28T10:05:13Z")

</div>

Recently, I’ve been attempting to recreate a lot of my old Adobe Flash visualizations using Processing. Unfortunately, certain things seem to be much more difficult in Processing, at least for me right now. One thing I…

---

## [GLSL Shader on 3D Ring not working](https://discourse.processing.org/t/glsl-shader-on-3d-ring-not-working/7757)

<div class="topic-metadata">

**Author:** [@pblancos](https://discourse.processing.org/u/pblancos)\
**Replies:** 11\
**Last updated:** [January 28, 2019, 9:09am UTC](https://discourse.processing.org/t/glsl-shader-on-3d-ring-not-working/7757 "2019-01-28T09:09:07Z")

</div>

I’m try to map GLSL texture shader to 3D ring, I’ve got little working, but I think i’m miss some translation to 3D (i think), as it’s mapping it to 2D. I try use fragment from processing site. Where am I going wrong? s…

---

## [Functions that don't have to be called](https://discourse.processing.org/t/functions-that-dont-have-to-be-called/7829)

<div class="topic-metadata">

**Author:** [@germaine](https://discourse.processing.org/u/germaine)\
**Replies:** 4\
**Last updated:** [January 28, 2019, 4:14am UTC](https://discourse.processing.org/t/functions-that-dont-have-to-be-called/7829 "2019-01-28T04:14:24Z")

</div>

I’m used to writing functions and then calling them in draw() or setup(), but in other people’s sketches, I’ve found functions that clearly run but don’t seem to be called or referenced anywhere else in the code. Am I ju…

---

## [Issue communicating with Arduino](https://discourse.processing.org/t/issue-communicating-with-arduino/7847)

<div class="topic-metadata">

**Author:** [@Ryan12](https://discourse.processing.org/u/Ryan12)\
**Replies:** 2\
**Last updated:** [January 28, 2019, 5:36am UTC](https://discourse.processing.org/t/issue-communicating-with-arduino/7847 "2019-01-28T05:36:00Z")

</div>

I have a phototransistor and an LED, when I test in Arduino I do get readings from the phototransistor, but when trying to get the same readings in Processing I just get continuous 0’s. Can any one help? I’ve placed the …

---

## [How do I include p5-dom when importing from npm module/instance mode?](https://discourse.processing.org/t/how-do-i-include-p5-dom-when-importing-from-npm-module-instance-mode/7893)

<div class="topic-metadata">

**Author:** [@davidjj](https://discourse.processing.org/u/davidjj)\
**Replies:** 1\
**Last updated:** [January 28, 2019, 5:26am UTC](https://discourse.processing.org/t/how-do-i-include-p5-dom-when-importing-from-npm-module-instance-mode/7893 "2019-01-28T05:26:46Z")

</div>

The instructions for including p5 libraries just says to include them in the head file. However, I’m using it instance mode, for use with react, like: componentDidMount() { import("p5").then((p5) =\> { …

---

## [Narrowing down numbers for a guessing game](https://discourse.processing.org/t/narrowing-down-numbers-for-a-guessing-game/7754)

<div class="topic-metadata">

**Author:** [@dennisreyes](https://discourse.processing.org/u/dennisreyes)\
**Replies:** 3\
**Last updated:** [January 28, 2019, 2:50am UTC](https://discourse.processing.org/t/narrowing-down-numbers-for-a-guessing-game/7754 "2019-01-28T02:50:24Z")

</div>

Hi! I have a project in which I need to make a number guessing game. I’ve already figured how to the code for asking the user to guess lower or higher but another component was that the game should be able to narrow down…

---

## [Strange Behavior Triggered by image() Function](https://discourse.processing.org/t/strange-behavior-triggered-by-image-function/7638)

<div class="topic-metadata">

**Author:** [@JackWitherell](https://discourse.processing.org/u/JackWitherell)\
**Replies:** 19\
**Last updated:** [January 28, 2019, 1:30am UTC](https://discourse.processing.org/t/strange-behavior-triggered-by-image-function/7638 "2019-01-28T01:30:51Z")

</div>

Hey there. First post, haven’t figured out if there’s anywhere else I could go for similar questions, thought I should ask here before creating an issue on Processing’s github issues board. I’ve found some really strang…

---

## [Collision with curved vertex](https://discourse.processing.org/t/collision-with-curved-vertex/7818)

<div class="topic-metadata">

**Author:** [@animofa](https://discourse.processing.org/u/animofa)\
**Replies:** 4\
**Last updated:** [January 28, 2019, 1:02am UTC](https://discourse.processing.org/t/collision-with-curved-vertex/7818 "2019-01-28T01:02:11Z")

</div>

Hello everyone, I am trying to make a simple game where one object is moving between to curvedVertexes. Now I want to add an event incase the object is colliding with the obstacles aka the curvedVertexes. I have found …

---

## [Ml5 style transfer using p5](https://discourse.processing.org/t/ml5-style-transfer-using-p5/7180)

<div class="topic-metadata">

**Author:** [@byou](https://discourse.processing.org/u/byou)\
**Replies:** 1\
**Last updated:** [January 27, 2019, 9:51pm UTC](https://discourse.processing.org/t/ml5-style-transfer-using-p5/7180 "2019-01-27T21:51:16Z")

</div>

Hello, I’m running into a strange problem when trying out the ml5 style transfer example and wonder if anyone might have any idea why. My models are being loaded and performing the transfer fine, but when I get the styl…

---

## [New Functions in PROCESSING 3.5](https://discourse.processing.org/t/new-functions-in-processing-3-5/7723)

<div class="topic-metadata">

**Author:** [@jonzamarripa](https://discourse.processing.org/u/jonzamarripa)\
**Replies:** 8\
**Last updated:** [January 27, 2019, 8:32pm UTC](https://discourse.processing.org/t/new-functions-in-processing-3-5/7723 "2019-01-27T20:32:35Z")

</div>

I just updated my processing to 3.5 and I saw that they added circle () and square() Does anyone know the syntax and parameters of these functions? I think it’s exciting to have these new features.

---

## [How to change the color of objects near mouse click location or add a new object on mouseClick in p5.js?](https://discourse.processing.org/t/how-to-change-the-color-of-objects-near-mouse-click-location-or-add-a-new-object-on-mouseclick-in-p5-js/7884)

<div class="topic-metadata">

**Author:** [@blkpanther](https://discourse.processing.org/u/blkpanther)\
**Replies:** 0\
**Last updated:** [January 27, 2019, 5:00pm UTC](https://discourse.processing.org/t/how-to-change-the-color-of-objects-near-mouse-click-location-or-add-a-new-object-on-mouseclick-in-p5-js/7884 "2019-01-27T17:00:08Z")

</div>

Hi, I have an array of ellipse object as below, and intend to change the color of ellipses near the mouse click, but the mouseIsPressed portion of code is not working. What could have gone wrong? Thanks in advance for an…

---

## [Use the audiocontext as audio input in p5.js](https://discourse.processing.org/t/use-the-audiocontext-as-audio-input-in-p5-js/7879)

<div class="topic-metadata">

**Author:** [@rob1](https://discourse.processing.org/u/rob1)\
**Replies:** 0\
**Last updated:** [January 27, 2019, 2:20pm UTC](https://discourse.processing.org/t/use-the-audiocontext-as-audio-input-in-p5-js/7879 "2019-01-27T14:20:23Z")

</div>

I am implementing a syntheziser wich uses the nodes of the audio-api to generate sound and my goal is to visualize it using p5. I currently have a script that analyzes audio with fft and visualizes the frequencies with …

---

## [Shape function draws nothing when given width and height](https://discourse.processing.org/t/shape-function-draws-nothing-when-given-width-and-height/7877)

<div class="topic-metadata">

**Author:** [@resbot](https://discourse.processing.org/u/resbot)\
**Replies:** 2\
**Last updated:** [January 27, 2019, 2:37pm UTC](https://discourse.processing.org/t/shape-function-draws-nothing-when-given-width-and-height/7877 "2019-01-27T14:37:16Z")

</div>

I am defining a custom PShape and attempting to redraw it a variable sizes. When I simply use the command shape(shapename, x, y) it draws correctly. When I use shape(shapename, a, b, c, d) where c and d are the width a…

---

## [Map point onto 135-degree line then onto x- and y-axis intercepts](https://discourse.processing.org/t/map-point-onto-135-degree-line-then-onto-x-and-y-axis-intercepts/7870)

<div class="topic-metadata">

**Author:** [@ottenm](https://discourse.processing.org/u/ottenm)\
**Replies:** 3\
**Last updated:** [January 27, 2019, 2:20pm UTC](https://discourse.processing.org/t/map-point-onto-135-degree-line-then-onto-x-and-y-axis-intercepts/7870 "2019-01-27T14:20:46Z")

</div>

Given any point on the screen (mouseX, mouseY) I need to draw a triangle bordered by a 135-degree line through that point (slope == -1) and by the left and bottom axes. In other words, anchored on the bottom-left corner…

---

## [\[SOLVED\] Need help with rotations](https://discourse.processing.org/t/solved-need-help-with-rotations/7861)

<div class="topic-metadata">

**Author:** [@Sky](https://discourse.processing.org/u/Sky)\
**Replies:** 2\
**Last updated:** [January 27, 2019, 12:12pm UTC](https://discourse.processing.org/t/solved-need-help-with-rotations/7861 "2019-01-27T12:12:01Z")

</div>

width = 700 height = 500 recto = PVector(0,0) mouse = PVector(0,0) def setup(): size(width,height) rectMode(CENTER) def draw(): background(191) mouse.x = mouseX mouse.y = mouseY pushMatrix() …

---

## [Function to return int( from beginner) stuck](https://discourse.processing.org/t/function-to-return-int-from-beginner-stuck/7871)

<div class="topic-metadata">

**Author:** [@angelman](https://discourse.processing.org/u/angelman)\
**Replies:** 4\
**Last updated:** [January 27, 2019, 11:58am UTC](https://discourse.processing.org/t/function-to-return-int-from-beginner-stuck/7871 "2019-01-27T11:58:41Z")

</div>

This is my code. so it prints out the random numbers. But what I want is; like rate1 = first call to RateChoose(); rate2 = second call to RateChoose(); rate3 = third call void RateChoose(){int rate0 = 0; for (int…

---

## [How to REMOVE Title Bar](https://discourse.processing.org/t/how-to-remove-title-bar/7537)

<div class="topic-metadata">

**Author:** [@santosh](https://discourse.processing.org/u/santosh)\
**Replies:** 9\
**Last updated:** [January 27, 2019, 9:51am UTC](https://discourse.processing.org/t/how-to-remove-title-bar/7537 "2019-01-27T09:51:29Z")

</div>

How to REMOVE Title Bar???

---

## [Why can't I set PShape's stroke with P2D](https://discourse.processing.org/t/why-cant-i-set-pshapes-stroke-with-p2d/7859)

<div class="topic-metadata">

**Author:** [@kikinnaz](https://discourse.processing.org/u/kikinnaz)\
**Replies:** 3\
**Last updated:** [January 27, 2019, 7:41am UTC](https://discourse.processing.org/t/why-cant-i-set-pshapes-stroke-with-p2d/7859 "2019-01-27T07:41:51Z")

</div>

Hi everyone, I was wondering whether I overlooked an important piece of information or whether it is a bug. When I create my PShape and set it a stroke color, it is completely ignored when using P2D and I cannot find a …

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

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