!ELLIPSE !This macro creates keypoints on one of the upper quadrants of an ellipse !given the following parameters, and stores the coordinates in XS an YS: a=arg1 !minor radius of ellipse b=arg2 !major radius of ellipse x0=arg3 !x-coordinate of centre of ellipse y0=arg4 !y-coordinate of centre of ellipse n=arg5 !number of segments f=arg6 !f=-1 ==> left quadrant, f=1 ==> right quadrant XS= YS= *DIM,XS,ARRAY,N+1 *DIM,YS,ARRAY,N+1 dx=a/N *DO,i,1,N+1 x=(i-1)*dx x=x*f xs(i)=x+x0 ys(i)=sqrt((1-(x/a)**2)*b**2)+y0 K,,xs(i),ys(i) *enddo