Showing posts with label Drawings. Show all posts
Showing posts with label Drawings. Show all posts

Saturday, December 22, 2012

Flags 2


# Union jack
color blue
rect 0,0,300,300
color white
poly {0,20,0,0,20,0,300,280,300,300,280,300}
poly {280,0,300,0,300,20,20,300,0,300,0,280}
color red
poly {0,10,0,0,10,0,300,290,300,300,290,300}
poly {290,0,300,0,300,10,10,300,0,300,0,290}
color white
rect 120,0,60,300
rect 0,120,300,60
color red
rect 130,0,40,300
rect 0,130,300,40
pause 2
# Stars and Stripes
for n = 0 to 13 step 2
color red
rect 0,n*23,300,23
color white
rect 0,(n+1)*23,300,23
next n
font "arial",15,100
color blue
rect 0,0,120,7*23
color white
for x = 1 to 6
for y = 1 to 5
text x*18-8,y*34-27,"*"
next y
next x
for x = 1 to 5
for y = 1 to 4
text x*18,y*34-10,"*"
next y
next x
Rem Триколор
color white
rect 0,0,300,100
color blue
rect 0,100,300,100
color red
rect 0,200,300,100

Saturday, January 1, 2011

Color plots

Graphsize 600,600
fastgraphics
clg
for pic = 1 to 2
for x= 1 to 600
for y= 1 to 600
# try different formulae for color using coordenates x and y
if pic = 1 then color ((x-300)^2+(y-300)^2)*3
if pic = 2 then color 300*abs((x-300)/(y-300))
plot x,y
next y
refresh
next x
next pic

Friday, December 3, 2010

Dragon curve

graphsize 900,900
color yellow
rect 0,0,900,900
color black
fastgraphics
order=15
Dim s(2^order+1)
s[1]=1 : s[2]=1
for n=2 to order
a= 2^n-1 : b=2^(n-1)+1
for g= a to b step -1
s[g]= abs(s[2^n-g]-1)
next g
s[2^n]=1
next n
Zoom =3 : angle=180
x1=110*Zoom : y1=90*Zoom
for g= 1 to 2^(order)-1
refresh
gosub lines
if s[g]=1 then angle =angle+90
if s[g]=0 then angle =angle-90
next g
lines:
r = (angle/180)*pi
y2=y1 + (sin (r))*Zoom
x2=x1 - (cos (r))*Zoom
line x1,y1,x2,y2
x1=x2
y1=y2
return

Monday, November 29, 2010

Fractal Tree


graphsize 600,600
for i = 1 to 1000
x1=300
y1=600
s=290
angle = 270
color 127*int(rand*3),127*int(rand*3),127*int(rand*3)
for b = 1 to 6
gosub lines
s=s*.5
angle = angle + int(rand*5)*45-90
next b
next i
lines:
r = (angle/180)*pi
y2=y1 + (sin (r))*s
x2=x1 - (cos (r))*s
for n = 1 to 30
circle (x2*n+x1*(30-n))/30,(y2*n+y1*(30-n))/30,36/b^2
next n
x1=x2
y1=y2
return

Monday, October 11, 2010

Spiral


clg
radius =5
angle = 1
do
gosub polarcoordinates
radius = radius+0.05
angle = angle+2
circle 150+x,150+y,2
color rgb(int(rand*2)*255,int(rand*2)*255,int(rand*2)*255)
until radius>150
end
polarcoordinates:
rad = (angle/180)*pi
y=(sin (rad))*radius
x=(cos (rad))*radius
return


Sunday, October 10, 2010

Mandala

clg

x1=80
y1=70
d =200
angle = 90
for s = 1 to 200
gosub lines
angle = angle + 111
next s
lines:
r = (angle/180)*3.14159
y2=y1 + (sin (r))*d
x2=x1 - (cos (r))*d
line x1,y1,x2,y2
x1=x2
y1=y2
return