Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- distance AS float
- objnum=1
- distance=10
- angle=45
- iterations = 100
- make object sphere objnum,10
- position object objnum,x,y,80
- tree(0,0,distance,angle,iterations,objnum)
- DO
- sync
- LOOP
- FUNCTION tree(x,y,distance,angle,iterations,objnum)
- distance=distance/1.2
- iter=iter+1
- angle=0-angle
- objnum=objnum+1
- x2=oldx2
- y2=oldy2
- x2=x+SIN(angle)*distance
- y2=y+COS(angle)*distance
- make object sphere objnum,distance
- position object objnum,x2,y2,80
- IF iter < iterations THEN tree(x,y,distance,angle,iterations,objnum)
- endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement