# Coding Questions

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

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

**Page:** 99

---

## [SVG file does not rotate in place on it's center](https://discourse.processing.org/t/svg-file-does-not-rotate-in-place-on-its-center/19829)

<div class="topic-metadata">

**Author:** [@moziauddin](https://discourse.processing.org/u/moziauddin)\
**Replies:** 10\
**Last updated:** [April 21, 2020, 12:45am UTC](https://discourse.processing.org/t/svg-file-does-not-rotate-in-place-on-its-center/19829 "2020-04-21T00:45:52Z")

</div>

Hello, I have an svg file I would like to load and rotate. I have tried it by the traditional translate() and rotate() methods, but they don’t seem to have any effect. I was successfully able to rotate the svg shape usi…

---

## [Trying to convert 2 objects into a super class and a subclass](https://discourse.processing.org/t/trying-to-convert-2-objects-into-a-super-class-and-a-subclass/19977)

<div class="topic-metadata">

**Author:** [@debxyz](https://discourse.processing.org/u/debxyz)\
**Replies:** 2\
**Last updated:** [April 21, 2020, 12:21am UTC](https://discourse.processing.org/t/trying-to-convert-2-objects-into-a-super-class-and-a-subclass/19977 "2020-04-21T00:21:58Z")

</div>

I’ve watched the videos, read the reference, but am hitting a wall. Not sure what I’m overlooking at this point. Attempting to convert an earlier sketch into one implementing inheritance classes. I think part of the pr…

---

## [Sorting ArrayList of Objects](https://discourse.processing.org/t/sorting-arraylist-of-objects/19552)

<div class="topic-metadata">

**Author:** [@eduzal](https://discourse.processing.org/u/eduzal)\
**Replies:** 11\
**Last updated:** [April 20, 2020, 8:58pm UTC](https://discourse.processing.org/t/sorting-arraylist-of-objects/19552 "2020-04-20T20:58:42Z")

</div>

Hi. I’m having some trouble with sorting ArrayLists of Objects. I’m studying the Comprable interface but still have doubts on it’s implementation. I’m doing a sketch that reads and compile local Covid-19 data. All my da…

---

## [Generating Arguments in Functions](https://discourse.processing.org/t/generating-arguments-in-functions/19859)

<div class="topic-metadata">

**Author:** [@confusedstudent](https://discourse.processing.org/u/confusedstudent)\
**Replies:** 2\
**Last updated:** [April 20, 2020, 8:58pm UTC](https://discourse.processing.org/t/generating-arguments-in-functions/19859 "2020-04-20T20:58:55Z")

</div>

Hello! I need some help with functions. My teacher has asked, “Write a function named distance that accepts a vehicle’s speed and time as arguments, and returns the distance the vehicle has traveled.” I am able to c…

---

## [Understanding millis()](https://discourse.processing.org/t/understanding-millis/19964)

<div class="topic-metadata">

**Author:** [@14mmss](https://discourse.processing.org/u/14mmss)\
**Replies:** 1\
**Last updated:** [April 20, 2020, 4:10pm UTC](https://discourse.processing.org/t/understanding-millis/19964 "2020-04-20T16:10:46Z")

</div>

hello, I never seem to understand how the mills() function works, I am working on the variation simple stimulus assignment now and the time only continues counting if I keep pressing space, where should I put my initial…

---

## [Help with lab "Changeable Chain"](https://discourse.processing.org/t/help-with-lab-changeable-chain/19966)

<div class="topic-metadata">

**Author:** [@Jonathan25711](https://discourse.processing.org/u/Jonathan25711)\
**Replies:** 3\
**Last updated:** [April 20, 2020, 5:16pm UTC](https://discourse.processing.org/t/help-with-lab-changeable-chain/19966 "2020-04-20T17:16:50Z")

</div>

please format code with \</\> button \* homework policy \* asking questions The labs require this. Instructions for Lab 7.5 Changeable Chain First Lab: First declare two Integer arrays of size 5 to store the x locati…

---

## [Blending fill colors across mouse movements](https://discourse.processing.org/t/blending-fill-colors-across-mouse-movements/19899)

<div class="topic-metadata">

**Author:** [@sixfeet](https://discourse.processing.org/u/sixfeet)\
**Replies:** 2\
**Last updated:** [April 19, 2020, 4:02pm UTC](https://discourse.processing.org/t/blending-fill-colors-across-mouse-movements/19899 "2020-04-19T16:02:19Z")

</div>

I saw this cool video the other day and am trying to replicate how its done. It’s pretty straight forward but the thing I’m stuck on is how to get the drawn shapes to be more blurred and have a smooth gradient across th…

---

## [N-dimensional sorting and color](https://discourse.processing.org/t/n-dimensional-sorting-and-color/19711)

<div class="topic-metadata">

**Author:** [@Pisicandru](https://discourse.processing.org/u/Pisicandru)\
**Replies:** 25\
**Last updated:** [April 19, 2020, 3:47pm UTC](https://discourse.processing.org/t/n-dimensional-sorting-and-color/19711 "2020-04-19T15:47:09Z")

</div>

---

## [Need help rotating flags every 2 seconds](https://discourse.processing.org/t/need-help-rotating-flags-every-2-seconds/19776)

<div class="topic-metadata">

**Author:** [@Hypercube](https://discourse.processing.org/u/Hypercube)\
**Replies:** 4\
**Last updated:** [April 19, 2020, 8:13am UTC](https://discourse.processing.org/t/need-help-rotating-flags-every-2-seconds/19776 "2020-04-19T08:13:46Z")

</div>

I’m trying to write a program that draws 4 flags of different countries and rotates them every 2 seconds. For example it starts out as: Iceland Italy Russia Sweden After two seconds it should be: Italy Russia Swede…

---

## [Multiple Cursors](https://discourse.processing.org/t/multiple-cursors/19481)

<div class="topic-metadata">

**Author:** [@JGSalgueiro](https://discourse.processing.org/u/JGSalgueiro)\
**Replies:** 1\
**Last updated:** [April 18, 2020, 10:00pm UTC](https://discourse.processing.org/t/multiple-cursors/19481 "2020-04-18T22:00:37Z")

</div>

Hi guys! Its my first post here and i hope it wont be my last. I ve been coding for a couple years but im still new to java and Processing. My question is: Is it possible to have multiple cursors all comanded by your m…

---

## [Cannot make static reference to non static method](https://discourse.processing.org/t/cannot-make-static-reference-to-non-static-method/19504)

<div class="topic-metadata">

**Author:** [@smep](https://discourse.processing.org/u/smep)\
**Replies:** 1\
**Last updated:** [April 18, 2020, 9:43pm UTC](https://discourse.processing.org/t/cannot-make-static-reference-to-non-static-method/19504 "2020-04-18T21:43:57Z")

</div>

creating a virtual stock market having been given a data list of 1000 daily stock prices which has been loaded in separately. my problem is when I try to do Graph.draw(); in my main class it gives me an error of cannot m…

---

## [Bouncing of an immovable large circle, a moving small circle and a gravity and right force vector](https://discourse.processing.org/t/bouncing-of-an-immovable-large-circle-a-moving-small-circle-and-a-gravity-and-right-force-vector/19443)

<div class="topic-metadata">

**Author:** [@worm888](https://discourse.processing.org/u/worm888)\
**Replies:** 2\
**Last updated:** [April 18, 2020, 9:26pm UTC](https://discourse.processing.org/t/bouncing-of-an-immovable-large-circle-a-moving-small-circle-and-a-gravity-and-right-force-vector/19443 "2020-04-18T21:26:16Z")

</div>

planangle = new PVector(location.x-plan.location.x, location.y-plan.location.y); // if (-90\<velocity.heading() && velocity.heading()\<90) { // planangle.rotate(PI); //} if (dist(location.x, location.y, pla…

---

## [How Can I Control Vectors via Grayscale Values of An Image?](https://discourse.processing.org/t/how-can-i-control-vectors-via-grayscale-values-of-an-image/19905)

<div class="topic-metadata">

**Author:** [@Peyton](https://discourse.processing.org/u/Peyton)\
**Replies:** 0\
**Last updated:** [April 18, 2020, 8:55pm UTC](https://discourse.processing.org/t/how-can-i-control-vectors-via-grayscale-values-of-an-image/19905 "2020-04-18T20:55:35Z")

</div>

Hi! I am obsessed with the look of Perlin noise, and decided to try to use it (and Processing) for the first time, to design a piece for a design project. At the moment, I have a flowfield that creates some awesome looki…

---

## [Altering Magnitude of Noise Value at Specific Coordinate](https://discourse.processing.org/t/altering-magnitude-of-noise-value-at-specific-coordinate/19718)

<div class="topic-metadata">

**Author:** [@heatmiser](https://discourse.processing.org/u/heatmiser)\
**Replies:** 1\
**Last updated:** [April 18, 2020, 6:59pm UTC](https://discourse.processing.org/t/altering-magnitude-of-noise-value-at-specific-coordinate/19718 "2020-04-18T18:59:54Z")

</div>

Hi, I’m wondering if there is a way to increase the magnitude of noise at specific coordinates. The code below allows me to create topography based on perlin noise. As one can see, I get a noise value for every i and j. …

---

## [Quadrifolium curve](https://discourse.processing.org/t/quadrifolium-curve/19887)

<div class="topic-metadata">

**Author:** [@ElMatematico53](https://discourse.processing.org/u/ElMatematico53)\
**Replies:** 5\
**Last updated:** [April 18, 2020, 6:30pm UTC](https://discourse.processing.org/t/quadrifolium-curve/19887 "2020-04-18T18:30:06Z")

</div>

We have created a quadrifolium function, and we may need help to write its tangent. We would like to see the tangent line every time the mouse is on the function, for each point of it The equation and the parameterizati…

---

## [Help about a code with Processing as a library (IJ IDE)](https://discourse.processing.org/t/help-about-a-code-with-processing-as-a-library-ij-ide/19319)

<div class="topic-metadata">

**Author:** [@Helron](https://discourse.processing.org/u/Helron)\
**Replies:** 7\
**Last updated:** [April 18, 2020, 2:41pm UTC](https://discourse.processing.org/t/help-about-a-code-with-processing-as-a-library-ij-ide/19319 "2020-04-18T14:41:15Z")

</div>

Hello everybody ! Let 's start by a quick présentation because this is my first post. I am learning slowly Java and i have start by processing there is a month and a half. I achieved a game with 2 balls, each jumping…

---

## [I tried implementing a simple pathfinding algorithm by following along with wikipedia](https://discourse.processing.org/t/i-tried-implementing-a-simple-pathfinding-algorithm-by-following-along-with-wikipedia/19851)

<div class="topic-metadata">

**Author:** [@jimather](https://discourse.processing.org/u/jimather)\
**Replies:** 2\
**Last updated:** [April 18, 2020, 3:49am UTC](https://discourse.processing.org/t/i-tried-implementing-a-simple-pathfinding-algorithm-by-following-along-with-wikipedia/19851 "2020-04-18T03:49:21Z")

</div>

So not really sure how to phrase this. It’s not really a specific question as such just more like: “Hey look at this, where is it obviously pants?” So with all the free time recently I thought I’d try to make a tower de…

---

## [Need some advice on assignment (menu symbols)](https://discourse.processing.org/t/need-some-advice-on-assignment-menu-symbols/19842)

<div class="topic-metadata">

**Author:** [@tengtengloves](https://discourse.processing.org/u/tengtengloves)\
**Replies:** 4\
**Last updated:** [April 17, 2020, 3:14pm UTC](https://discourse.processing.org/t/need-some-advice-on-assignment-menu-symbols/19842 "2020-04-17T15:14:20Z")

</div>

I have an assignment due today and I need some advice. I have to plan and create some compelling visual art that visibly changes in real times. I trying to transforming the menu bar into close bar but I not sure how c…

---

## [Animating a rotation of 1 rev/sec or faster smoothly](https://discourse.processing.org/t/animating-a-rotation-of-1-rev-sec-or-faster-smoothly/19857)

<div class="topic-metadata">

**Author:** [@ddownn](https://discourse.processing.org/u/ddownn)\
**Replies:** 6\
**Last updated:** [April 17, 2020, 6:43pm UTC](https://discourse.processing.org/t/animating-a-rotation-of-1-rev-sec-or-faster-smoothly/19857 "2020-04-17T18:43:45Z")

</div>

I would like to have a clock hand rotating at 60 rpm but get rid of the visual effect of seeing the hand in more than one location at a time. Obviously with a frame rate of 60, simply trying to draw the hand at 6 degree …

---

## [Hello! can someone help me with big image in P3D?](https://discourse.processing.org/t/hello-can-someone-help-me-with-big-image-in-p3d/19802)

<div class="topic-metadata">

**Author:** [@vargas](https://discourse.processing.org/u/vargas)\
**Replies:** 4\
**Last updated:** [April 17, 2020, 5:06pm UTC](https://discourse.processing.org/t/hello-can-someone-help-me-with-big-image-in-p3d/19802 "2020-04-17T17:06:18Z")

</div>

I’m writing code using P3D, but I can’t save a file larger than 48cm wide by 30cm high. can someone help me save images in large sizes? Like this: PImage nome; float angle; void setup(){ size(600,600,P3D); backgrou…

---

## [Why do radian degrees look different for arcs versus rotations?](https://discourse.processing.org/t/why-do-radian-degrees-look-different-for-arcs-versus-rotations/19856)

<div class="topic-metadata">

**Author:** [@mnoble](https://discourse.processing.org/u/mnoble)\
**Replies:** 10\
**Last updated:** [April 17, 2020, 4:56pm UTC](https://discourse.processing.org/t/why-do-radian-degrees-look-different-for-arcs-versus-rotations/19856 "2020-04-17T16:56:12Z")

</div>

Hello Forum, I have math confusion. Radian degrees seem to work differently for rotate() versus arc(). Below, I use the first image as a guide for rotating a rect() and the second image as guide for controlling the open…

---

## [A Pulsar Array. Need Help please](https://discourse.processing.org/t/a-pulsar-array-need-help-please/19797)

<div class="topic-metadata">

**Author:** [@gurki](https://discourse.processing.org/u/gurki)\
**Replies:** 9\
**Last updated:** [April 17, 2020, 11:29am UTC](https://discourse.processing.org/t/a-pulsar-array-need-help-please/19797 "2020-04-17T11:29:08Z")

</div>

Hey Guys, this is one of the hardest tasks in the exam. There are another variations in the other exams which I will include in the next days in another topics. Now This task in german Schreiben Sie eine Klasse Pulsar…

---

## [TANGENT CURVE please](https://discourse.processing.org/t/tangent-curve-please/19838)

<div class="topic-metadata">

**Author:** [@onetwothree](https://discourse.processing.org/u/onetwothree)\
**Replies:** 5\
**Last updated:** [April 17, 2020, 1:14am UTC](https://discourse.processing.org/t/tangent-curve-please/19838 "2020-04-17T01:14:50Z")

</div>

Hi, someone who can help me get a code to get the tangent of the different points of a curve like the cissoid of diocles ??,

---

## [How to rotate object around edge?](https://discourse.processing.org/t/how-to-rotate-object-around-edge/19757)

<div class="topic-metadata">

**Author:** [@Cybernet](https://discourse.processing.org/u/Cybernet)\
**Replies:** 4\
**Last updated:** [April 17, 2020, 12:52am UTC](https://discourse.processing.org/t/how-to-rotate-object-around-edge/19757 "2020-04-17T00:52:03Z")

</div>

I have this code right here that rotates a rectangle. pushMatrix(); translate(xpos + 20, ypos - 10); rotate(radians(swing)); rect(0, 0, 7, 35); popMatrix(); swing += 1; But when I run the code,…

---

## [Tangent to parametric curve](https://discourse.processing.org/t/tangent-to-parametric-curve/19788)

<div class="topic-metadata">

**Author:** [@mcaaaalvo](https://discourse.processing.org/u/mcaaaalvo)\
**Replies:** 55\
**Last updated:** [April 16, 2020, 10:32pm UTC](https://discourse.processing.org/t/tangent-to-parametric-curve/19788 "2020-04-16T22:32:50Z")

</div>

I have to create a program, that when I put the mouse on any point of the curve, it draws its tangent line, and writes to me in a corner the value of the slope of this line. The drawing have to include the cartesian axis…

---

## [Cursor icon with Processing P2D renderer doesn't update as expected](https://discourse.processing.org/t/cursor-icon-with-processing-p2d-renderer-doesnt-update-as-expected/19537)

<div class="topic-metadata">

**Author:** [@Bjoe](https://discourse.processing.org/u/Bjoe)\
**Replies:** 3\
**Last updated:** [April 16, 2020, 8:53pm UTC](https://discourse.processing.org/t/cursor-icon-with-processing-p2d-renderer-doesnt-update-as-expected/19537 "2020-04-16T20:53:54Z")

</div>

Hi! I am using processings P2D renderer and want to change the cursor icon when it has a specific location. This works as expected without the renderer, but with P2D the cursor changes to my computers default cursor aft…

---

## [Reaction time experiment](https://discourse.processing.org/t/reaction-time-experiment/19813)

<div class="topic-metadata">

**Author:** [@14mmss](https://discourse.processing.org/u/14mmss)\
**Replies:** 5\
**Last updated:** [April 16, 2020, 8:25pm UTC](https://discourse.processing.org/t/reaction-time-experiment/19813 "2020-04-16T20:25:08Z")

</div>

hello, I am working on a reaction time experiment. I need to record the time from the second screen onwards until the rectangle changes from black to red in a random time stamp between 2 and 7 seconds and as a reaction t…

---

## [Pixels and images](https://discourse.processing.org/t/pixels-and-images/19558)

<div class="topic-metadata">

**Author:** [@Eduwu](https://discourse.processing.org/u/Eduwu)\
**Replies:** 1\
**Last updated:** [April 16, 2020, 3:17pm UTC](https://discourse.processing.org/t/pixels-and-images/19558 "2020-04-16T15:17:24Z")

</div>

HI! I’m a beginner in processing and I’m trying to do a sketch with an image with a noise filter using pixel, but I don’t know exactly what to do. this is my code right now, but I want the image to have the original col…

---

## [Calculator program, how to make it function](https://discourse.processing.org/t/calculator-program-how-to-make-it-function/19713)

<div class="topic-metadata">

**Author:** [@WeeBoEtte](https://discourse.processing.org/u/WeeBoEtte)\
**Replies:** 8\
**Last updated:** [April 16, 2020, 12:59pm UTC](https://discourse.processing.org/t/calculator-program-how-to-make-it-function/19713 "2020-04-16T12:59:59Z")

</div>

I am trying to make a calculator program in processing, but I’m not sure where to go from here, I’ve got how I want the calculator to look, but as for how to make it function, I’m pulling up a blank. If the mouse presses…

---

## [Https://processing.org/examples/hue.html](https://discourse.processing.org/t/https-processing-org-examples-hue-html/19506)

<div class="topic-metadata">

**Author:** [@wuzywute](https://discourse.processing.org/u/wuzywute)\
**Replies:** 4\
**Last updated:** [April 16, 2020, 2:07am UTC](https://discourse.processing.org/t/https-processing-org-examples-hue-html/19506 "2020-04-16T02:07:06Z")

</div>

https://processing.org/examples/hue.html I was curious how you embed a processing file in an html file like this link here? I’m picking up coding again, and starting with processing a language i was introduced to in 20…

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

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