Code: Select all
dim as single c1 , c2 , c3
dim as single s1 , s2 , s3
dim as single x1 , x2 , x3
dim as single y1 , y2 , y3
dim as single deg1 , deg2 , deg3
dim as single rad1
dim as single rad2
dim as integer xctr , yctr , radius , divisions , fullcircle
dim as integer xres , yres
'screen 19
screeninfo xres , yres
screenres xres , yres , 8 , 1 , 8
xctr = ( xres / 2 ) '- 150
yctr = ( yres / 2 ) ' - 100
radius = ( xres * yres ) / ( (xres + yres ) * 4 )
radius = 100
divisions = 45
rad1 = atn( 1 ) / divisions
rad2 = atn( 1 ) / ( divisions / 2 )
fullcircle = ( atn( 1 ) * 8 / rad1 )
do
for deg1 = 0 to fullcircle step 1
c1 = cos( deg1 * rad1 )
s1 = sin( deg1 * rad1 )
x1 = radius * c1 * sqr( sqr( deg1 ) ) / 4
y1 = radius * s1 * sqr( sqr( deg1 ) ) / 4
for deg2 = 0 to fullcircle / 2 step 10
c2 = cos( deg2 * rad2 )
s2 = sin( deg2 * rad2 )
x2 = radius * c2 * atn( deg1 * c1 )
y2 = radius * s2 * atn( deg2 * s1 )
for deg3 = 0 to fullcircle / 4 step .5
c3 = cos( deg2 * rad2 )
s3 = sin( deg2 * rad2 )
x3 = radius * c3 * tan( c2 / c1 ) / 10
y3 = radius * s3 * tan( s2 / s1 ) / 10
pset( xctr +x1+x2+x3 , yctr +y1+y2+y3),9
pset( xctr -x1-x2-x3 , yctr +y1+y2+y3),9
pset( xctr +x1+x2+x3 , yctr -y1-y2-y3),9
pset( xctr -x1-x2-x3 , yctr -y1-y2-y3),9
next
next
next
loop until inkey <>""