class legs { float cx; float cy; float D; float L; float tilt; legs(float cx_,float cy_, float D_, float L_, float tilt_) { cx=cx_; cy=cy_; D=D_; L=L_; tilt=tilt_; } float getCX() {return cx;} void setCX(float cx_) {cx = cx_;} float getCY() {return cy;} void setCY(float cy_) {cy = cy_;} float getD() {return D;} void setD(float D_) {D = D_;} float getL() {return L;} void setL(float L_) {L = L_;} float getTILT() {return tilt;} void setTILT(float tilt_) {tilt = tilt_;} void render(float ticker) { float mx, my; mx=D/2*cos(radians(tilt)); my=D/2*sin(radians(tilt)); stroke(255,255,255,200); //line(cx+mx,cy-my,cx-mx,cy+my); //center joinging line renderleg(cx+mx,cy-my,L, tilt-ticker); renderleg(cx-mx,cy+my,L, 180-(-1*tilt-ticker)); noStroke(); } void renderleg(float x, float y, float L, float a) { float ex, ey; ex=x+L*cos(radians(-1*a)); ey=y+L*sin(radians(-1*a)); line(x,y,ex,ey); } }//end of class leg