home *** CD-ROM | disk | FTP | other *** search
- /* Script Rexx
- Ellipse with a number of points*/
-
- call addlib("rexxmathlib.library", 5, -30, 0)
-
- options results
- parse ARG Port x1 y1 r r2 b
- ADDRESS value Port
-
- pp_UpdateUndo
-
- Pi=3.1415926/180
-
- pp_DialogInit 250 85 "*Ellipse*" 2
- pp_Integer 0 110 5 50 16 "Number*of*Point*" 1 20
- pp_Cycle 1 110 25 110 16 "Color*Option" 1 "Current*Color|Cycling*Color" 0
- pp_Dialog
- rc=result
- if rc=0 then
- do
- EXIT
- end
-
- pp_GetDialog 0
- s0=result
-
- pp_GetDialog 1
- sens=result
-
- a=360/s0
-
- pp_GetApen
- z=result
-
- DO i=0 To 359 by a
- x = Sin(i*Pi)*r+x1
- y = Cos(i*Pi)*r2+y1
- pp_Plot x y
- if sens=1 then DO
- pp_SetApen z
- z=z+1
- END
- END
-
-