import java.io.*; class Point extends PS { double px=0.0,py=0.0; double cx=0.0,cy=0.0; double scale=1; int itype=1; public Point(double x, double y) { px=x;py=y;cx=x;cy=y; } void move(double x, double y) { px = px+x; py = py+y; } 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(itype) { case 1 : this.square(px,py); break; } } }