# Processing

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

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

**Page:** 345

---

## [Calculation chart](https://discourse.processing.org/t/calculation-chart/5848)

<div class="topic-metadata">

**Author:** [@Dirk](https://discourse.processing.org/u/Dirk)\
**Replies:** 3\
**Last updated:** [November 25, 2018, 8:30am UTC](https://discourse.processing.org/t/calculation-chart/5848 "2018-11-25T08:30:17Z")

</div>

Hello experts, I am reading out a sencor for light. The value of this I want to use in a chart. The chart width and height is 700 x 1200. The value of the Y-axis is from 0 to 1400 The value of the X-axis is from 0 to…

---

## [Exe Patching Problem](https://discourse.processing.org/t/exe-patching-problem/5909)

<div class="topic-metadata">

**Author:** [@Odermonicon](https://discourse.processing.org/u/Odermonicon)\
**Replies:** 0\
**Last updated:** [November 25, 2018, 5:55am UTC](https://discourse.processing.org/t/exe-patching-problem/5909 "2018-11-25T05:55:17Z")

</div>

I get so many errors for no reason… (Reason: i did not initilaze a custom class :man\_facepalming:) CodeMain: byte\[\] bExe; String\[\] midpatch; Patch finpatch; void setup() { selectOutput("Save the output file:&q…

---

## [Game Optimization](https://discourse.processing.org/t/game-optimization/5874)

<div class="topic-metadata">

**Author:** [@Angle](https://discourse.processing.org/u/Angle)\
**Replies:** 9\
**Last updated:** [November 25, 2018, 12:59am UTC](https://discourse.processing.org/t/game-optimization/5874 "2018-11-25T00:59:03Z")

</div>

Hello. My game is running fairly slowly. I checked it over with VisualVM and it looks like that’s mostly due to the fact that I’m redrawing all the SVG shapes every frame with the CPU. You can see my source code here: ht…

---

## [Digital dashboard](https://discourse.processing.org/t/digital-dashboard/5861)

<div class="topic-metadata">

**Author:** [@processing1234](https://discourse.processing.org/u/processing1234)\
**Replies:** 7\
**Last updated:** [November 25, 2018, 12:37am UTC](https://discourse.processing.org/t/digital-dashboard/5861 "2018-11-25T00:37:36Z")

</div>

hey, for an assignment we have to create a digital dashboard which shows speed in Km/hr, fuel level in liters, RPM. This is the code I’ve done so far. I’d really appreciate any help. Thanks in advance. I’m really new to …

---

## [User Input from KeyBoard](https://discourse.processing.org/t/user-input-from-keyboard/5904)

<div class="topic-metadata">

**Author:** [@alexac692](https://discourse.processing.org/u/alexac692)\
**Replies:** 1\
**Last updated:** [November 24, 2018, 11:51pm UTC](https://discourse.processing.org/t/user-input-from-keyboard/5904 "2018-11-24T23:51:03Z")

</div>

I am trying to write a code that will return a string as a result of the user pressing 1, 2, or 3 on their keyboard. This is what I have so far but when i press keys nothing happens. What is wrong with my code? String c…

---

## [Looping different class instances](https://discourse.processing.org/t/looping-different-class-instances/5843)

<div class="topic-metadata">

**Author:** [@Aleksi](https://discourse.processing.org/u/Aleksi)\
**Replies:** 10\
**Last updated:** [November 24, 2018, 10:33pm UTC](https://discourse.processing.org/t/looping-different-class-instances/5843 "2018-11-24T22:33:41Z")

</div>

I’ve kind of painted myself into a corner. I need to be able to loop through instances of different classes to run methods of a class they all instantiate. I know something like this is a good candidate for an Interface…

---

## [Updating Squares](https://discourse.processing.org/t/updating-squares/5849)

<div class="topic-metadata">

**Author:** [@oscie24](https://discourse.processing.org/u/oscie24)\
**Replies:** 3\
**Last updated:** [November 24, 2018, 9:37pm UTC](https://discourse.processing.org/t/updating-squares/5849 "2018-11-24T21:37:42Z")

</div>

This is for a project but i’m currently in a little oh cock moment. My aim is to make a tessellator. Where you click on a small grid and that pattern tesselates on a bigger grid. the problem i’m having is that i don’t k…

---

## [Why does sometimes //\<\>// appear at the top of my sketch?](https://discourse.processing.org/t/why-does-sometimes-appear-at-the-top-of-my-sketch/5844)

<div class="topic-metadata">

**Author:** [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Replies:** 2\
**Last updated:** [November 24, 2018, 8:49pm UTC](https://discourse.processing.org/t/why-does-sometimes-appear-at-the-top-of-my-sketch/5844 "2018-11-24T20:49:22Z")

</div>

This happens when i close the sketch after formatting and saving and when i reopen it it just appears at the top. This time it only appeared in the main tab, but if i recall correctly the last time it happened, it appear…

---

## [Programme processing](https://discourse.processing.org/t/programme-processing/5797)

<div class="topic-metadata">

**Author:** [@carotte](https://discourse.processing.org/u/carotte)\
**Replies:** 2\
**Last updated:** [November 24, 2018, 7:16am UTC](https://discourse.processing.org/t/programme-processing/5797 "2018-11-24T07:16:41Z")

</div>

BONSOIR, j’ai un programme Processing à effectuer, y aurait-il des personnes qui serait qualifier dans le domaine pour me donner un coup de main car je débute. le programme est bien évidement de base. le but est de cré…

---

## [Issue with G4P and P2D renderer on raspberry Pi](https://discourse.processing.org/t/issue-with-g4p-and-p2d-renderer-on-raspberry-pi/2563)

<div class="topic-metadata">

**Author:** [@jb4x](https://discourse.processing.org/u/jb4x)\
**Replies:** 13\
**Last updated:** [November 24, 2018, 4:43pm UTC](https://discourse.processing.org/t/issue-with-g4p-and-p2d-renderer-on-raspberry-pi/2563 "2018-11-24T16:43:48Z")

</div>

Hello everyone, I need to be able to use some sliders and buttons in a sketch that run on a raspberry PI 3 (with raspbian) and thought about using G4P but I ran into a problem. This is the test code I am using: import…

---

## [G4P with P2D/P3D :: Processing bug](https://discourse.processing.org/t/g4p-with-p2d-p3d-processing-bug/5889)

<div class="topic-metadata">

**Author:** [@quark](https://discourse.processing.org/u/quark)\
**Replies:** 0\
**Last updated:** [November 24, 2018, 4:41pm UTC](https://discourse.processing.org/t/g4p-with-p2d-p3d-processing-bug/5889 "2018-11-24T16:41:54Z")

</div>

If you use G4P together with P2D/P3D you might have experienced problems with the controls not responding to the mouse. It has taken me ages to track down the problem but I have found it. G4P uses the cursor(…) method to…

---

## [Building a clock - I got stuck](https://discourse.processing.org/t/building-a-clock-i-got-stuck/5837)

<div class="topic-metadata">

**Author:** [@somaflaco](https://discourse.processing.org/u/somaflaco)\
**Replies:** 7\
**Last updated:** [November 24, 2018, 12:07pm UTC](https://discourse.processing.org/t/building-a-clock-i-got-stuck/5837 "2018-11-24T12:07:17Z")

</div>

Hey Guys, I’m completely new to processing and i’m trying to build a clock. I want the top row to indicate the hours (12rects), the second row to indicate the tens digits for the minutes (6rects), the third row to in…

---

## [Mousewheel\_plusplus](https://discourse.processing.org/t/mousewheel-plusplus/5839)

<div class="topic-metadata">

**Author:** [@kll](https://discourse.processing.org/u/kll)\
**Replies:** 4\
**Last updated:** [November 24, 2018, 12:42am UTC](https://discourse.processing.org/t/mousewheel-plusplus/5839 "2018-11-24T00:42:59Z")

</div>

details / code// file: mousewheel\_plusplus.pde // system win 7 processing 3.4 // by KLL // mouseWheel ++ // "Scrollitis", a operational concept study // idea is to multiplex the mouseWheel use // by mixing it w…

---

## ["Langton's Car" Not working](https://discourse.processing.org/t/langtons-car-not-working/5817)

<div class="topic-metadata">

**Author:** [@MCCreeper8890](https://discourse.processing.org/u/MCCreeper8890)\
**Replies:** 8\
**Last updated:** [November 23, 2018, 10:53pm UTC](https://discourse.processing.org/t/langtons-car-not-working/5817 "2018-11-23T22:53:00Z")

</div>

The idea is this: Set all pixels positions on screen to a random value of either 0,1,2, or 3. Set a particle “car” in the middle with an arbitrary velocity vector. On each frame, the car will move to a new position. if …

---

## [Canvas Window Offscreen](https://discourse.processing.org/t/canvas-window-offscreen/5853)

<div class="topic-metadata">

**Author:** [@Aleksi](https://discourse.processing.org/u/Aleksi)\
**Replies:** 2\
**Last updated:** [November 23, 2018, 4:10pm UTC](https://discourse.processing.org/t/canvas-window-offscreen/5853 "2018-11-23T16:10:52Z")

</div>

I wasn’t sure where to put this, so I’m putting it here, just as oompa\_1 asked in a previous forum… Actually, to quote oompa\_1: all of a sudden, one of my sketches produces its display window in such a way that I don’…

---

## [Differentiating Array definitions](https://discourse.processing.org/t/differentiating-array-definitions/5834)

<div class="topic-metadata">

**Author:** [@LordCacops](https://discourse.processing.org/u/LordCacops)\
**Replies:** 5\
**Last updated:** [November 23, 2018, 12:13pm UTC](https://discourse.processing.org/t/differentiating-array-definitions/5834 "2018-11-23T12:13:11Z")

</div>

Hello friends, I am programming a genome that’s made of chromosomes. Each chromosome is an array. Each defines its values through symmetry producing operations (symmetry as in retrogrades of the integer sequence of its …

---

## [How can you reuse a variable?](https://discourse.processing.org/t/how-can-you-reuse-a-variable/5842)

<div class="topic-metadata">

**Author:** [@dennisreyes](https://discourse.processing.org/u/dennisreyes)\
**Replies:** 4\
**Last updated:** [November 23, 2018, 3:19am UTC](https://discourse.processing.org/t/how-can-you-reuse-a-variable/5842 "2018-11-23T03:19:39Z")

</div>

I’m trying to make some sort of non-graphic version of a game. It involves two dices and when you roll any number besides the ones listed, you roll again until you get the one on the first roll. What have I done wrong or…

---

## [Random StrokeWeight not working?](https://discourse.processing.org/t/random-strokeweight-not-working/5840)

<div class="topic-metadata">

**Author:** [@ReDeagle](https://discourse.processing.org/u/ReDeagle)\
**Replies:** 2\
**Last updated:** [November 23, 2018, 2:45am UTC](https://discourse.processing.org/t/random-strokeweight-not-working/5840 "2018-11-23T02:45:36Z")

</div>

Hey everyone, I’m making a program that will output balloons of different sizes using for loops. The fill should also be using stroke (another for loop). The program outputs balloons of the same size (code is below)… Hel…

---

## [Change tint/color of image on click](https://discourse.processing.org/t/change-tint-color-of-image-on-click/4517)

<div class="topic-metadata">

**Author:** [@dennisreyes](https://discourse.processing.org/u/dennisreyes)\
**Replies:** 5\
**Last updated:** [October 16, 2018, 10:31pm UTC](https://discourse.processing.org/t/change-tint-color-of-image-on-click/4517 "2018-10-16T22:31:27Z")

</div>

Hi! I am new to processing and I was wondering if it is possible to change the tint of an image on click?

---

## [Not Understanding This](https://discourse.processing.org/t/not-understanding-this/5826)

<div class="topic-metadata">

**Author:** [@HoboGreed](https://discourse.processing.org/u/HoboGreed)\
**Replies:** 10\
**Last updated:** [November 23, 2018, 1:24am UTC](https://discourse.processing.org/t/not-understanding-this/5826 "2018-11-23T01:24:15Z")

</div>

Why does set(int(X),int(Y),255); work in Setup but not in draw and yet set(int(X),int(Y),0xffffffff); does work in draw ? float X,Y; void setup(){ size(512,512); background(0); X=256;Y=256; //set(int(X),int(Y),…

---

## [Animating simple motion of line with clean fade not overwriting with background(0)](https://discourse.processing.org/t/animating-simple-motion-of-line-with-clean-fade-not-overwriting-with-background-0/5823)

<div class="topic-metadata">

**Author:** [@gabecolors](https://discourse.processing.org/u/gabecolors)\
**Replies:** 13\
**Last updated:** [November 22, 2018, 4:56pm UTC](https://discourse.processing.org/t/animating-simple-motion-of-line-with-clean-fade-not-overwriting-with-background-0/5823 "2018-11-22T16:56:18Z")

</div>

I am a newbie learning nested loops, for, while, if, else, etc. My intention is to create a series of horizontal white lines that are animated moving downwards. The number and distance should be variables I can later ou…

---

## [Sending byte array over processing network (Processing 3)](https://discourse.processing.org/t/sending-byte-array-over-processing-network-processing-3/5685)

<div class="topic-metadata">

**Author:** [@Bluu](https://discourse.processing.org/u/Bluu)\
**Replies:** 11\
**Last updated:** [November 22, 2018, 5:37pm UTC](https://discourse.processing.org/t/sending-byte-array-over-processing-network-processing-3/5685 "2018-11-22T17:37:27Z")

</div>

I’m trying to send an image over a byte array data stream in processing with the code below, but as networking is poorly documented in processing, I think there’s only a way to receive a string and convert it to a byte a…

---

## [Control GPU fan speed](https://discourse.processing.org/t/control-gpu-fan-speed/5820)

<div class="topic-metadata">

**Author:** [@shoaibmirza](https://discourse.processing.org/u/shoaibmirza)\
**Replies:** 7\
**Last updated:** [November 22, 2018, 5:20pm UTC](https://discourse.processing.org/t/control-gpu-fan-speed/5820 "2018-11-22T17:20:33Z")

</div>

Hi. i am trying to control my GPU(Graphics card) fan speed using processing. is there any library or API to do that ? my GPU : nvidia GTX1070 my OS : windows 10 / 64bit Thanks in advance. shoaib

---

## [Why is my ball going downwards?](https://discourse.processing.org/t/why-is-my-ball-going-downwards/5822)

<div class="topic-metadata">

**Author:** [@OliverMcDk](https://discourse.processing.org/u/OliverMcDk)\
**Replies:** 7\
**Last updated:** [November 22, 2018, 4:39pm UTC](https://discourse.processing.org/t/why-is-my-ball-going-downwards/5822 "2018-11-22T16:39:20Z")

</div>

Hey, can anyone help me to get my ball to “shoot” upwards. Kinda like a canon, so my ball shoots, and i can change the degrees its shoots after. My code is very simple, cause im new to this program. We are trying to ma…

---

## [ATM machine project help](https://discourse.processing.org/t/atm-machine-project-help/5804)

<div class="topic-metadata">

**Author:** [@Sventhepuffin](https://discourse.processing.org/u/Sventhepuffin)\
**Replies:** 4\
**Last updated:** [November 22, 2018, 2:49am UTC](https://discourse.processing.org/t/atm-machine-project-help/5804 "2018-11-22T02:49:25Z")

</div>

I was wondering if anyone could help me remove the features of this code for a calculator I made and make it into an ATM. I’m having difficulty adjusting the code so it doesn’t display in such an odd way on the bottom of…

---

## [3D solar system simulator](https://discourse.processing.org/t/3d-solar-system-simulator/5478)

<div class="topic-metadata">

**Author:** [@AidanLand](https://discourse.processing.org/u/AidanLand)\
**Replies:** 5\
**Last updated:** [November 22, 2018, 1:51am UTC](https://discourse.processing.org/t/3d-solar-system-simulator/5478 "2018-11-22T01:51:32Z")

</div>

Hi, I’m trying to build a 3d solar system simulator in processing :star: :thinking: . I was wondering what would be a good library to do this with. I want to be able to move around in my program and have moving objects …

---

## [Translate Java code into Processing](https://discourse.processing.org/t/translate-java-code-into-processing/5807)

<div class="topic-metadata">

**Author:** [@DarkSt0ne](https://discourse.processing.org/u/DarkSt0ne)\
**Replies:** 1\
**Last updated:** [November 21, 2018, 10:31pm UTC](https://discourse.processing.org/t/translate-java-code-into-processing/5807 "2018-11-21T22:31:51Z")

</div>

Hello there, I was wondering if any of you could translate the following java code into processing: import java.util.Scanner; public class AtmMachine{ private static Scanner in; private static float balance = 0 ; /…

---

## [Need help with frogger](https://discourse.processing.org/t/need-help-with-frogger/5639)

<div class="topic-metadata">

**Author:** [@Hunter\_noob](https://discourse.processing.org/u/Hunter_noob)\
**Replies:** 3\
**Last updated:** [November 21, 2018, 9:30pm UTC](https://discourse.processing.org/t/need-help-with-frogger/5639 "2018-11-21T21:30:16Z")

</div>

Hi guys, I’m working on a processing game called Frogger. I created the world and the frog, but I could not move the frog. I am pretty sure there are some problems in my codes, but I just could not find the problems, co…

---

## [Inheritance override draw()](https://discourse.processing.org/t/inheritance-override-draw/5724)

<div class="topic-metadata">

**Author:** [@donone](https://discourse.processing.org/u/donone)\
**Replies:** 6\
**Last updated:** [November 21, 2018, 6:59pm UTC](https://discourse.processing.org/t/inheritance-override-draw/5724 "2018-11-21T18:59:33Z")

</div>

I have a class using registerMethod(“draw”,this); Works fine. In a subclass I am attempting to override the draw() method in the parent in order to ‘add’ to the original. I cannot override, and I have tried super.draw(…

---

## [Hexadecimal annotation for colors, is it faster?](https://discourse.processing.org/t/hexadecimal-annotation-for-colors-is-it-faster/5777)

<div class="topic-metadata">

**Author:** [@solub](https://discourse.processing.org/u/solub)\
**Replies:** 3\
**Last updated:** [November 21, 2018, 6:39pm UTC](https://discourse.processing.org/t/hexadecimal-annotation-for-colors-is-it-faster/5777 "2018-11-21T18:39:47Z")

</div>

Hi, The title says it all, I’d like to know if calling colors with hexadecimal annotations is faster than the usual color(255, 0, 0) for instance. Thanks

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

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