🔬 This loop draws 6 texture lines around Sonion. What happens visually if you change the loop limit from 6 to 20 - and update the map() call to match?
for (let i = 0; i < 6; i++) {
let angle = map(i, 0, 6, 0, TWO_PI);
let x1 = this.x + cos(angle) * this.radius * 0.5;
let y1 = this.y + sin(angle) * this.radius * 0.7;
let x2 = this.x + cos(angle) * this.radius * 1.1;
let y2 = this.y + sin(angle) * this.radius * 1.3;
line(x1, y1, x2, y2);
}
draw() {
noStroke();
// Outer layers (light green/yellow)
fill(200, 255, 200, 200); // Light green-yellow, slightly transparent
ellipse(this.x, this.y, this.radius * 2.2, this.radius * 2.8);
fill(220, 255, 220, 200); // Lighter layer
ellipse(this.x, this.y, this.radius * 1.8, this.radius * 2.4);
// Core (white/yellow)
fill(255, 255, 220); // Creamy white
ellipse(this.x, this.y, this.radius * 1.5, this.radius * 2);
// Root/Stem base (light brown)
fill(180, 160, 140);
ellipse(this.x, this.y + this.radius * 0.8, this.radius * 0.8, this.radius * 0.4);
// Add some texture lines
stroke(150, 200, 150, 100); // Faint green lines
strokeWeight(1);
for (let i = 0; i < 6; i++) {
let angle = map(i, 0, 6, 0, TWO_PI);
let x1 = this.x + cos(angle) * this.radius * 0.5;
let y1 = this.y + sin(angle) * this.radius * 0.7;
let x2 = this.x + cos(angle) * this.radius * 1.1;
let y2 = this.y + sin(angle) * this.radius * 1.3;
line(x1, y1, x2, y2);
}
noStroke();
// Eyes (simple white dots)
fill(255);
ellipse(this.x - this.radius * 0.3, this.y - this.radius * 0.4, this.radius * 0.25);
ellipse(this.x + this.radius * 0.3, this.y - this.radius * 0.4, this.radius * 0.25);
// Pupils
fill(0);
ellipse(this.x - this.radius * 0.3, this.y - this.radius * 0.4, this.radius * 0.1);
ellipse(this.x + this.radius * 0.3, this.y - this.radius * 0.4, this.radius * 0.1);
// Mouth (simple curve)
noFill();
stroke(0);
strokeWeight(2);
arc(this.x, this.y - this.radius * 0.1, this.radius * 0.4, this.radius * 0.2, 0, PI);
}