# Coding Questions

**URL:** https://discourse.processing.org/c/processing/processing-questions/15.md?page=27

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

**Page:** 28

---

## [Table findRows() multiple criteria](https://discourse.processing.org/t/table-findrows-multiple-criteria/37595)

<div class="topic-metadata">

**Author:** [@Erif](https://discourse.processing.org/u/Erif)\
**Replies:** 18\
**Last updated:** [June 22, 2022, 9:56am UTC](https://discourse.processing.org/t/table-findrows-multiple-criteria/37595 "2022-06-22T09:56:39Z")

</div>

Hello, Say I’m importing a .csv table where headers are: Column 2 - Data\_value Column 11 - Series\_title\_2 and I’m printing out the values from column 2 where column 11 contains “Mining”, as follows: Table table = lo…

---

## [Sieve of Eratosthenes Crash! NullPointerException](https://discourse.processing.org/t/sieve-of-eratosthenes-crash-nullpointerexception/22450)

<div class="topic-metadata">

**Author:** [@Maxnotabletoprogramm](https://discourse.processing.org/u/Maxnotabletoprogramm)\
**Replies:** 10\
**Last updated:** [June 21, 2022, 3:35pm UTC](https://discourse.processing.org/t/sieve-of-eratosthenes-crash-nullpointerexception/22450 "2022-06-21T15:35:07Z")

</div>

Hey, Im currently trying(!) to make a sieve of eratosthenes in processing as a school project. This is my code: int max=1500; //maximale zahl für die Primzahlen berechnet werden sollen int p=2; // boolean\[\] pr…

---

## [Random word generator](https://discourse.processing.org/t/random-word-generator/37667)

<div class="topic-metadata">

**Author:** [@FrankyWes](https://discourse.processing.org/u/FrankyWes)\
**Replies:** 1\
**Last updated:** [June 21, 2022, 11:26am UTC](https://discourse.processing.org/t/random-word-generator/37667 "2022-06-21T11:26:18Z")

</div>

Yo smart people, I am currently working on a random word generator. The reason for it is to give an objective either every 15 minutes or by key press. For instance “Draw the letter B”. I got the randomiser, but it is ei…

---

## [Text outline neon](https://discourse.processing.org/t/text-outline-neon/37639)

<div class="topic-metadata">

**Author:** [@PhySan](https://discourse.processing.org/u/PhySan)\
**Replies:** 5\
**Last updated:** [June 20, 2022, 7:06pm UTC](https://discourse.processing.org/t/text-outline-neon/37639 "2022-06-20T19:06:33Z")

</div>

Hi all, I am trying to play a little with lettering, outline and lights and I am trying to simulate some neon letters that can light up and appear to glow. I used the blur filter to achieve the glow effect. However, th…

---

## [Constant length line](https://discourse.processing.org/t/constant-length-line/37637)

<div class="topic-metadata">

**Author:** [@chaotic.rabbit](https://discourse.processing.org/u/chaotic.rabbit)\
**Replies:** 3\
**Last updated:** [June 19, 2022, 1:54pm UTC](https://discourse.processing.org/t/constant-length-line/37637 "2022-06-19T13:54:10Z")

</div>

Hi! I’m still new at processing. I’m trying to write a program that generates random line positions but all lines are of the same length. I want to further develop it to generate different coloured lines according to the…

---

## [Any way to access stored values of fill() outside of rect(), circle(), etc.?](https://discourse.processing.org/t/any-way-to-access-stored-values-of-fill-outside-of-rect-circle-etc/37631)

<div class="topic-metadata">

**Author:** [@Epsilon11](https://discourse.processing.org/u/Epsilon11)\
**Replies:** 4\
**Last updated:** [June 19, 2022, 6:45am UTC](https://discourse.processing.org/t/any-way-to-access-stored-values-of-fill-outside-of-rect-circle-etc/37631 "2022-06-19T06:45:26Z")

</div>

Is there a way to get the current color values in a function? for example: fill(255, 0, 80); void function() { loadPixels(); for (int i = 0; i \< pixels.length; i++) { pixels\[i\] = color( \*\*\*fill values\*\*…

---

## [Turn a circle into a square](https://discourse.processing.org/t/turn-a-circle-into-a-square/37509)

<div class="topic-metadata">

**Author:** [@student00](https://discourse.processing.org/u/student00)\
**Replies:** 1\
**Last updated:** [June 13, 2022, 3:33am UTC](https://discourse.processing.org/t/turn-a-circle-into-a-square/37509 "2022-06-13T03:33:49Z")

</div>

Hi, I am not used to English, so the sentences may be strange. When the mouse clicks on the moving circle, I want the clicked circle to be changed to a line. The square should move like a mouse pointer. boolean doSa…

---

## [Converting straight lines segments into a bezier curve of same shape](https://discourse.processing.org/t/converting-straight-lines-segments-into-a-bezier-curve-of-same-shape/35333)

<div class="topic-metadata">

**Author:** [@grshch](https://discourse.processing.org/u/grshch)\
**Replies:** 8\
**Last updated:** [June 17, 2022, 6:59pm UTC](https://discourse.processing.org/t/converting-straight-lines-segments-into-a-bezier-curve-of-same-shape/35333 "2022-06-17T18:59:31Z")

</div>

Hello, everyone! I am making a typeface, styles of which are generated by algorithm from one root style. the main alogritm is raster-based (reaction-diffusion). Then I make a super detailed PVector curve by finding the…

---

## [Regular expressions "bypassing" conditions](https://discourse.processing.org/t/regular-expressions-bypassing-conditions/37613)

<div class="topic-metadata">

**Author:** [@NumericPrime](https://discourse.processing.org/u/NumericPrime)\
**Replies:** 1\
**Last updated:** [June 18, 2022, 11:39am UTC](https://discourse.processing.org/t/regular-expressions-bypassing-conditions/37613 "2022-06-18T11:39:31Z")

</div>

I’m currently experementing with regular expressions. And am currently writing code that is supposed to take a String and find all points where a string is defined in code like “test” or ““this text is in quotes””. I se…

---

## [Bar chart - Display data when hovering](https://discourse.processing.org/t/bar-chart-display-data-when-hovering/37571)

<div class="topic-metadata">

**Author:** [@Erif](https://discourse.processing.org/u/Erif)\
**Replies:** 12\
**Last updated:** [June 16, 2022, 1:31pm UTC](https://discourse.processing.org/t/bar-chart-display-data-when-hovering/37571 "2022-06-16T13:31:55Z")

</div>

Hi all, I’m trying to represent a very basic 1-column table as a bar chart. The .csv file reads as follows: Value 50 100 150 200 250 300 350 400 450 500 My problem is I can’t manage to display each value o…

---

## [I need help with the command save() and begin/endRecord()](https://discourse.processing.org/t/i-need-help-with-the-command-save-and-begin-endrecord/37563)

<div class="topic-metadata">

**Author:** [@Ld44hbxhkhr](https://discourse.processing.org/u/Ld44hbxhkhr)\
**Replies:** 6\
**Last updated:** [June 16, 2022, 8:34am UTC](https://discourse.processing.org/t/i-need-help-with-the-command-save-and-begin-endrecord/37563 "2022-06-16T08:34:50Z")

</div>

Greetings, I have a problem, where Processing won’t save a pdf/jpg-file, after I especially asked it for this. I at first used the both commands save() and begin/endRecord() in my main sketch with no problems, then mov…

---

## [I dont understand why my objects are out of sync?](https://discourse.processing.org/t/i-dont-understand-why-my-objects-are-out-of-sync/37499)

<div class="topic-metadata">

**Author:** [@SpaceWave](https://discourse.processing.org/u/SpaceWave)\
**Replies:** 3\
**Last updated:** [June 15, 2022, 8:52am UTC](https://discourse.processing.org/t/i-dont-understand-why-my-objects-are-out-of-sync/37499 "2022-06-15T08:52:58Z")

</div>

Excuse my formatting as this is my first forum post, thank you in advance. I have written some code to generate balls that form a circle around (0,0), and then move a set distance away from (0,0) before reversing their …

---

## [I need help with arrays](https://discourse.processing.org/t/i-need-help-with-arrays/37381)

<div class="topic-metadata">

**Author:** [@JosepAlqueza](https://discourse.processing.org/u/JosepAlqueza)\
**Replies:** 15\
**Last updated:** [June 14, 2022, 11:46am UTC](https://discourse.processing.org/t/i-need-help-with-arrays/37381 "2022-06-14T11:46:11Z")

</div>

Hello to all! The program will have to calculate the Santiago de Compostela distance (x, y position 490,110) to all cities and save the coordinates and distance from the city further away in the Array distances. Likewis…

---

## [Launch() function does not work](https://discourse.processing.org/t/launch-function-does-not-work/37459)

<div class="topic-metadata">

**Author:** [@Logenli](https://discourse.processing.org/u/Logenli)\
**Replies:** 6\
**Last updated:** [June 13, 2022, 12:09am UTC](https://discourse.processing.org/t/launch-function-does-not-work/37459 "2022-06-13T00:09:49Z")

</div>

Objective: I want to activate/run another processing script using controlp5 button. When users click the button, they can trigger the target script. What I have so far: Here is my code: import controlP5.\*; void setu…

---

## [Can I use map () in a loop?](https://discourse.processing.org/t/can-i-use-map-in-a-loop/37511)

<div class="topic-metadata">

**Author:** [@mvb](https://discourse.processing.org/u/mvb)\
**Replies:** 1\
**Last updated:** [June 12, 2022, 11:26pm UTC](https://discourse.processing.org/t/can-i-use-map-in-a-loop/37511 "2022-06-12T23:26:37Z")

</div>

I have a piece of code and I want to use the map() in order to have the last column of the array with values between 5 and 60. 5 will equal to the minimum value and 60 to the maximum, and the numbers in the middle they w…

---

## [Need help on making scene interactive for semester project](https://discourse.processing.org/t/need-help-on-making-scene-interactive-for-semester-project/37461)

<div class="topic-metadata">

**Author:** [@mahnc1](https://discourse.processing.org/u/mahnc1)\
**Replies:** 4\
**Last updated:** [June 12, 2022, 12:52pm UTC](https://discourse.processing.org/t/need-help-on-making-scene-interactive-for-semester-project/37461 "2022-06-12T12:52:48Z")

</div>

Hi, I have recently been writing a paper on how code can be used to solve modern design problems and really want to show off how interactive coding can be. I am extremely interested yet sadly lack the knowledge and exp…

---

## [What value is missing in my JSON parse?](https://discourse.processing.org/t/what-value-is-missing-in-my-json-parse/37483)

<div class="topic-metadata">

**Author:** [@gis667](https://discourse.processing.org/u/gis667)\
**Replies:** 1\
**Last updated:** [June 12, 2022, 1:28am UTC](https://discourse.processing.org/t/what-value-is-missing-in-my-json-parse/37483 "2022-06-12T01:28:18Z")

</div>

I’m working on building two programs, one in Python and one in Processing, to communicate over socket TCP / data stream. 75% is working perfectly: Encoding JSON and sending over socket from Processing Receiving messag…

---

## [Combined arrays position text](https://discourse.processing.org/t/combined-arrays-position-text/37452)

<div class="topic-metadata">

**Author:** [@mvb](https://discourse.processing.org/u/mvb)\
**Replies:** 2\
**Last updated:** [June 10, 2022, 4:24pm UTC](https://discourse.processing.org/t/combined-arrays-position-text/37452 "2022-06-10T16:24:07Z")

</div>

I have a loaded image of a country and an int array with the coordinates and population of each city, and another string array with the names of the cities. I want to combine them and have the names of the cities appea…

---

## [Translate indefinitely in a for loop](https://discourse.processing.org/t/translate-indefinitely-in-a-for-loop/37373)

<div class="topic-metadata">

**Author:** [@yves](https://discourse.processing.org/u/yves)\
**Replies:** 10\
**Last updated:** [June 9, 2022, 3:30pm UTC](https://discourse.processing.org/t/translate-indefinitely-in-a-for-loop/37373 "2022-06-09T15:30:52Z")

</div>

Hi everyone, I try to translate indefinitely a loop of rectangles, but it doesn’t work properly my code : pushMatrix() ; pushStyle(); fill(255); for (float i=0; i \< width; i = i + 100) { for (int x = 0…

---

## [Mouse click to add rows and columns to grid](https://discourse.processing.org/t/mouse-click-to-add-rows-and-columns-to-grid/37392)

<div class="topic-metadata">

**Author:** [@hues\_storm](https://discourse.processing.org/u/hues_storm)\
**Replies:** 2\
**Last updated:** [June 7, 2022, 9:09pm UTC](https://discourse.processing.org/t/mouse-click-to-add-rows-and-columns-to-grid/37392 "2022-06-07T21:09:49Z")

</div>

Hi, hope someone can help - I am trying to make a grid that when you mouse is clicked it adds another column and row - like an ever expanding grid - I have the base set up for a grid and i know i need a void mouseFuncti…

---

## [Need help w/ keyboard that take multiple inputs at once](https://discourse.processing.org/t/need-help-w-keyboard-that-take-multiple-inputs-at-once/37323)

<div class="topic-metadata">

**Author:** [@Mook](https://discourse.processing.org/u/Mook)\
**Replies:** 17\
**Last updated:** [June 7, 2022, 9:08pm UTC](https://discourse.processing.org/t/need-help-w-keyboard-that-take-multiple-inputs-at-once/37323 "2022-06-07T21:08:32Z")

</div>

I’m trying to make a program that can take for example, “LG” (pressed at the same time) as an input and output a unique letter. So far I’ve done the usual if (key == 108) { lDown = true; } if (key == 103) { gDown …

---

## [Storing Animation Frames in 2d Array](https://discourse.processing.org/t/storing-animation-frames-in-2d-array/37383)

<div class="topic-metadata">

**Author:** [@GloriousZero](https://discourse.processing.org/u/GloriousZero)\
**Replies:** 6\
**Last updated:** [June 7, 2022, 8:30pm UTC](https://discourse.processing.org/t/storing-animation-frames-in-2d-array/37383 "2022-06-07T20:30:41Z")

</div>

Currently creating an animation that responds on sound. The animation has 10 loops and 375 frames per loop. these frames are .jpg so to load them in i use a 2d array for( int i=0; i\<Phase; i++) { for( int j=0; j\<F…

---

## [Problem with duplicate objects when exporting to PDF](https://discourse.processing.org/t/problem-with-duplicate-objects-when-exporting-to-pdf/37364)

<div class="topic-metadata">

**Author:** [@S0r0ka](https://discourse.processing.org/u/S0r0ka)\
**Replies:** 10\
**Last updated:** [June 6, 2022, 6:37pm UTC](https://discourse.processing.org/t/problem-with-duplicate-objects-when-exporting-to-pdf/37364 "2022-06-06T18:37:47Z")

</div>

Could someone help me figure out how to upload to PDF? I draw a simple circle and export the result to PDF. When I open the file in a vector program, I see that two objects have been unloaded at the same place. One objec…

---

## [Can you please tell me what I am doing wrong?](https://discourse.processing.org/t/can-you-please-tell-me-what-i-am-doing-wrong/37330)

<div class="topic-metadata">

**Author:** [@eve](https://discourse.processing.org/u/eve)\
**Replies:** 3\
**Last updated:** [June 6, 2022, 11:14am UTC](https://discourse.processing.org/t/can-you-please-tell-me-what-i-am-doing-wrong/37330 "2022-06-06T11:14:57Z")

</div>

Hi there! I’m a real real beginner student… I’ve got a problem while doing my homework. the task is to make 3D QUAD that can be textured in ‘class’ using beginShape(QUADS), endShape(), vertex(x,y,z,tx,ty), texture…

---

## [How do I pick a string from an array on mouse press?](https://discourse.processing.org/t/how-do-i-pick-a-string-from-an-array-on-mouse-press/37310)

<div class="topic-metadata">

**Author:** [@seeker](https://discourse.processing.org/u/seeker)\
**Replies:** 2\
**Last updated:** [June 6, 2022, 6:40am UTC](https://discourse.processing.org/t/how-do-i-pick-a-string-from-an-array-on-mouse-press/37310 "2022-06-06T06:40:38Z")

</div>

Hi, I want to do the following: Display text from an array on the screen When mouse is not pressed, always display the first string in the array When mouse is pressed, choose a random string from the array and have thi…

---

## [Do you know why there is an error? I found a new problem](https://discourse.processing.org/t/do-you-know-why-there-is-an-error-i-found-a-new-problem/37315)

<div class="topic-metadata">

**Author:** [@ell](https://discourse.processing.org/u/ell)\
**Replies:** 5\
**Last updated:** [June 4, 2022, 5:54pm UTC](https://discourse.processing.org/t/do-you-know-why-there-is-an-error-i-found-a-new-problem/37315 "2022-06-04T17:54:20Z")

</div>

Hello genius! I posted a question yesterday and it was solved, but I am facing a new problem again, so I am asking you again. There’s a problem with the first line of code. It is said that the active mode and static m…

---

## [Forcing a program to end](https://discourse.processing.org/t/forcing-a-program-to-end/37251)

<div class="topic-metadata">

**Author:** [@Timeless\_Mage](https://discourse.processing.org/u/Timeless_Mage)\
**Replies:** 4\
**Last updated:** [June 3, 2022, 1:17pm UTC](https://discourse.processing.org/t/forcing-a-program-to-end/37251 "2022-06-03T13:17:08Z")

</div>

I am writing code to click different colored pixels on my screen, and I need a way to stop it. I have tried the noLoop() function in multiple places, but that did not work. Does anyone have any idea of how to reliably …

---

## [Do you know why there is an error?](https://discourse.processing.org/t/do-you-know-why-there-is-an-error/37301)

<div class="topic-metadata">

**Author:** [@ell](https://discourse.processing.org/u/ell)\
**Replies:** 6\
**Last updated:** [June 4, 2022, 5:46am UTC](https://discourse.processing.org/t/do-you-know-why-there-is-an-error/37301 "2022-06-04T05:46:33Z")

</div>

Hello genius! I’m a beginner and I need your help. Why is there an error in the first line of this code? int s\_num = 40; PShape s; PShape b; Virus Virus1 = new Virus\[s\_num\]; Cell Cells= new Cell\[40\]; void setup() …

---

## [Loop with increasing inclination](https://discourse.processing.org/t/loop-with-increasing-inclination/37240)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 24\
**Last updated:** [June 3, 2022, 1:54pm UTC](https://discourse.processing.org/t/loop-with-increasing-inclination/37240 "2022-06-03T13:54:59Z")

</div>

Hi there! I want to make a loop with diagonal lines whose inclination grows little by little. My loop draws lines 10 by 10, but I want to incline them 1 by 1 and I don’t know how. If I use variable ‘i’ I think increase s…

---

## [How do I cycle/lerp between multiple colors](https://discourse.processing.org/t/how-do-i-cycle-lerp-between-multiple-colors/13441)

<div class="topic-metadata">

**Author:** [@laxaa](https://discourse.processing.org/u/laxaa)\
**Replies:** 17\
**Last updated:** [June 2, 2022, 5:13pm UTC](https://discourse.processing.org/t/how-do-i-cycle-lerp-between-multiple-colors/13441 "2022-06-02T17:13:20Z")

</div>

Hi I’m new to the world of Processing and I’ve turned to the community to get some help on a very specific issue I’ve been trying to solve. I’m creating a “BMP clock”( or a "circular BPM visualizer), so to speak, and I…

[Previous page](https://discourse.processing.org/c/processing/processing-questions/15.md?page=26)

[Next page](https://discourse.processing.org/c/processing/processing-questions/15.md?page=28)
