import java.io.*; class Point extends PS { double px=0.0,py=0.0; double cx=0.0,cy=0.0; double scale=1.0; int ftype=5; double gray=0.0, color_r=0.0, color_g=0.0, color_b=0.0; public Point(double x, double y) { px=x;py=y;cx=x;cy=y; } void setX(double x) { px=x; } void setY(double y) { py=y; } void setcX(double x) { cx=x; } void setcY(double y) { cy=y; } double getX() { return(px); } double getY() { return(py); } double getcX() { return(cx); } double getcY() { return(cy); } void setftype(int i) { ftype=i; } void setgray(double g) { gray=g;super.setgray(gray); } void setrgb(double r,double g, double b) { color_r=r;color_g=g;color_b=b;super.setrgb(color_r,color_g,color_b); } void move(double x, double y) { px = px+x; py = py+y; } void move(double x) { px = px+x; } void center(double x, double y) { cx=x; cy=y; } void rotate(double theta) { double t,dx,dy; t=3.14159*theta/180.0;dx=px-cx;dy=py-cy; px=cx+dx*Math.cos(t)-dy*Math.sin(t); py=cy+dx*Math.sin(t)+dy*Math.cos(t); } void expand(double times) { px=cx+(px-cx)*times; py=cy+(py-cy)*times; } void draw() { double x1, y1; x1 = ((px-xw1)/(xw2-xw1)*(xv2-xv1) + xv1)*xsize; y1 = ((py-yw1)/(yw2-yw1)*(yv2-yv1) + yv1)*ysize; switch(ftype) { case 1 : super.square(px,py); break; case 2 : super.fsquare(px,py); break; case 3 : super.circle(px,py); break; case 4 : super.fcircle(px,py); break; case 5 : super.delta(px,py); break; case 6 : super.fdelta(px,py); break; } } }