REM Created in CorelPhotoPaint Version 9.397 REM Created On December 7, 1999 by Alex Link REM Rotating Polygons Design Script - Color Version ' polycr.csc WITHOBJECT "CorelPhotoPaint.Automation.9" .SetDocumentInfo 1200, 1200 ' 4 x 4 inch at 300 dpi cx& = 600 cy& = 600 GLOBAL CONST pi AS DOUBLE = 3.1415926535 ' .............................................................. ' call sub with x,y of center of polygon, the radius to its vertex, the ' number of sides and the starting radial angle from its center to the ring ' center from the calling loop SUB pNRing(ByVal Xc&, ByVal Yc&, ByVal Rp&, ByVal Np, ByVal Rt) DIM Ax(Np) AS DOUBLE DIM Ay(Np) AS DOUBLE FOR I = 1 TO Np xa = (I-1)*2*pi/Np-pi/2-Rt Ax(I) = Xc&*256 - 256*Rp&*COS(xa) Ay(I) = Yc&*256 + 256*Rp&*SIN(xa) NEXT I .PolygonTool 2, 0, 0, 3, TRUE, FALSE, TRUE ' edit line thickness here (1) .SetPaintColor 5, 0, 0, 255, 0 .FillSolid 5, 255, 0, 0, 0 .StartDraw Ax(1), Ay(1), 0, 0, 0, 0 For z = 2 TO Np .ContinueDraw Ax(z), Ay(z), 0, 0, 0, 0 Next z .EndDraw END SUB ' .............................................. .ImageInvert .EndColorEffect Msg$ = "Enter number of polygon sides:" uix$ = INPUTBOX(Msg$) n = VAL(uix$) IF n = 0 THEN n = 5 pr& = 100 ' size of polygon (radius) nx = 10 ' number of orbiting polygons R& = 180 ' radius of orbit of polygons ixn = 5 ' number of orbit reduction steps ixs = 20 ' size of orbit reduction steps REM tb = pi/2 ' standard beginning angle in radians of polygon ring centers REM ts = 2*pi/nx ' step size in radians of polygon ring centers REM te = tb + 2*pi - ts ' ending angle in radians of polygon ring centers FOR K = 0 TO ixn - 1 sz& = R& - K*ixs ' radial size of current ring of polygons FOR J = 1 TO nx xa = (J-1)*2*pi/nx Xp& = cx& + sz&*SIN(xa) Yp& = cy& - sz&*COS(xa) pNRing Xp&, Yp&, pr&, n, xa ' it all happens from here NEXT J NEXT K END WITHOBJECT