Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is this error showing up? — Processing
    primarykey
    data
    text
    <p>Could anyone share with me why I am getting this error? Basically it's a program where I want to simulate basic basic plant growth. I want to do it in such a way that the petals are all stored in an array of circles.</p> <pre><code>Stem myStem; Circle circles; float scaleFactor=0.5; void setup() { size(floor(400*scaleFactor), floor(800*scaleFactor)); myStem = new Stem(200,800); } void draw() { background(150); smooth(); Circle circles[]; circles = new Circle[5]; circles[0] = new Circle(0, -40, 50, 50); circles[1] = new Circle(0, -40, 50, 50); circles[2] = new Circle(0, -40, 50, 50); circles[3] = new Circle(0, -40, 50, 50); circles[4] = new Circle(0, -40, 50, 50); for (int i = 0; i &lt; circles.length; i++) { circles = ellipse(circles[i].c1, circles[i].c2, circles[i].c3, circles[i].c4); rotate(radians(72)); circles[i] = Circle; } myStem.drawStem(); } class Stem { int initalloX=200; int initalloY=800; Stem(int tempInitalloX, int tempInitalloY) { initalloX = tempInitalloX; initalloY = tempInitalloY; } void drawStem() { background(#0DBADB); scale(scaleFactor, scaleFactor); stroke (12, 149, 11); fill (12, 149, 11); strokeWeight(10); line(initalloX, initalloY, initalloX, ((frameCount&gt;250)?initalloY-500:initalloY-(2*frameCount))); //stem1 if (frameCount&gt;101) { noStroke(); translate(initalloX, initalloY-200); scale(min((float)(frameCount-100)/100, 1), min((float)(frameCount-100)/100, 1)); beginShape(); vertex(0, 0); bezierVertex(-40, -5, -30, -40, -80, -20); bezierVertex(-47, -16, -52, 8, 0, 0); endShape(CLOSE); scale(1/min((float)(frameCount-100)/100, 1), 1/min((float)(frameCount-100)/100, 1)); translate(-initalloX, -(initalloY-200)); } //stem2 if (frameCount&gt;151) { noStroke(); translate(initalloX, initalloY-300); scale(-min((float)(frameCount-150)/150, 1), min((float)(frameCount-150)/150, 1)); beginShape(); vertex(0, 0); bezierVertex(-40, -5, -30, -40, -80, -20); bezierVertex(-47, -16, -52, 8, 0, 0); endShape(CLOSE); scale(-1/min((float)(frameCount-150)/150, 1), 1/min((float)(frameCount-150)/150, 1)); translate(-initalloX, -(initalloY-300)); } } } class Circle { int c1 = 0; int c2 = -40; int c3 = 50; int c4 = 50; Circle(int tc1, int tc2, int tc3, int tc4) { c1 = tc1; c2 = tc2; c3 = tc3; c4 = tc4; } } </code></pre> <p>Thanks in advance... All help is much appreciated. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload