Hello everyone, I'm doing a university project and I want to make a spiral with an ellipse to start following the space in between the spiral from the center until the end of the spiral and then to start doing the same automatically. So my question is how can I make the ellipse following the spiral space? This is my code so far: float time; void setup() { size(900,850); background(#FFFFFF); stroke(#000203); smooth(); time=3; } void draw() { translate(width/2,height/2); strokeWeight(4); beginShape(); for(int t=0;t<205;t++) { curveVertex((t*2)*sin(t/4.0),(t*2)*cos(t/4.0)); } endShape(); ellipse(47/2,42/2,35,35); } PVector spiral(float t){ return new PVector(t*2*sin(t/4.0),t*cos(t/4.0)); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)