# Processing

**URL:** https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=144

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

**Page:** 145

---

## [How to zoom into an image (but at a certain point) with scale](https://discourse.processing.org/t/how-to-zoom-into-an-image-but-at-a-certain-point-with-scale/28510)

<div class="topic-metadata">

**Author:** [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Replies:** 2\
**Last updated:** [March 13, 2021, 9:29pm UTC](https://discourse.processing.org/t/how-to-zoom-into-an-image-but-at-a-certain-point-with-scale/28510 "2021-03-13T21:29:10Z")

</div>

Hello all, I have a question: I want to animate the zoom into an image, but not into its center, but into a certain area of the image (e.g. a dog or cat (or where I click the mouse) on a much bigger image). I use scal…

---

## [Export application with Video (webcam access) not working](https://discourse.processing.org/t/export-application-with-video-webcam-access-not-working/25494)

<div class="topic-metadata">

**Author:** [@romano](https://discourse.processing.org/u/romano)\
**Replies:** 3\
**Last updated:** [March 13, 2021, 9:03pm UTC](https://discourse.processing.org/t/export-application-with-video-webcam-access-not-working/25494 "2021-03-13T21:03:03Z")

</div>

I made a small tool in Processing 3.5.4 that I would like to export as a standalone application on Windows 10 Home (v. 1909). If I leave out the webcam functionality, the app runs just fine, but as soon as I try to acce…

---

## [How to clone Object without modifying original?](https://discourse.processing.org/t/how-to-clone-object-without-modifying-original/28496)

<div class="topic-metadata">

**Author:** [@EinsMalteHH](https://discourse.processing.org/u/EinsMalteHH)\
**Replies:** 3\
**Last updated:** [March 13, 2021, 8:41pm UTC](https://discourse.processing.org/t/how-to-clone-object-without-modifying-original/28496 "2021-03-13T20:41:16Z")

</div>

I have an array of a class, that I want to clone. But if I modify the clone, the original gets modified to. Now is the question, how can i clone an array of classes without it modifying the original?

---

## [Find the number of elements in a single row](https://discourse.processing.org/t/find-the-number-of-elements-in-a-single-row/28487)

<div class="topic-metadata">

**Author:** [@Criste44](https://discourse.processing.org/u/Criste44)\
**Replies:** 7\
**Last updated:** [March 13, 2021, 4:50pm UTC](https://discourse.processing.org/t/find-the-number-of-elements-in-a-single-row/28487 "2021-03-13T16:50:38Z")

</div>

hello … \[8, 8\] I have a two dimensional array, while the game is going on I want to find out how many objects are in a single line … not the whole array, just one line, example \[i, 7\] …

---

## [How to add values to array based on condition? (read two files)](https://discourse.processing.org/t/how-to-add-values-to-array-based-on-condition-read-two-files/28340)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 12\
**Last updated:** [March 13, 2021, 4:35pm UTC](https://discourse.processing.org/t/how-to-add-values-to-array-based-on-condition-read-two-files/28340 "2021-03-13T16:35:41Z")

</div>

I have data from two csv files that I import as Tables. The first file contains country names and their population. The second file contains migration flows between countries over 4 time periods. The files would look lik…

---

## [Handling color in eclipse with processing](https://discourse.processing.org/t/handling-color-in-eclipse-with-processing/28497)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 2\
**Last updated:** [March 13, 2021, 3:20pm UTC](https://discourse.processing.org/t/handling-color-in-eclipse-with-processing/28497 "2021-03-13T15:20:22Z")

</div>

Hi guys I’m hoping you can help please I’m a bit stuck. When trying to convert my code to a library I ran into the following problem, color is not recognised as a data type. I have found the following posts online aski…

---

## [How to erase an object inside of an array?](https://discourse.processing.org/t/how-to-erase-an-object-inside-of-an-array/28499)

<div class="topic-metadata">

**Author:** [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Replies:** 1\
**Last updated:** [March 13, 2021, 2:46pm UTC](https://discourse.processing.org/t/how-to-erase-an-object-inside-of-an-array/28499 "2021-03-13T14:46:47Z")

</div>

Lets say I have an ArrayList of a class of objects. How would I be able to do erase it from within the class. Something like ArrayList\<newClass\> newClassList = new ArrayList\<newClass\>(); newClassList.add(newClass()); cl…

---

## [Connect and Disconnect events not working on webSocketSever](https://discourse.processing.org/t/connect-and-disconnect-events-not-working-on-websocketsever/28252)

<div class="topic-metadata">

**Author:** [@yeppii](https://discourse.processing.org/u/yeppii)\
**Replies:** 19\
**Last updated:** [March 13, 2021, 2:22pm UTC](https://discourse.processing.org/t/connect-and-disconnect-events-not-working-on-websocketsever/28252 "2021-03-13T14:22:13Z")

</div>

These two functions are not getting called by WebSocketServer. What to do to solve it? (I am using this library → https://github.com/alexandrainst/processing\_websockets) public void webSocketConnectEvent(String uid,…

---

## [Unable to load processing.core.ThinkDifferent methods](https://discourse.processing.org/t/unable-to-load-processing-core-thinkdifferent-methods/28481)

<div class="topic-metadata">

**Author:** [@MauiMana](https://discourse.processing.org/u/MauiMana)\
**Replies:** 1\
**Last updated:** [March 13, 2021, 8:35am UTC](https://discourse.processing.org/t/unable-to-load-processing-core-thinkdifferent-methods/28481 "2021-03-13T08:35:02Z")

</div>

EDIT - it was the java version (15 vs 1.8). I was aware of Processing’s java version restrictions (1.8 but w/o lambdas, etc.) but didn’t think it would affect being able to inspect the ThinkDifferent class. In any case, …

---

## [How to print a label from a model of a Neural network?](https://discourse.processing.org/t/how-to-print-a-label-from-a-model-of-a-neural-network/28439)

<div class="topic-metadata">

**Author:** [@babatnvn](https://discourse.processing.org/u/babatnvn)\
**Replies:** 6\
**Last updated:** [March 13, 2021, 2:33am UTC](https://discourse.processing.org/t/how-to-print-a-label-from-a-model-of-a-neural-network/28439 "2021-03-13T02:33:15Z")

</div>

I have a Numaker-PFM-M487 device and it contains the Bin file. The Bin file contains the weights and labels as ‘cat, dog, etc’ of a Neural network. Now, how to print one label in the Bin file by this processing. I made…

---

## [Text in mousePressed() flashing (using text())](https://discourse.processing.org/t/text-in-mousepressed-flashing-using-text/28479)

<div class="topic-metadata">

**Author:** [@emmarope](https://discourse.processing.org/u/emmarope)\
**Replies:** 3\
**Last updated:** [March 12, 2021, 11:17pm UTC](https://discourse.processing.org/t/text-in-mousepressed-flashing-using-text/28479 "2021-03-12T23:17:57Z")

</div>

I want the coordinates in the string to change every time the mouse is clicked, but they flash by too quickly to read and I am not sure how to fix, code is below: PImage cityscape, landscape, sky, moon; String \[\] coord…

---

## [Numbers only for custom font on TFT display](https://discourse.processing.org/t/numbers-only-for-custom-font-on-tft-display/28391)

<div class="topic-metadata">

**Author:** [@fotosettore](https://discourse.processing.org/u/fotosettore)\
**Replies:** 1\
**Last updated:** [March 12, 2021, 4:46pm UTC](https://discourse.processing.org/t/numbers-only-for-custom-font-on-tft-display/28391 "2021-03-12T16:46:50Z")

</div>

Hi Is it possibile to create a font with inside NUMBERS ONLY ( from 0 to 9) ? I need to show a huge number on a TFT display, that use TFT\_eSPI library. Dimensione is about 120. I don’t need alphabetic characters. I tr…

---

## [How to have a different font size inside the text field than the font size of its description with ControlP5?](https://discourse.processing.org/t/how-to-have-a-different-font-size-inside-the-text-field-than-the-font-size-of-its-description-with-controlp5/28452)

<div class="topic-metadata">

**Author:** [@tea\_tree](https://discourse.processing.org/u/tea_tree)\
**Replies:** 3\
**Last updated:** [March 12, 2021, 8:41am UTC](https://discourse.processing.org/t/how-to-have-a-different-font-size-inside-the-text-field-than-the-font-size-of-its-description-with-controlp5/28452 "2021-03-12T08:41:42Z")

</div>

I’d like to add a textfield named “input”. The description (“input”) should be of font size 5 but inside the text field I’d like to use a font size that fills out most of the text field. In any case, I’d like the font si…

---

## [Painting a canvas](https://discourse.processing.org/t/painting-a-canvas/28273)

<div class="topic-metadata">

**Author:** [@Apollo](https://discourse.processing.org/u/Apollo)\
**Replies:** 9\
**Last updated:** [March 12, 2021, 8:31am UTC](https://discourse.processing.org/t/painting-a-canvas/28273 "2021-03-12T08:31:13Z")

</div>

Hi! I hope you could help me here. (@CodeMasterX , I’m mentioning you cause you’ve helped me before.) The code should create a 500x500 canvas and fills it in with a solid color (try maroon) using a 25px brush in 20 sec…

---

## [Having trouble with code](https://discourse.processing.org/t/having-trouble-with-code/28446)

<div class="topic-metadata">

**Author:** [@Lolman223](https://discourse.processing.org/u/Lolman223)\
**Replies:** 5\
**Last updated:** [March 11, 2021, 6:23pm UTC](https://discourse.processing.org/t/having-trouble-with-code/28446 "2021-03-11T18:23:37Z")

</div>

I’m having trouble figuring out why line 19 (t+=0.5;) is unreachable. Can somebody have a look, please? static final int NUM\_LINES = 10; float t; void setup() { background(20); size(500,500); } void draw() { b…

---

## [G4P text size & style](https://discourse.processing.org/t/g4p-text-size-style/28169)

<div class="topic-metadata">

**Author:** [@Konstanitn](https://discourse.processing.org/u/Konstanitn)\
**Replies:** 2\
**Last updated:** [March 11, 2021, 4:20pm UTC](https://discourse.processing.org/t/g4p-text-size-style/28169 "2021-03-11T16:20:26Z")

</div>

Hello everyone, I was looking for a library with a GUI to create custom GUIs to communicate with arduino and the only one (semi) up to dateI was G4P. So I tried to create some Interfaces and with my limited processing k…

---

## [Building a translator for Processing for my Masters dissertation](https://discourse.processing.org/t/building-a-translator-for-processing-for-my-masters-dissertation/28347)

<div class="topic-metadata">

**Author:** [@IReback](https://discourse.processing.org/u/IReback)\
**Replies:** 7\
**Last updated:** [March 11, 2021, 1:20pm UTC](https://discourse.processing.org/t/building-a-translator-for-processing-for-my-masters-dissertation/28347 "2021-03-11T13:20:20Z")

</div>

Hello everyone, this is the first time i post here and i would like to ask for help. My objective is to make the task of learning Processing more interactive and easier. To do that, I am developing an educational progra…

---

## [Error the "com.design" does not exist](https://discourse.processing.org/t/error-the-com-design-does-not-exist/28373)

<div class="topic-metadata">

**Author:** [@kathleen](https://discourse.processing.org/u/kathleen)\
**Replies:** 4\
**Last updated:** [March 10, 2021, 1:15pm UTC](https://discourse.processing.org/t/error-the-com-design-does-not-exist/28373 "2021-03-10T13:15:50Z")

</div>

I am new to Processing and am trying to utilize this project with my HS students – http://highlowtech.org/?p=2329 When I run the code I receive an error message The package “com.design” does not exist. You might be miss…

---

## [GSOC 2021: Inquiry](https://discourse.processing.org/t/gsoc-2021-inquiry/28374)

<div class="topic-metadata">

**Author:** [@prateek93a](https://discourse.processing.org/u/prateek93a)\
**Replies:** 4\
**Last updated:** [March 10, 2021, 10:54am UTC](https://discourse.processing.org/t/gsoc-2021-inquiry/28374 "2021-03-10T10:54:56Z")

</div>

Hello everyone, I am Prateek Jain, from IIIT Guwahati India. I look forward to participating in GSOC 2021 with Processing Organisation. Can someone guide me about what are the current ideas and what is the format to prop…

---

## [Automatic line break (text() command)](https://discourse.processing.org/t/automatic-line-break-text-command/27302)

<div class="topic-metadata">

**Author:** [@Sophie](https://discourse.processing.org/u/Sophie)\
**Replies:** 1\
**Last updated:** [January 23, 2021, 2:35pm UTC](https://discourse.processing.org/t/automatic-line-break-text-command/27302 "2021-01-23T14:35:31Z")

</div>

Hello, My code draws lines to the screen, each line in a random size in a single frame. But some lines are too long. I have to split them, but not to another frame and another random size. It should still remain in the …

---

## [Different x starting position of text](https://discourse.processing.org/t/different-x-starting-position-of-text/27308)

<div class="topic-metadata">

**Author:** [@Ida](https://discourse.processing.org/u/Ida)\
**Replies:** 3\
**Last updated:** [January 23, 2021, 5:50pm UTC](https://discourse.processing.org/t/different-x-starting-position-of-text/27308 "2021-01-23T17:50:40Z")

</div>

Hey, My code draws a text line by line to the screen in different sizes, but the lines seem to start at a different x position according to the text size. Also the first line begins at a different x position. Could some…

---

## [Drawing an PGraphic inside of a PGraphic, but image does not update itself](https://discourse.processing.org/t/drawing-an-pgraphic-inside-of-a-pgraphic-but-image-does-not-update-itself/28349)

<div class="topic-metadata">

**Author:** [@AlexAlex](https://discourse.processing.org/u/AlexAlex)\
**Replies:** 3\
**Last updated:** [March 10, 2021, 8:13am UTC](https://discourse.processing.org/t/drawing-an-pgraphic-inside-of-a-pgraphic-but-image-does-not-update-itself/28349 "2021-03-10T08:13:04Z")

</div>

Hello everyone, I have been trying to achieve something like boolean operation - difference. So that whenever the text, that is moving horizontally, is covered by the text, that is moving vertically, its pixels in the o…

---

## [Help with snake game](https://discourse.processing.org/t/help-with-snake-game/28328)

<div class="topic-metadata">

**Author:** [@NewProgrammer123](https://discourse.processing.org/u/NewProgrammer123)\
**Replies:** 4\
**Last updated:** [March 10, 2021, 7:56am UTC](https://discourse.processing.org/t/help-with-snake-game/28328 "2021-03-10T07:56:44Z")

</div>

Hello, I am new to programming and I’m trying to create the snake game. I have been able to create the food and the snake with some help from google but I cant seem to get the snake to move. Any help or tips would be gre…

---

## ['Nature of Code' Chapter 2 Query](https://discourse.processing.org/t/nature-of-code-chapter-2-query/28353)

<div class="topic-metadata">

**Author:** [@scolty2021](https://discourse.processing.org/u/scolty2021)\
**Replies:** 6\
**Last updated:** [March 9, 2021, 9:58pm UTC](https://discourse.processing.org/t/nature-of-code-chapter-2-query/28353 "2021-03-09T21:58:23Z")

</div>

Hi, Thanks for taking the trouble to click on this Topic. I’m currently working my way thru Daniel Shiffman’s Learning Processing & the Nature of Code books, and have the following query about a section in the latter, …

---

## [Glvideo library on ubuntu 20.10](https://discourse.processing.org/t/glvideo-library-on-ubuntu-20-10/28298)

<div class="topic-metadata">

**Author:** [@matheplica](https://discourse.processing.org/u/matheplica)\
**Replies:** 12\
**Last updated:** [March 9, 2021, 8:51pm UTC](https://discourse.processing.org/t/glvideo-library-on-ubuntu-20-10/28298 "2021-03-09T20:51:11Z")

</div>

Hi, I’m trying glvideo library on ubuntu mate 20.10 but the bug is still that there are compiled for gstreamer 1.8 and ubuntu use version 1.18. There is a way to work around or another library is ok ? Thanks for help

---

## [Can someone help me with this game? (image order)](https://discourse.processing.org/t/can-someone-help-me-with-this-game-image-order/28147)

<div class="topic-metadata">

**Author:** [@cocopuffs](https://discourse.processing.org/u/cocopuffs)\
**Replies:** 30\
**Last updated:** [March 9, 2021, 2:11pm UTC](https://discourse.processing.org/t/can-someone-help-me-with-this-game-image-order/28147 "2021-03-09T14:11:27Z")

</div>

So I’m trying to make a game where processing shuffles the 4 images, and the player just has to click the correct image in a certain order to win. Very simple game, nothing fancy or complicated, just trying to practice s…

---

## [Display objects stored in an ArrayList one after the other (Animation)](https://discourse.processing.org/t/display-objects-stored-in-an-arraylist-one-after-the-other-animation/28348)

<div class="topic-metadata">

**Author:** [@Alesk1969](https://discourse.processing.org/u/Alesk1969)\
**Replies:** 4\
**Last updated:** [March 9, 2021, 1:08pm UTC](https://discourse.processing.org/t/display-objects-stored-in-an-arraylist-one-after-the-other-animation/28348 "2021-03-09T13:08:16Z")

</div>

Hello everyone, What are the different solutions (or the easiest one for a beginner to master) to display some objects stored in an array (or in the case of my sketch in an ArrayList) one after the other and rather than…

---

## [How to get x and y value of a shape?](https://discourse.processing.org/t/how-to-get-x-and-y-value-of-a-shape/28367)

<div class="topic-metadata">

**Author:** [@HolaCola](https://discourse.processing.org/u/HolaCola)\
**Replies:** 4\
**Last updated:** [March 9, 2021, 10:47am UTC](https://discourse.processing.org/t/how-to-get-x-and-y-value-of-a-shape/28367 "2021-03-09T10:47:40Z")

</div>

Is there any method to get x and y axis value of a 2D shape (i.e. a circle or rectangle)? I haven’t found any related reference.

---

## [Bird wing kinematics](https://discourse.processing.org/t/bird-wing-kinematics/28175)

<div class="topic-metadata">

**Author:** [@aljosa](https://discourse.processing.org/u/aljosa)\
**Replies:** 9\
**Last updated:** [March 9, 2021, 9:20am UTC](https://discourse.processing.org/t/bird-wing-kinematics/28175 "2021-03-09T09:20:18Z")

</div>

float r1=200; // size of a first segment float r2=150; // size of a second segment float a1; // angle one float a2; // angle two float w=0; // angular velo…

---

## [Do you know how to modify this?](https://discourse.processing.org/t/do-you-know-how-to-modify-this/28323)

<div class="topic-metadata">

**Author:** [@Apollo](https://discourse.processing.org/u/Apollo)\
**Replies:** 5\
**Last updated:** [March 9, 2021, 7:46am UTC](https://discourse.processing.org/t/do-you-know-how-to-modify-this/28323 "2021-03-09T07:46:14Z")

</div>

Good day/morning/evening/afternoon! So I got his code which I wanna utilize for another task: void setup() { size(800,400); } void draw() { loadPixels(); int w = width/2, h = height; for(float j = 0; j \< w; j++) …

[Previous page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=143)

[Next page](https://discourse.processing.org/c/processing/6.md?no_subcategories=false&page=145)
