# Processing

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

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

**Page:** 229

---

## [How to add methods to imported library or class](https://discourse.processing.org/t/how-to-add-methods-to-imported-library-or-class/18527)

<div class="topic-metadata">

**Author:** [@ffd8](https://discourse.processing.org/u/ffd8)\
**Replies:** 6\
**Last updated:** [March 16, 2020, 11:54am UTC](https://discourse.processing.org/t/how-to-add-methods-to-imported-library-or-class/18527 "2020-03-16T11:54:40Z")

</div>

Wondering if there’s a basic technique to add/overwrite methods to an imported library and class instance? Maybe this is possible with extends/implements, which I don’t totally understand… I’m messing with the Hershey f…

---

## [Create image from interaction with website](https://discourse.processing.org/t/create-image-from-interaction-with-website/18315)

<div class="topic-metadata">

**Author:** [@Fabiana](https://discourse.processing.org/u/Fabiana)\
**Replies:** 6\
**Last updated:** [March 16, 2020, 10:32am UTC](https://discourse.processing.org/t/create-image-from-interaction-with-website/18315 "2020-03-16T10:32:56Z")

</div>

Hello, is it possible through processing, I connect to a website for example: google, and through my interaction on the google page, for example clicks and scroll, generate a graphic, abstract image in processing? Than…

---

## [Random probability (Customizing random function)](https://discourse.processing.org/t/random-probability-customizing-random-function/18571)

<div class="topic-metadata">

**Author:** [@noel](https://discourse.processing.org/u/noel)\
**Replies:** 7\
**Last updated:** [March 16, 2020, 10:44am UTC](https://discourse.processing.org/t/random-probability-customizing-random-function/18571 "2020-03-16T10:44:21Z")

</div>

My goal is to give a linear probability to the random function. That is, to give a higher probabiliy as lower the number\`in a linear way. However the code below gives a parabola like outcome… Where am I wrong in my lo…

---

## [Check if a field is true or false with reflections](https://discourse.processing.org/t/check-if-a-field-is-true-or-false-with-reflections/18692)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 1\
**Last updated:** [March 16, 2020, 7:43am UTC](https://discourse.processing.org/t/check-if-a-field-is-true-or-false-with-reflections/18692 "2020-03-16T07:43:32Z")

</div>

Currently trying to code some menu functionality and wondered if there’s a way to find out if a boolean field is true or false. This is the code I’m currently trying but I get an error try{ field = a.get…

---

## [Need help on processing game frogger](https://discourse.processing.org/t/need-help-on-processing-game-frogger/5808)

<div class="topic-metadata">

**Author:** [@Hunter\_noob](https://discourse.processing.org/u/Hunter_noob)\
**Replies:** 9\
**Last updated:** [November 23, 2018, 3:22pm UTC](https://discourse.processing.org/t/need-help-on-processing-game-frogger/5808 "2018-11-23T15:22:46Z")

</div>

Hi guys, I am creating a game called frogger, and I’m confused about why my codes not working. Hope get some help here. I created the hazards, but I can’t move them, tried many ways to fix but still failed :\< (move to…

---

## [Error with set texture when I increment my array index](https://discourse.processing.org/t/error-with-set-texture-when-i-increment-my-array-index/18672)

<div class="topic-metadata">

**Author:** [@Eyetoof](https://discourse.processing.org/u/Eyetoof)\
**Replies:** 2\
**Last updated:** [March 16, 2020, 2:18am UTC](https://discourse.processing.org/t/error-with-set-texture-when-i-increment-my-array-index/18672 "2020-03-16T02:18:37Z")

</div>

I am running into an issue when I try to set a texture to a PShape from an array in my project, and then increment the index to the array. This is my Array reference mndImg\[imgChsr\] I have a key press that just basical…

---

## [Platforms to run Processing](https://discourse.processing.org/t/platforms-to-run-processing/18481)

<div class="topic-metadata">

**Author:** [@paturn](https://discourse.processing.org/u/paturn)\
**Replies:** 29\
**Last updated:** [March 15, 2020, 12:45pm UTC](https://discourse.processing.org/t/platforms-to-run-processing/18481 "2020-03-15T12:45:00Z")

</div>

I cannot use the processing application on any computer. I have a laptop running Windows 10 Java jre8u241 or Java 8u25 (switchable) and a PC running Windows XP Java 6. They can load processing, but when I try to use a p…

---

## [Scroll menu issues](https://discourse.processing.org/t/scroll-menu-issues/18561)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 3\
**Last updated:** [March 14, 2020, 9:48pm UTC](https://discourse.processing.org/t/scroll-menu-issues/18561 "2020-03-14T21:48:32Z")

</div>

How does one go about coding such a structure, I have an example however I’m not sure how to apply masks. The issue is that every list item has a particular height, and position, the scroll bar amends their position and …

---

## [Change text width or text height without changing size](https://discourse.processing.org/t/change-text-width-or-text-height-without-changing-size/18662)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 2\
**Last updated:** [March 14, 2020, 9:45pm UTC](https://discourse.processing.org/t/change-text-width-or-text-height-without-changing-size/18662 "2020-03-14T21:45:46Z")

</div>

Is it possible in processing to change the text width or height without size?

---

## [Start position in "key pressed"](https://discourse.processing.org/t/start-position-in-key-pressed/18477)

<div class="topic-metadata">

**Author:** [@lemoskava](https://discourse.processing.org/u/lemoskava)\
**Replies:** 7\
**Last updated:** [March 14, 2020, 6:01pm UTC](https://discourse.processing.org/t/start-position-in-key-pressed/18477 "2020-03-14T18:01:55Z")

</div>

Hello! I am trying to create drawing letter, witch consist of ellipse. Every next letter type after key pressed. I can’t change fist position every next letter to create new letter after previous letter and gap space. e…

---

## [How to use cad file to render realistically in 3D](https://discourse.processing.org/t/how-to-use-cad-file-to-render-realistically-in-3d/18334)

<div class="topic-metadata">

**Author:** [@adaptinnovative](https://discourse.processing.org/u/adaptinnovative)\
**Replies:** 6\
**Last updated:** [March 13, 2020, 7:56pm UTC](https://discourse.processing.org/t/how-to-use-cad-file-to-render-realistically-in-3d/18334 "2020-03-13T19:56:08Z")

</div>

Is there any way to take a cad file and render it in 3D using processing?

---

## [Using convolution to upscale an image](https://discourse.processing.org/t/using-convolution-to-upscale-an-image/18632)

<div class="topic-metadata">

**Author:** [@zcream](https://discourse.processing.org/u/zcream)\
**Replies:** 1\
**Last updated:** [March 13, 2020, 4:14am UTC](https://discourse.processing.org/t/using-convolution-to-upscale-an-image/18632 "2020-03-13T04:14:50Z")

</div>

I understand how write code to apply a convolution matrix to a pixel. :slight\_smile: Not that hard. Now each upscaling algorithm can be implemented using a convolution kernel. I am just not sure how to apply this to code…

---

## [Two elements crossing each other](https://discourse.processing.org/t/two-elements-crossing-each-other/18576)

<div class="topic-metadata">

**Author:** [@BallazX](https://discourse.processing.org/u/BallazX)\
**Replies:** 2\
**Last updated:** [March 13, 2020, 3:50am UTC](https://discourse.processing.org/t/two-elements-crossing-each-other/18576 "2020-03-13T03:50:47Z")

</div>

Hey guys, so I’ve faced a very simple issue but I cant get over it. I got a rect and a line crossing each other. I need the coordinate where they are crossing each other. How can I get this point? See me example below: …

---

## [The function setTrackOffset() doesn't exist?](https://discourse.processing.org/t/the-function-settrackoffset-doesnt-exist/18570)

<div class="topic-metadata">

**Author:** [@Houssam](https://discourse.processing.org/u/Houssam)\
**Replies:** 1\
**Last updated:** [March 13, 2020, 3:30am UTC](https://discourse.processing.org/t/the-function-settrackoffset-doesnt-exist/18570 "2020-03-13T03:30:27Z")

</div>

Hi everyone ! I wonder why the public member function setTrackOffset ( float \* offset \* ) doesn’t work . note that i am using G4P library is there any solution ! kb.setTrackOffset(0.0f);

---

## [Unable to load file using Minim::loadFileStream() and others using Minim (without Processing)](https://discourse.processing.org/t/unable-to-load-file-using-minim-loadfilestream-and-others-using-minim-without-processing/18631)

<div class="topic-metadata">

**Author:** [@minim\_minimalist](https://discourse.processing.org/u/minim_minimalist)\
**Replies:** 1\
**Last updated:** [March 13, 2020, 2:21am UTC](https://discourse.processing.org/t/unable-to-load-file-using-minim-loadfilestream-and-others-using-minim-without-processing/18631 "2020-03-13T02:21:37Z")

</div>

Hey all, I am trying to use Minim without Processing and running into some errors. I am compiling correctly, but am unable to load a file that exists. I have added a MinimWrapper class which has the sketchPath and crea…

---

## [Returning an object type from an arraylist](https://discourse.processing.org/t/returning-an-object-type-from-an-arraylist/16467)

<div class="topic-metadata">

**Author:** [@davidclue](https://discourse.processing.org/u/davidclue)\
**Replies:** 20\
**Last updated:** [March 13, 2020, 1:10am UTC](https://discourse.processing.org/t/returning-an-object-type-from-an-arraylist/16467 "2020-03-13T01:10:21Z")

</div>

Hi, I am trying to create a level editor for my game but I’ve encountered a problem where I want to select objects on the screen I tried to make an object called a Selector and change its value every time someone clicks …

---

## [setTexture() not working in PGraphics window](https://discourse.processing.org/t/settexture-not-working-in-pgraphics-window/18629)

<div class="topic-metadata">

**Author:** [@Java.SourceForger](https://discourse.processing.org/u/Java.SourceForger)\
**Replies:** 0\
**Last updated:** [March 12, 2020, 11:22pm UTC](https://discourse.processing.org/t/settexture-not-working-in-pgraphics-window/18629 "2020-03-12T23:22:49Z")

</div>

In my sketch, I have put my 3d rendering into a PGraphics object. But now, I have no way, whatsoever of drawing textures on PShape objects. The result is an invisible shape. Does anyone know what to do or has had this is…

---

## [Detecting edges in an array of coloured circles](https://discourse.processing.org/t/detecting-edges-in-an-array-of-coloured-circles/18534)

<div class="topic-metadata">

**Author:** [@Smuel](https://discourse.processing.org/u/Smuel)\
**Replies:** 17\
**Last updated:** [March 12, 2020, 10:11pm UTC](https://discourse.processing.org/t/detecting-edges-in-an-array-of-coloured-circles/18534 "2020-03-12T22:11:57Z")

</div>

Hi, I’m instantiating a grid of Circles and then using noise to fill each Circle with a perlin noise value based on an increment, if the brightness value of a circle exceeds an amount it will be filled green, if not it …

---

## [controlP5 – Get selected dropdown item text as string?](https://discourse.processing.org/t/controlp5-get-selected-dropdown-item-text-as-string/11236)

<div class="topic-metadata">

**Author:** [@ER-PIP](https://discourse.processing.org/u/ER-PIP)\
**Replies:** 2\
**Last updated:** [March 12, 2020, 5:49pm UTC](https://discourse.processing.org/t/controlp5-get-selected-dropdown-item-text-as-string/11236 "2020-03-12T17:49:59Z")

</div>

UPDATE- Needed to read some Java docs on how to use Map– here is my solution: cwDropdown.getItem((int)val).get("text") Though it returns as an Object rather than a String… Hi- I’m having a heck of a time getting th…

---

## [How to speed up texture() calls?](https://discourse.processing.org/t/how-to-speed-up-texture-calls/18414)

<div class="topic-metadata">

**Author:** [@George](https://discourse.processing.org/u/George)\
**Replies:** 2\
**Last updated:** [March 11, 2020, 9:29pm UTC](https://discourse.processing.org/t/how-to-speed-up-texture-calls/18414 "2020-03-11T21:29:49Z")

</div>

Hi, I’ve stumbled upon a weird issue on Windows I’m trying to get a workaround going. Here’s a basic sketch to replicate the issue: PImage texture; void setup(){ size(1280,720,P3D); texture = createImage(3840,…

---

## [Make an object variables change after interaction and change again after given amount of time](https://discourse.processing.org/t/make-an-object-variables-change-after-interaction-and-change-again-after-given-amount-of-time/18604)

<div class="topic-metadata">

**Author:** [@Nadiantara](https://discourse.processing.org/u/Nadiantara)\
**Replies:** 2\
**Last updated:** [March 11, 2020, 8:22pm UTC](https://discourse.processing.org/t/make-an-object-variables-change-after-interaction-and-change-again-after-given-amount-of-time/18604 "2020-03-11T20:22:46Z")

</div>

Let’s say I have two objects (b1 and b2) with different values of variables. When they are interacting, b2 has probability (let’s say 30%) to copying b1’s values. Then, after a given amount of time b2 will change its va…

---

## [Trying to change states using the dist function](https://discourse.processing.org/t/trying-to-change-states-using-the-dist-function/18606)

<div class="topic-metadata">

**Author:** [@Chriswolf378](https://discourse.processing.org/u/Chriswolf378)\
**Replies:** 13\
**Last updated:** [March 11, 2020, 7:12pm UTC](https://discourse.processing.org/t/trying-to-change-states-using-the-dist-function/18606 "2020-03-11T19:12:10Z")

</div>

Essentially what I want to happen is when the player hits a certain point the game will change to the next state at the moment I have this code: void checkWinLose(){ if (dist(x, y, 500.0 ,0.0) \< 45 ){ state …

---

## [Trying to rec a frame of my animation to SVG file](https://discourse.processing.org/t/trying-to-rec-a-frame-of-my-animation-to-svg-file/18516)

<div class="topic-metadata">

**Author:** [@JakeCodeNewbie](https://discourse.processing.org/u/JakeCodeNewbie)\
**Replies:** 1\
**Last updated:** [March 9, 2020, 8:01pm UTC](https://discourse.processing.org/t/trying-to-rec-a-frame-of-my-animation-to-svg-file/18516 "2020-03-09T20:01:56Z")

</div>

I am new to coding and I am working with this code to create a unique poster design using lines. I cannot successfully record a frame to an SVG file so I can use a pen plotter. I am sure I have a couple things out of ord…

---

## [Perplexity Boolean array](https://discourse.processing.org/t/perplexity-boolean-array/18594)

<div class="topic-metadata">

**Author:** [@marika20](https://discourse.processing.org/u/marika20)\
**Replies:** 2\
**Last updated:** [March 11, 2020, 2:38pm UTC](https://discourse.processing.org/t/perplexity-boolean-array/18594 "2020-03-11T14:38:39Z")

</div>

Hello everyone! I would like to ask for a hand: with this code that I wrote required uscrimi you must “true or false” values based on the randomNum values that I have assigned; instead I get only “false” values. Also I…

---

## [Scale video to fit canvas size](https://discourse.processing.org/t/scale-video-to-fit-canvas-size/18597)

<div class="topic-metadata">

**Author:** [@ElwoodBlues](https://discourse.processing.org/u/ElwoodBlues)\
**Replies:** 2\
**Last updated:** [March 11, 2020, 2:13pm UTC](https://discourse.processing.org/t/scale-video-to-fit-canvas-size/18597 "2020-03-11T14:13:49Z")

</div>

Hello, I’m running processing on my RaspberryPi 4 with the RaspberryPi Camera Module v2.1. I am currently just capturing a video stream - see code below. My problem is that when I run the sketch, the video is very zoomed…

---

## [Can you run a Processing sketch and hide the Canvas Window?](https://discourse.processing.org/t/can-you-run-a-processing-sketch-and-hide-the-canvas-window/18542)

<div class="topic-metadata">

**Author:** [@nicnut](https://discourse.processing.org/u/nicnut)\
**Replies:** 4\
**Last updated:** [March 11, 2020, 1:30pm UTC](https://discourse.processing.org/t/can-you-run-a-processing-sketch-and-hide-the-canvas-window/18542 "2020-03-11T13:30:04Z")

</div>

Hi everyone. I’ve seen a few posts on this topic, but none that seem to answer what I am looking for. I am trying to use Processing in a live, VJ type situation, with the a Processing sketch reacting to OSC messages, an…

---

## [Combining Processing Code](https://discourse.processing.org/t/combining-processing-code/18583)

<div class="topic-metadata">

**Author:** [@kristipham](https://discourse.processing.org/u/kristipham)\
**Replies:** 2\
**Last updated:** [March 11, 2020, 12:35pm UTC](https://discourse.processing.org/t/combining-processing-code/18583 "2020-03-11T12:35:08Z")

</div>

I am controlling multiple LEDs and was able to get a simple code running in Processing with Arduino. My master code controls the LEDS based on an RTD clock module while a sensor reads the amount of lux the lighting array…

---

## [Parsing GPS Data - Partially Working](https://discourse.processing.org/t/parsing-gps-data-partially-working/18435)

<div class="topic-metadata">

**Author:** [@YellowGTM](https://discourse.processing.org/u/YellowGTM)\
**Replies:** 8\
**Last updated:** [March 11, 2020, 11:58am UTC](https://discourse.processing.org/t/parsing-gps-data-partially-working/18435 "2020-03-11T11:58:13Z")

</div>

I’ve connected a GPS antenna to my laptop. With several attempts to troubleshoot the code, It appears the issue is within serialEvent(), and/or my parsing structure. If I print(inString); to the console, I can see the…

---

## [Data Acquiring Delay](https://discourse.processing.org/t/data-acquiring-delay/18438)

<div class="topic-metadata">

**Author:** [@KGS](https://discourse.processing.org/u/KGS)\
**Replies:** 10\
**Last updated:** [March 6, 2020, 11:51am UTC](https://discourse.processing.org/t/data-acquiring-delay/18438 "2020-03-06T11:51:04Z")

</div>

I am using processing software to acquire data from 4 arduino microcontrollers simultaneously. I have seen that after a few minutes data plotting gets delayed and increasing it. At initially it works fine and the latt…

---

## [Find a tip to inform the position to the stepper motor](https://discourse.processing.org/t/find-a-tip-to-inform-the-position-to-the-stepper-motor/17644)

<div class="topic-metadata">

**Author:** [@bking](https://discourse.processing.org/u/bking)\
**Replies:** 4\
**Last updated:** [March 10, 2020, 5:29pm UTC](https://discourse.processing.org/t/find-a-tip-to-inform-the-position-to-the-stepper-motor/17644 "2020-03-10T17:29:20Z")

</div>

n Processing, I made a simulation where I run an engine over several revolutions at a certain speed and in both directions. I can track the position of the simulated motor using a stepper motor. By giving the position …

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

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