Squares

General FreeBASIC programming questions.
Locked
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

Here's Abstract_0108.bas

Kinda simple looking...

Code: Select all


'Abstract Doodle 0057
'https://www.freebasic.net/forum/viewtopic.php?f=3&t=16207&start=7065

'======================= Colorizing Code ===================================
Dim as Single band, coff, dist
Dim as ULong colr, idx, pal(48)
band = 3.0 'MUST be greater than 0.0 to avoid division by zero error
coff = 6.0 'palette array 'Color Index Offset' (0 to 47)
For idx = 0 To 47
    Read pal(idx)
Next
Data &H0000FF,&H2000FF,&H4000FF,&H6000FF,&H8000FF,&HA000FF,&HC000FF,&HE000FF
Data &HFF00FF,&HFF00E0,&HFF00C0,&HFF00A0,&HFF0080,&HFF0060,&HFF0040,&HFF0020
Data &HFF0000,&HFF2000,&HFF4000,&HFF6000,&HFF8000,&HFFA000,&HFFC000,&HFFE000
Data &HFFFF00,&HE0FF00,&HC0FF00,&HA0FF00,&H80FF00,&H60FF00,&H40FF00,&H20FF00
Data &H00FF00,&H00FF20,&H00FF40,&H00FF60,&H00FF80,&H00FFA0,&H00FFC0,&H00FFE0
Data &H00FFFF,&H00E0FF,&H00C0FF,&H00A0FF,&H0080FF,&H0060FF,&H0040FF,&H0020FF
'===========================================================================

dim as single c1,c2
dim as single s1,s2
dim as single x1,x2
dim as single y1,y2
dim as single deg1,deg2
dim as single rad1
dim as single rad2

dim as integer xctr, yctr, radius, divisions, fullcircle, toggle
dim as integer xres,yres

screeninfo xres,yres
screenres xres,yres,32

xctr = xres/2
yctr = yres/2 -10

'radius = (xres*yres)/((xres+yres)*4)
radius = 750

divisions = 45

rad1 = atn(1) / divisions
rad2 = atn(1) / (divisions/2)
fullcircle = 359 'atn(1)*8 / rad1

for deg1 = 0 to fullcircle * 8 step 45
    
            c1 = cos( deg1 * rad1 )
            s1 = sin( deg1 * rad1 )
   
            x1 = radius * c1 / 40 * atan2( c1 , s1 * deg1 ) * 5
            y1 = radius * s1 / 40 * atan2( s1 , c1 * deg1 ) * 5
    
    for deg2 = 0 to fullcircle step .05

            c2 = cos( deg2 * rad2 * 10 )
            s2 = sin( deg2 * rad2 * 10 )
       
            x2 = radius * (c2 eqv deg1) * c2 / 10000 * atan2( deg2 * c2 , deg1 * c1 ) / 4
            y2 = radius * (s2 eqv deg1) * s2 / 10000 * atan2( deg2 * s2 , deg1 * s1 ) / 4

        'Calc distance from current x1, y1 to the center of the screen
        'then apply MOD of 48 to get a valid palette index value
        dist = Sqr((xctr-x1)*(xctr-x1) + (yctr-y1)*(yctr-y1))
        colr=pal((Int(dist/band) + coff) Mod 48)

        pset( xctr +x1 +x2 , yctr +y1 +y2 ) , colr
        pset( xctr -x1 -x2 , yctr +y1 +y2 ) , colr

        pset( xctr +x1 +x2 , yctr -y1 -y2 ) , colr
        pset( xctr -x1 -x2 , yctr -y1 -y2 ) , colr
           
    next
   
next

Sleep
System


Here's Abstract_0108-2.bas

Code: Select all


'Abstract Doodle 0057
'https://www.freebasic.net/forum/viewtopic.php?f=3&t=16207&start=7065

'======================= Colorizing Code ===================================
Dim as Single band, coff, dist
Dim as ULong colr, idx, pal(48)
band = 3.0 'MUST be greater than 0.0 to avoid division by zero error
coff = 6.0 'palette array 'Color Index Offset' (0 to 47)
For idx = 0 To 47
    Read pal(idx)
Next
Data &H0000FF,&H2000FF,&H4000FF,&H6000FF,&H8000FF,&HA000FF,&HC000FF,&HE000FF
Data &HFF00FF,&HFF00E0,&HFF00C0,&HFF00A0,&HFF0080,&HFF0060,&HFF0040,&HFF0020
Data &HFF0000,&HFF2000,&HFF4000,&HFF6000,&HFF8000,&HFFA000,&HFFC000,&HFFE000
Data &HFFFF00,&HE0FF00,&HC0FF00,&HA0FF00,&H80FF00,&H60FF00,&H40FF00,&H20FF00
Data &H00FF00,&H00FF20,&H00FF40,&H00FF60,&H00FF80,&H00FFA0,&H00FFC0,&H00FFE0
Data &H00FFFF,&H00E0FF,&H00C0FF,&H00A0FF,&H0080FF,&H0060FF,&H0040FF,&H0020FF
'===========================================================================

dim as single c1,c2
dim as single s1,s2
dim as single x1,x2
dim as single y1,y2
dim as single deg1,deg2
dim as single rad1
dim as single rad2

dim as integer xctr, yctr, radius, divisions, fullcircle, toggle
dim as integer xres,yres

screeninfo xres,yres
screenres xres,yres,32

xctr = xres/2
yctr = yres/2 -10

'radius = (xres*yres)/((xres+yres)*4)
radius = 750

divisions = 45

rad1 = atn(1) / divisions
rad2 = atn(1) / (divisions/2)
fullcircle = 359 'atn(1)*8 / rad1

for deg1 = 0 to fullcircle * 8 step 45
    
            c1 = cos( deg1 * rad1 )
            s1 = sin( deg1 * rad1 )
   
            x1 = radius * c1 / 40 * atan2( c1 , s1 * deg1 ) * 5
            y1 = radius * s1 / 40 * atan2( s1 , c1 * deg1 ) * 5
    
    for deg2 = 0 to fullcircle step .05

            c2 = cos( deg2 * rad2 * 10 )
            s2 = sin( deg2 * rad2 * 10 )
       
            x2 = radius * (c2 * deg1) * c2 / 10000 * atan2( deg2 * c2 , deg1 * c1 ) / 4
            y2 = radius * (s2 * deg1) * s2 / 10000 * atan2( deg2 * s2 , deg1 * s1 ) / 4

        'Calc distance from current x1, y1 to the center of the screen
        'then apply MOD of 48 to get a valid palette index value
        dist = Sqr((xctr-x1)*(xctr-x1) + (yctr-y1)*(yctr-y1))
        colr=pal((Int(dist/band) + coff) Mod 48)

        pset( xctr +x1 +x2 , yctr +y1 +y2 ) , colr
        pset( xctr -x1 -x2 , yctr +y1 +y2 ) , colr

        pset( xctr +x1 +x2 , yctr -y1 -y2 ) , colr
        pset( xctr -x1 -x2 , yctr -y1 -y2 ) , colr
           
    next
   
next

Sleep
System


albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

It just dawned on me.. To try single looping , to get formulas , that produce different effects..
Then i can plug those formulas into the second degree loop , to get patterns around the circle or degree 1 pattern..

So; now I'm going to work on single loops , to develop different shapes..
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

My idea worked...
I did a single loop "4 Leaf Clover" , and plugged the formula into a simple circle , and it created a circle of "4 Leaf Clovers"

Here's Abstract_0109.bas

Code: Select all


'Abstract Doodle 0057
'https://www.freebasic.net/forum/viewtopic.php?f=3&t=16207&start=7065

'======================= Colorizing Code ===================================
Dim as Single band, coff, dist
Dim as ULong colr, idx, pal(48)
band = 3.0 'MUST be greater than 0.0 to avoid division by zero error
coff = 6.0 'palette array 'Color Index Offset' (0 to 47)
For idx = 0 To 47
    Read pal(idx)
Next
Data &H0000FF,&H2000FF,&H4000FF,&H6000FF,&H8000FF,&HA000FF,&HC000FF,&HE000FF
Data &HFF00FF,&HFF00E0,&HFF00C0,&HFF00A0,&HFF0080,&HFF0060,&HFF0040,&HFF0020
Data &HFF0000,&HFF2000,&HFF4000,&HFF6000,&HFF8000,&HFFA000,&HFFC000,&HFFE000
Data &HFFFF00,&HE0FF00,&HC0FF00,&HA0FF00,&H80FF00,&H60FF00,&H40FF00,&H20FF00
Data &H00FF00,&H00FF20,&H00FF40,&H00FF60,&H00FF80,&H00FFA0,&H00FFC0,&H00FFE0
Data &H00FFFF,&H00E0FF,&H00C0FF,&H00A0FF,&H0080FF,&H0060FF,&H0040FF,&H0020FF
'===========================================================================

dim as single c1,c2
dim as single s1,s2
dim as single x1,x2
dim as single y1,y2
dim as single deg1,deg2
dim as single rad1
dim as single rad2

dim as integer xctr, yctr, radius, divisions, fullcircle, toggle
dim as integer xres,yres

screeninfo xres,yres
screenres xres,yres,32

xctr = xres/2
yctr = yres/2 -10

'radius = (xres*yres)/((xres+yres)*4)
radius = 250

divisions = 45

rad1 = atn(1) / divisions
rad2 = atn(1) / (divisions/2)
fullcircle = 359 'atn(1)*8 / rad1

for deg1 = 0 to fullcircle step 45
    
            c1 = cos( deg1 * rad1 )
            s1 = sin( deg1 * rad1 )
   
            x1 = radius * c1
            y1 = radius * s1
            
    for deg2 = 0 to fullcircle step .1

            c2 = cos( deg2 * rad2 )
            s2 = sin( deg2 * rad2 )
       
            x2 = radius * c2 * c2 * c2 * s2
            y2 = radius * s2 * s2 * s2 * c2

        'Calc distance from current x1, y1 to the center of the screen
        'then apply MOD of 48 to get a valid palette index value
        dist = Sqr((xctr-x1)*(xctr-x1) + (yctr-y1)*(yctr-y1))
        colr=pal((Int(dist/band) + coff) Mod 48)

        pset( xctr +x1 +x2 , yctr +y1 +y2 ) , colr
        pset( xctr -x1 -x2 , yctr +y1 +y2 ) , colr

        pset( xctr +x1 +x2 , yctr -y1 -y2 ) , colr
        pset( xctr -x1 -x2 , yctr -y1 -y2 ) , colr
           
    next
   
next

Sleep
System

albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

Here's single looping , pat_001.bas

Code: Select all


dim as single c2
dim as single s2
dim as single x2
dim as single y2
dim as single deg2
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
yctr = yres / 2

'radius = (xres*yres)/((xres+yres)*4)
radius = 200

divisions = 45

rad2 = atn( 1 ) / divisions
fullcircle = atn( 1 ) * 8 / rad2

do
   
        for deg2 = 0 to fullcircle step .1
   
            c2 = cos( deg2 * rad2 * 2 )
            s2 =  sin( deg2 * rad2 * 8 )
   
            x2 = radius * c2 * c2 * c2 * s2 * s2 
            y2 = radius * s2 * s2 * s2 * c2 * c2 
            
            pset( xctr + x2 , yctr + y2 ) , 9
            pset( xctr - x2 , yctr + y2 ) , 9
            pset( xctr + x2 , yctr - y2 ) , 9
            pset( xctr - x2 , yctr - y2 ) , 9
           
        next

loop until inkey <>""

And here's Abstract_0110.bas , using pat_001.bas

Code: Select all


'Abstract Doodle 0057
'https://www.freebasic.net/forum/viewtopic.php?f=3&t=16207&start=7065

'======================= Colorizing Code ===================================
Dim as Single band, coff, dist
Dim as ULong colr, idx, pal(48)
band = 3.0 'MUST be greater than 0.0 to avoid division by zero error
coff = 6.0 'palette array 'Color Index Offset' (0 to 47)
For idx = 0 To 47
    Read pal(idx)
Next
Data &H0000FF,&H2000FF,&H4000FF,&H6000FF,&H8000FF,&HA000FF,&HC000FF,&HE000FF
Data &HFF00FF,&HFF00E0,&HFF00C0,&HFF00A0,&HFF0080,&HFF0060,&HFF0040,&HFF0020
Data &HFF0000,&HFF2000,&HFF4000,&HFF6000,&HFF8000,&HFFA000,&HFFC000,&HFFE000
Data &HFFFF00,&HE0FF00,&HC0FF00,&HA0FF00,&H80FF00,&H60FF00,&H40FF00,&H20FF00
Data &H00FF00,&H00FF20,&H00FF40,&H00FF60,&H00FF80,&H00FFA0,&H00FFC0,&H00FFE0
Data &H00FFFF,&H00E0FF,&H00C0FF,&H00A0FF,&H0080FF,&H0060FF,&H0040FF,&H0020FF
'===========================================================================

dim as single c1,c2
dim as single s1,s2
dim as single x1,x2
dim as single y1,y2
dim as single deg1,deg2
dim as single rad1
dim as single rad2

dim as integer xctr, yctr, radius, divisions, fullcircle, toggle
dim as integer xres,yres

screeninfo xres,yres
screenres xres,yres,32

xctr = xres/2
yctr = yres/2 -10

'radius = (xres*yres)/((xres+yres)*4)
radius = 200

divisions = 45

rad1 = atn( 1 ) / divisions
rad2 = atn( 1 ) / divisions
fullcircle = atn( 1 ) * 8 / rad1

for deg1 = 0 to fullcircle step 45
    
            c1 = cos( deg1 * rad1 )
            s1 = sin( deg1 * rad1 )
   
            x1 = radius * c1
            y1 = radius * s1
            
    for deg2 = 0 to fullcircle step .1

            c2 = cos( deg2 * rad2 * 2 )
            s2 =  sin( deg2 * rad2 * 8 )
   
            x2 = radius * c2 * c2 * c2 * s2 * s2 
            y2 = radius * s2 * s2 * s2 * c2 * c2 

        'Calc distance from current x1, y1 to the center of the screen
        'then apply MOD of 48 to get a valid palette index value
        dist = Sqr( ( xctr - x1 ) * ( xctr - x1 ) + ( yctr - y1 ) * ( yctr - y1 ) )
        colr = pal( ( Int( dist / band ) + coff ) Mod 48 )

        pset( xctr +x1 +x2 , yctr +y1 +y2 ) , colr
        pset( xctr -x1 -x2 , yctr +y1 +y2 ) , colr

        pset( xctr +x1 +x2 , yctr -y1 -y2 ) , colr
        pset( xctr -x1 -x2 , yctr -y1 -y2 ) , colr
           
    next
   
next

Sleep
System

albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

After years of blindly typing in functions , and playing around with trig functions...
Using the force along with some skill , to create doodles...

I'm now , getting to the point where , soon I'll be able to skillfully engineer trig doodles.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

Here's pat_002.bas

Code: Select all

' From galactic-chicken.bas

dim as single c2
dim as single s2
dim as single x2
dim as single y2
dim as single deg2
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
yctr = yres / 2

'radius = (xres*yres)/((xres+yres)*4)
radius = 200

divisions = 45

rad2 = atn( 1 ) / divisions
fullcircle = atn( 1 ) * 8 / rad2

do
   
        for deg2 = 0 to fullcircle step .1
   
            c2 = cos( deg2 * rad2 )
            s2 =  sin( deg2 * rad2 )
   
            x2 = radius * c2 * log( deg2 * s2 / 10 ) / 10
            y2 = radius * s2 * log( deg2 * c2 / 10 ) / 10
            
            pset( xctr + x2 , yctr + y2 ) , 9
            pset( xctr - x2 , yctr + y2 ) , 9
            pset( xctr + x2 , yctr - y2 ) , 9
            pset( xctr - x2 , yctr - y2 ) , 9
           
        next

loop until inkey <>""

Here's Abstract_0111.bas

Code: Select all


'Abstract Doodle 0057
'https://www.freebasic.net/forum/viewtopic.php?f=3&t=16207&start=7065

'======================= Colorizing Code ===================================
Dim as Single band, coff, dist
Dim as ULong colr, idx, pal(48)
band = 3.0 'MUST be greater than 0.0 to avoid division by zero error
coff = 6.0 'palette array 'Color Index Offset' (0 to 47)
For idx = 0 To 47
    Read pal(idx)
Next
Data &H0000FF,&H2000FF,&H4000FF,&H6000FF,&H8000FF,&HA000FF,&HC000FF,&HE000FF
Data &HFF00FF,&HFF00E0,&HFF00C0,&HFF00A0,&HFF0080,&HFF0060,&HFF0040,&HFF0020
Data &HFF0000,&HFF2000,&HFF4000,&HFF6000,&HFF8000,&HFFA000,&HFFC000,&HFFE000
Data &HFFFF00,&HE0FF00,&HC0FF00,&HA0FF00,&H80FF00,&H60FF00,&H40FF00,&H20FF00
Data &H00FF00,&H00FF20,&H00FF40,&H00FF60,&H00FF80,&H00FFA0,&H00FFC0,&H00FFE0
Data &H00FFFF,&H00E0FF,&H00C0FF,&H00A0FF,&H0080FF,&H0060FF,&H0040FF,&H0020FF
'===========================================================================

dim as single c1,c2
dim as single s1,s2
dim as single x1,x2
dim as single y1,y2
dim as single deg1,deg2
dim as single rad1
dim as single rad2

dim as integer xctr, yctr, radius, divisions, fullcircle, toggle
dim as integer xres,yres

screeninfo xres,yres
screenres xres,yres,32

xctr = xres/2
yctr = yres/2 -10

'radius = (xres*yres)/((xres+yres)*4)
radius = 200

divisions = 45

rad1 = atn( 1 ) / divisions
rad2 = atn( 1 ) / divisions
fullcircle = atn( 1 ) * 8 / rad1

for deg1 = 0 to fullcircle step 22.5
    
            c1 = cos( deg1 * rad1 )
            s1 = sin( deg1 * rad1 )
   
            x1 = radius * c1 * c1
            y1 = radius * s1 * s1
            
    for deg2 = 0 to fullcircle step .1

            c2 = cos( deg2 * rad2 * 2 )
            s2 =  sin( deg2 * rad2 * 8 )
   
            x2 = radius * c2 * log( deg2 * s2 / 10 ) / 10
            y2 = radius * s2 * log( deg2 * c2 / 10 ) / 10

        'Calc distance from current x1, y1 to the center of the screen
        'then apply MOD of 48 to get a valid palette index value
        dist = Sqr( ( xctr - x1 ) * ( xctr - x1 ) + ( yctr - y1 ) * ( yctr - y1 ) )
        colr = pal( ( Int( dist / band ) + coff ) Mod 48 )

        pset( xctr +x1 +x2 , yctr +y1 +y2 ) , colr
        pset( xctr -x1 -x2 , yctr +y1 +y2 ) , colr

        pset( xctr +x1 +x2 , yctr -y1 -y2 ) , colr
        pset( xctr -x1 -x2 , yctr -y1 -y2 ) , colr
           
    next
   
next

Sleep
System

albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

Here's Abstract_0112.bas ( from pat_002.bas )

Code: Select all


'Abstract Doodle 0057
'https://www.freebasic.net/forum/viewtopic.php?f=3&t=16207&start=7065

'======================= Colorizing Code ===================================
Dim as Single band, coff, dist
Dim as ULong colr, idx, pal(48)
band = 3.0 'MUST be greater than 0.0 to avoid division by zero error
coff = 6.0 'palette array 'Color Index Offset' (0 to 47)
For idx = 0 To 47
    Read pal(idx)
Next
Data &H0000FF,&H2000FF,&H4000FF,&H6000FF,&H8000FF,&HA000FF,&HC000FF,&HE000FF
Data &HFF00FF,&HFF00E0,&HFF00C0,&HFF00A0,&HFF0080,&HFF0060,&HFF0040,&HFF0020
Data &HFF0000,&HFF2000,&HFF4000,&HFF6000,&HFF8000,&HFFA000,&HFFC000,&HFFE000
Data &HFFFF00,&HE0FF00,&HC0FF00,&HA0FF00,&H80FF00,&H60FF00,&H40FF00,&H20FF00
Data &H00FF00,&H00FF20,&H00FF40,&H00FF60,&H00FF80,&H00FFA0,&H00FFC0,&H00FFE0
Data &H00FFFF,&H00E0FF,&H00C0FF,&H00A0FF,&H0080FF,&H0060FF,&H0040FF,&H0020FF
'===========================================================================

dim as single c1,c2
dim as single s1,s2
dim as single x1,x2
dim as single y1,y2
dim as single deg1,deg2
dim as single rad1
dim as single rad2

dim as integer xctr, yctr, radius, divisions, fullcircle, toggle
dim as integer xres,yres

screeninfo xres,yres
screenres xres,yres,32

xctr = xres/2
yctr = yres/2 -10

'radius = (xres*yres)/((xres+yres)*4)
radius = 205

divisions = 45

rad1 = atn( 1 ) / divisions
rad2 = atn( 1 ) / divisions
fullcircle = atn( 1 ) * 8 / rad1

for deg1 = 0 to fullcircle step 11.25
    
            c1 = cos( deg1 * rad1 )
            s1 = sin( deg1 * rad1 )
   
            x1 = radius * c1 / s1 / 3 / 2
            y1 = radius * s1 / c1 / 3 / 2
            
    for deg2 = 0 to fullcircle step .1

            c2 = cos( deg2 * rad2 * 2 )
            s2 =  sin( deg2 * rad2 * 8 )
   
            x2 = radius * c2 * log( deg2 * s2 / 10 ) / 10
            y2 = radius * s2 * log( deg2 * c2 / 10 ) / 10

        'Calc distance from current x1, y1 to the center of the screen
        'then apply MOD of 48 to get a valid palette index value
        dist = Sqr( ( xctr - x1 ) * ( xctr - x1 ) + ( yctr - y1 ) * ( yctr - y1 ) )
        colr = pal( ( Int( dist / band ) + coff ) Mod 48 )

        pset( xctr +x1 +x2 , yctr +y1 +y2 ) , colr
        pset( xctr -x1 -x2 , yctr +y1 +y2 ) , colr

        pset( xctr +x1 +x2 , yctr -y1 -y2 ) , colr
        pset( xctr -x1 -x2 , yctr -y1 -y2 ) , colr
           
    next
   
next

Sleep
System

albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

Here's Abstract_0113.bas

Code: Select all


'Abstract Doodle 0057
'https://www.freebasic.net/forum/viewtopic.php?f=3&t=16207&start=7065

'======================= Colorizing Code ===================================
Dim as Single band, coff, dist
Dim as ULong colr, idx, pal(48)
band = 3.0 'MUST be greater than 0.0 to avoid division by zero error
coff = 6.0 'palette array 'Color Index Offset' (0 to 47)
For idx = 0 To 47
    Read pal(idx)
Next
Data &H0000FF,&H2000FF,&H4000FF,&H6000FF,&H8000FF,&HA000FF,&HC000FF,&HE000FF
Data &HFF00FF,&HFF00E0,&HFF00C0,&HFF00A0,&HFF0080,&HFF0060,&HFF0040,&HFF0020
Data &HFF0000,&HFF2000,&HFF4000,&HFF6000,&HFF8000,&HFFA000,&HFFC000,&HFFE000
Data &HFFFF00,&HE0FF00,&HC0FF00,&HA0FF00,&H80FF00,&H60FF00,&H40FF00,&H20FF00
Data &H00FF00,&H00FF20,&H00FF40,&H00FF60,&H00FF80,&H00FFA0,&H00FFC0,&H00FFE0
Data &H00FFFF,&H00E0FF,&H00C0FF,&H00A0FF,&H0080FF,&H0060FF,&H0040FF,&H0020FF
'===========================================================================

dim as single c1,c2
dim as single s1,s2
dim as single x1,x2
dim as single y1,y2
dim as single deg1,deg2
dim as single rad1
dim as single rad2

dim as integer xctr, yctr, radius, divisions, fullcircle, toggle
dim as integer xres,yres

screeninfo xres,yres
screenres xres,yres,32

xctr = xres/2
yctr = yres/2 -10

'radius = (xres*yres)/((xres+yres)*4)
radius = 250

divisions = 45

rad1 = atn( 1 ) / divisions
rad2 = atn( 1 ) / divisions
fullcircle = atn( 1 ) * 8 / rad1

for deg1 = 0 to fullcircle step 11.25
    
            c1 = cos( deg1 * rad1 )
            s1 = sin( deg1 * rad1 )
   
            x1 = radius * c1 / s1 / 3 / 1.5
            y1 = radius * s1 / c1 / 3 / 1.5
            
    for deg2 = 0 to fullcircle / 8 step .01

            c2 = cos( deg2 * rad2 * 20 )
            s2 =  sin( deg2 * rad2 * 80 )
   
            x2 = radius * c2 * log( deg2 * s2 / 10 ) / 10 * 2
            y2 = radius * s2 * log( deg2 * c2 / 10 ) / 10 * 2

        'Calc distance from current x1, y1 to the center of the screen
        'then apply MOD of 48 to get a valid palette index value
        dist = Sqr( ( xctr - x1 ) * ( xctr - x1 ) + ( yctr - y1 ) * ( yctr - y1 ) )
        colr = pal( ( Int( dist / band ) + coff ) Mod 48 )

        pset( xctr +x1 +x2 , yctr +y1 +y2 ) , colr
        pset( xctr -x1 -x2 , yctr +y1 +y2 ) , colr

        pset( xctr +x1 +x2 , yctr -y1 -y2 ) , colr
        pset( xctr -x1 -x2 , yctr -y1 -y2 ) , colr
           
    next
   
next

Sleep
System

albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

Here's Abstract_0114.bas

Kinda plain looking.. but interesting..

Code: Select all


'Abstract Doodle 0057
'https://www.freebasic.net/forum/viewtopic.php?f=3&t=16207&start=7065

'======================= Colorizing Code ===================================
Dim as Single band, coff, dist
Dim as ULong colr, idx, pal(48)
band = 3.0 'MUST be greater than 0.0 to avoid division by zero error
coff = 6.0 'palette array 'Color Index Offset' (0 to 47)
For idx = 0 To 47
    Read pal(idx)
Next
Data &H0000FF,&H2000FF,&H4000FF,&H6000FF,&H8000FF,&HA000FF,&HC000FF,&HE000FF
Data &HFF00FF,&HFF00E0,&HFF00C0,&HFF00A0,&HFF0080,&HFF0060,&HFF0040,&HFF0020
Data &HFF0000,&HFF2000,&HFF4000,&HFF6000,&HFF8000,&HFFA000,&HFFC000,&HFFE000
Data &HFFFF00,&HE0FF00,&HC0FF00,&HA0FF00,&H80FF00,&H60FF00,&H40FF00,&H20FF00
Data &H00FF00,&H00FF20,&H00FF40,&H00FF60,&H00FF80,&H00FFA0,&H00FFC0,&H00FFE0
Data &H00FFFF,&H00E0FF,&H00C0FF,&H00A0FF,&H0080FF,&H0060FF,&H0040FF,&H0020FF
'===========================================================================

dim as single c1,c2
dim as single s1,s2
dim as single x1,x2
dim as single y1,y2
dim as single deg1,deg2
dim as single rad1
dim as single rad2

dim as integer xctr, yctr, radius, divisions, fullcircle, toggle
dim as integer xres,yres

screeninfo xres,yres
screenres xres,yres,32

xctr = xres/2
yctr = yres/2 -10

'radius = (xres*yres)/((xres+yres)*4)
radius = 250

divisions = 45

rad1 = atn( 1 ) / divisions
rad2 = atn( 1 ) / divisions
fullcircle = atn( 1 ) * 8 / rad1

for deg1 = 0 to fullcircle step 45
    
            c1 = cos( deg1 * rad1 )
            s1 = sin( deg1 * rad1 )
   
            x1 = radius * c1 * c1
            y1 = radius * s1 * s1
            
    for deg2 = 0 to fullcircle step .1

            c2 = cos( deg2 * rad2 )
            s2 =  sin( deg2 * rad2 )
   
            x2 = radius * c2 * c2 * atan2( deg2 , c2 * 90 ) / 4
            y2 = radius * s2 * s2 * atan2( deg2 , s2 * 90 ) / 4

        'Calc distance from current x1, y1 to the center of the screen
        'then apply MOD of 48 to get a valid palette index value
        dist = Sqr( ( xctr - x1 ) * ( xctr - x1 ) + ( yctr - y1 ) * ( yctr - y1 ) )
        colr = pal( ( Int( dist / band ) + coff ) Mod 48 )

        pset( xctr +x1 +x2 , yctr +y1 +y2 ) , colr
        pset( xctr -x1 -x2 , yctr +y1 +y2 ) , colr

        pset( xctr +x1 +x2 , yctr -y1 -y2 ) , colr
        pset( xctr -x1 -x2 , yctr -y1 -y2 ) , colr
           
    next
   
next

Sleep
System

albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

Here's Abstract_0115.bas

Code: Select all


'Abstract Doodle 0057
'https://www.freebasic.net/forum/viewtopic.php?f=3&t=16207&start=7065

'======================= Colorizing Code ===================================
Dim as Single band, coff, dist
Dim as ULong colr, idx, pal(48)
band = 3.0 'MUST be greater than 0.0 to avoid division by zero error
coff = 6.0 'palette array 'Color Index Offset' (0 to 47)
For idx = 0 To 47
    Read pal(idx)
Next
Data &H0000FF,&H2000FF,&H4000FF,&H6000FF,&H8000FF,&HA000FF,&HC000FF,&HE000FF
Data &HFF00FF,&HFF00E0,&HFF00C0,&HFF00A0,&HFF0080,&HFF0060,&HFF0040,&HFF0020
Data &HFF0000,&HFF2000,&HFF4000,&HFF6000,&HFF8000,&HFFA000,&HFFC000,&HFFE000
Data &HFFFF00,&HE0FF00,&HC0FF00,&HA0FF00,&H80FF00,&H60FF00,&H40FF00,&H20FF00
Data &H00FF00,&H00FF20,&H00FF40,&H00FF60,&H00FF80,&H00FFA0,&H00FFC0,&H00FFE0
Data &H00FFFF,&H00E0FF,&H00C0FF,&H00A0FF,&H0080FF,&H0060FF,&H0040FF,&H0020FF
'===========================================================================

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 rad

dim as integer xctr, yctr, radius, divisions, fullcircle, toggle
dim as integer xres,yres

screeninfo xres,yres
screenres xres,yres,32

xctr = xres/2
yctr = yres/2 -10

'radius = (xres*yres)/((xres+yres)*4)
radius = 300

divisions = 45

rad = atn( 1 ) / divisions

fullcircle = atn( 1 ) * 8 / rad

for deg1 = 0 to fullcircle step 45
    
            c1 = cos( deg1 * rad )
            s1 = sin( deg1 * rad )
   
            x1 = radius * c1 * c1
            y1 = radius * s1 * s1
            
    for deg2 = 0 to fullcircle step .1

            c2 = cos( deg2 * rad )
            s2 =  sin( deg2 * rad )
   
            x2 = radius * c2 * c2 * s1 * atan2( deg2 , c2 * 90 ) / 4
            y2 = radius * s2 * s2 * c1 * atan2( deg2 , s2 * 90 ) / 4
            
            x3 = radius * c2 * c2 * s2 / 4 
            y3 = radius * s2 * s2 * c2 / 4
            
        'Calc distance from current x1, y1 to the center of the screen
        'then apply MOD of 48 to get a valid palette index value
        dist = Sqr( ( xctr - x1 ) * ( xctr - x1 ) + ( yctr - y1 ) * ( yctr - y1 ) )
        colr = pal( ( Int( dist / band ) + coff ) Mod 48 )

        pset( xctr +x1 +x2 +x3 , yctr +y1 +y2 +y3 ) , colr
        pset( xctr -x1   -x2  -x3 , yctr +y1 +y2 +y3 ) , colr

        pset( xctr +x1 +x2 +x3 , yctr -y1 -y2 -y3 ) , colr
        pset( xctr -x1 -x2 -x3  , yctr -y1 -y2 -y3 ) , colr
           
    next
   
next

Sleep
System

albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

Here's Abstract_0116.bas

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 rad

dim as integer xctr , yctr , radius , divisions , fullcircle
dim as integer xres , yres

screeninfo xres , yres
screenres xres , yres , 8 , 1 , 8

xctr = xres / 2
yctr = yres / 2

'radius = (xres*yres)/((xres+yres)*4)
radius = 200

divisions = 45

rad = atn( 1 ) / divisions

fullcircle = atn( 1 ) * 8 / rad

for deg1 = 0 to fullcircle step 45
    
            c1 = cos( deg1 * rad )
            s1 = sin( deg1 * rad )
   
            x1=radius * c1 * atn( deg1 / 45 )
            y1=radius * s1 * atn( deg1 / 45 )
            
    for deg2 = 0 to fullcircle step .1

            c2 = cos( deg2 * rad )
            s2 =  sin( deg2 * rad )
   
            x2 = radius * c2 * c2 / 4
            y2 = radius * s2 * s2 / 4
            
            x3 = radius * c2 * c2 * c2 * atn( deg2 / 45 ) / 4 
            y3 = radius * s2 * s2 * s2 * atn( deg2 / 45 ) / 4 
            
        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

Sleep
end

albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

Here's Abstract_0118.bas

Kinda busy looking..

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 rad

dim as integer xctr , yctr , radius , divisions , fullcircle
dim as integer xres , yres

screeninfo xres , yres
screenres xres , yres , 8 , 1 , 8

xctr = xres / 2
yctr = yres / 2

'radius = (xres*yres)/((xres+yres)*4)
radius = 200

divisions = 45

rad = atn( 1 ) / divisions

fullcircle = atn( 1 ) * 8 / rad

for deg1 = 0 to fullcircle * 2 step 45
    
            c1 = cos( deg1 * rad )
            s1 = sin( deg1 * rad )
   
            x1=radius * c1 * c1 * c1 * atn( deg1 / 45 )
            y1=radius * s1 * s1 * s1 * atn( deg1 / 45 )
            
    for deg2 = 0 to fullcircle step .01

            c2 = cos( deg2 * rad * 8 )
            s2 =  sin( deg2 * rad * 8 )
   
            x2 = radius * c2 * c2 / 4
            y2 = radius * s2 * s2 / 4
            
            x3 = radius * c2 * atan2( y1 , x2 ) * atn( c2 * s2 )
            y3 = radius * s2 * atan2( x1 , y2 ) * atn( s2 * c2 )
            
        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

Sleep
end

albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

Here's Abstract_0119.bas ( real complex )

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 rad

dim as integer xctr , yctr , radius , divisions , fullcircle
dim as integer xres , yres

screeninfo xres , yres
screenres xres , yres , 8 , 1 , 8

xctr = xres / 2
yctr = yres / 2

'radius = (xres*yres)/((xres+yres)*4)
radius = 250

divisions = 45

rad = atn( 1 ) / divisions

fullcircle = atn( 1 ) * 8 / rad

for deg1 = 0 to fullcircle step 22.5
    
            c1 = cos( deg1 * rad )
            s1 = sin( deg1 * rad )
   
            x1=radius * c1 * c1 * c1 * atn( deg1 / 45 )
            y1=radius * s1 * s1 * s1 * atn( deg1 / 45 )
            
    for deg2 = 0 to fullcircle step .1

            c2 = cos( deg2 * rad * 8 )
            s2 =  sin( deg2 * rad * 8 )
   
            x2 = radius * c2 * c2 / 4
            y2 = radius * s2 * s2 / 4
            
            deg3 = ( deg2 + deg1 ) / 10
            c3 = cos( deg3 * rad )
            s3 = sin( deg3 * rad ) 
            
            x3 = radius * c3 * c2 * atan2( y1 , x2 ) * atn( c3 * s2 )
            y3 = radius * s3 * s2 * atan2( x1 , y2 ) * atn( s3 * c2 )
            
        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

Sleep
end

Here's Abstract_0119-2.bas

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 rad

dim as integer xctr , yctr , radius , divisions , fullcircle
dim as integer xres , yres

screeninfo xres , yres
screenres xres , yres , 8 , 1 , 8

xctr = xres / 2
yctr = yres / 2

'radius = (xres*yres)/((xres+yres)*4)
radius = 250

divisions = 45

rad = atn( 1 ) / divisions

fullcircle = atn( 1 ) * 8 / rad

for deg1 = 0 to fullcircle step 22.5
    
            c1 = cos( deg1 * rad )
            s1 = sin( deg1 * rad )
   
            x1=radius * c1 * c1 * c1 * atn( deg1 / 45 )
            y1=radius * s1 * s1 * s1 * atn( deg1 / 45 )
            
    for deg2 = 0 to fullcircle step .1

            c2 = cos( deg2 * rad * 8 )
            s2 =  sin( deg2 * rad * 8 )
   
            x2 = radius * c2 * c2 / 4
            y2 = radius * s2 * s2 / 4
            
            deg3 = ( deg2 + deg1 ) / 10
            c3 = cos( deg3 * rad )
            s3 = sin( deg3 * rad ) 
            
            x3 = radius * c3 * c2 * atan2( y1 , x2 ) * atn( c3 * s2 ) * c3
            y3 = radius * s3 * s2 * atan2( x1 , y2 ) * atn( s3 * c2 ) * s3
            
        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

Sleep
end

Here's Abstract_0119-3.bas

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 rad

dim as integer xctr , yctr , radius , divisions , fullcircle
dim as integer xres , yres

screeninfo xres , yres
screenres xres , yres , 8 , 1 , 8

xctr = xres / 2
yctr = yres / 2

'radius = (xres*yres)/((xres+yres)*4)
radius = 250

divisions = 45

rad = atn( 1 ) / divisions

fullcircle = atn( 1 ) * 8 / rad

for deg1 = 0 to fullcircle step 22.5
    
            c1 = cos( deg1 * rad )
            s1 = sin( deg1 * rad )
   
            x1=radius * c1 * c1 * c1 * atn( deg1 / 45 )
            y1=radius * s1 * s1 * s1 * atn( deg1 / 45 )
            
    for deg2 = 0 to fullcircle step .1

            c2 = cos( deg2 * rad * 8 )
            s2 =  sin( deg2 * rad * 8 )
   
            x2 = radius * c2 * c2 / 4
            y2 = radius * s2 * s2 / 4
            
            deg3 = ( deg2 + deg1 ) / 10
            c3 = cos( deg3 * rad * 8 ) / 1.5
            s3 = sin( deg3 * rad  * 8 ) / 1.5
            
            x3 = radius * c3 * atan2( y1 , x2 ) * atn( c3 * s2 ) * c3
            y3 = radius * s3 * atan2( x1 , y2 ) * atn( s3 * c2 ) * s3
            
        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

Sleep
end

Here's Abstract_0119-4.bas

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 rad

dim as integer xctr , yctr , radius , divisions , fullcircle
dim as integer xres , yres

screeninfo xres , yres
screenres xres , yres , 8 , 1 , 8

xctr = xres / 2
yctr = yres / 2

'radius = (xres*yres)/((xres+yres)*4)
radius = 200

divisions = 22.5

rad = atn( 1 ) / divisions

fullcircle = atn( 1 ) * 8 / rad

for deg1 = 0 to fullcircle step 22.5
    
            c1 = cos( deg1 * rad )
            s1 = sin( deg1 * rad )
   
            x1 = radius * c1 * atn( deg1 / 45 )
            y1 = radius * s1 * atn( deg1 / 45 )
            
    for deg2 = 0 to fullcircle step .01

            c2 = cos( deg2 * rad * 8 )
            s2 =  sin( deg2 * rad * 8 )
   
            x2 = radius * c2 * atn( deg2 / 45 ) / 4
            y2 = radius * s2 * atn( deg2 / 45 ) / 4
            
            deg3 = ( deg2 + deg1 ) / 20
            c3 = cos( deg3 * rad * 4 ) / 1.5
            s3 = sin( deg3 * rad  * 4 ) / 1.5
            
            x3 = radius * c3 * atan2( y1 , x2 ) * atn( c3 * s2 ) * c3 
            y3 = radius * s3 * atan2( x1 , y2 ) * atn( s3 * c2 ) * s3 / 1.5
            
        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

Sleep
end

albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

Here's Abstract_0120.bas

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 rad

dim as integer xctr , yctr , radius , divisions , fullcircle
dim as integer xres , yres

screeninfo xres , yres
screenres xres , yres , 8 , 1 , 8

xctr = xres / 2
yctr = yres / 2

'radius = (xres*yres)/((xres+yres)*4)
radius = 200

divisions = 22.5

rad = atn( 1 ) / divisions

fullcircle = atn( 1 ) * 8 / rad

for deg1 = 0 to fullcircle step 22.5
    
            c1 = cos( deg1 * rad )
            s1 = sin( deg1 * rad )
   
            x1 = radius * c1
            y1 = radius * s1
            
    for deg2 = 0 to fullcircle step .01

            c2 = cos( deg2 * rad * 8 )
            s2 =  sin( deg2 * rad * 8 )
   
            x2 = radius * c2 / 2
            y2 = radius * s2 / 2
            
            deg3 = ( deg2 + deg1 ) / 10
            c3 = cos( deg3 * rad )
            s3 = sin( deg3 * rad )
            
            x3 = radius * c3 * atan2( y1 , x2 ) / 3
            y3 = radius * s3 * atan2( x1 , y2 ) / 3
            
        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

Sleep
end

albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Squares

Post by albert »

Here's Abstract_0121.bas

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 rad

dim as integer xctr , yctr , radius , divisions , fullcircle
dim as integer xres , yres

screeninfo xres , yres
screenres xres , yres , 8 , 1 , 8

xctr = xres / 2
yctr = yres / 2

'radius = (xres*yres)/((xres+yres)*4)
radius = 300

divisions = 22.5

rad = atn( 1 ) / divisions

fullcircle = atn( 1 ) * 8 / rad

for deg1 = 0 to fullcircle step 22.5
    
            c1 = cos( deg1 * rad )
            s1 = sin( deg1 * rad )
   
            x1 = radius * c1 * c1 * s1 * atn( deg1 / c1 * rad )
            y1 = radius * s1 * s1 * c1 * atn( deg1 / s1 * rad )
            
    for deg2 = 0 to fullcircle step .025

            c2 = cos( deg2 * rad * 10 )
            s2 =  sin( deg2 * rad * 10 )
   
            x2 = radius * c2 / 2 * s1
            y2 = radius * s2 / 2 * c1
            
            deg3 = ( deg2 / deg1 + deg2 ) * 4
            c3 = cos( deg3 * rad * 4 )
            s3 = sin( deg3 * rad * 4 )
            
            x3 = radius * c3 * c3 * atn( deg1+deg2 / 45 ) / 4
            y3 = radius * s3 * s3 * atn( deg1+deg2 / 45 ) / 4
            
        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

Sleep
end

@AndyA

Cant you make your colorizer , so it picks colors that look good together..

like:
white , turquoise , purple and blue
red , yellow , green , blue
etc...
Locked