class Path { Vec2D[] p; Vec2D last; BoundaryCheck bounds; Line2D a,b; Line2D.LineIntersection cut; float theta=0; float delta; float speed; int numSearches; public Path(BoundaryCheck bounds, float speed, float delta, int history) { this.bounds=bounds; this.speed=speed; this.delta=delta; p=new Vec2D[history]; a=new Line2D(new Vec2D(),new Vec2D()); b=new Line2D(new Vec2D(),new Vec2D()); for(int i=0; i0; i--) p[i].set(p[i-1]); last.set(p[0]); theta+=delta; p[0]=last.add(new Vec2D(speed,theta).toCartesian()); numSearches=0; } void search(){ theta+=delta; p[0]=last.add(new Vec2D(speed,theta).toCartesian()); numSearches++; } void render(){ beginShape(); for(int i=1; i