home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 106 / EnigmaAmiga106CD.iso / software / grafica / perfectpaint / rexx / ellipse / total_ellipse.rx < prev   
Encoding:
Text File  |  1999-04-07  |  659 b   |  45 lines

  1. /* Script Rexx
  2.     Ellipse with a number of points*/
  3.  
  4.     call addlib("rexxmathlib.library", 5, -30, 0)
  5.  
  6.     options results
  7.        parse ARG Port x1 y1 r r2 b
  8.     ADDRESS value Port
  9.  
  10.     pp_UpdateUndo    
  11.  
  12.     Pi=3.1415926/180
  13.  
  14.     pp_DialogInit 250 85 "*Ellipse*" 2
  15.         pp_Integer 0 110 5 50 16 "Number*of*Point*" 1 20
  16.         pp_Cycle 1 110 25 110 16 "Color*Option" 1 "Current*Color|Cycling*Color" 0
  17.     pp_Dialog
  18.     rc=result
  19.     if rc=0 then
  20.         do
  21.             EXIT
  22.         end        
  23.         
  24.     pp_GetDialog 0
  25.     s0=result
  26.  
  27.     pp_GetDialog 1
  28.     sens=result
  29.  
  30.     a=360/s0
  31.  
  32.     pp_GetApen
  33.     z=result
  34.  
  35.   DO i=0 To 359 by a
  36.     x = Sin(i*Pi)*r+x1
  37.     y = Cos(i*Pi)*r2+y1
  38.         pp_Plot x y
  39.         if sens=1 then DO
  40.             pp_SetApen z
  41.             z=z+1
  42.         END
  43.     END
  44.  
  45.