home *** CD-ROM | disk | FTP | other *** search
- ' +----------------------------------------------------------------------+
- ' | |
- ' | BASWIZ Copyright (c) 1990-1993 Thomas G. Hanlin III |
- ' | |
- ' | The BASIC Wizard's Library |
- ' | |
- ' +----------------------------------------------------------------------+
-
- DECLARE SUB G10Line (BYVAL x1%, BYVAL y1%, BYVAL x2%, BYVAL y2%)
-
- DEFINT A-Z
-
- SUB G10Polygon (X, Y, Radius, Vertices, Angle!)
- IF Vertices > 1 THEN
- ang! = 6.283185
- dang! = -Angle!
- r! = Radius
- delta! = ang! / CSNG(Vertices)
- x1 = r! * COS(ang! + dang!) * 1.2 + x
- y1 = r! * SIN(ang! + dang!) + y
- FOR DrawLine = 1 TO vertices
- ang! = ang! - delta!
- x2 = r! * COS(ang! + dang!) * 1.2 + x
- y2 = r! * SIN(ang! + dang!) + y
- G10Line x1, y1, x2, y2
- x1 = x2
- y1 = y2
- NEXT
- END IF
- END SUB
-