Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,39 @@
|
|||
nomainwin
|
||||
|
||||
open "test" for graphics_nsb_fs as #gr
|
||||
|
||||
#gr "trapclose quit"
|
||||
#gr "down; home"
|
||||
#gr "posxy cx cy"
|
||||
|
||||
order =10
|
||||
|
||||
w =cx *2: h =cy *2
|
||||
|
||||
dim a( h, h) 'line, col
|
||||
|
||||
#gr "trapclose quit"
|
||||
#gr "down; home"
|
||||
|
||||
a( 1, 1) =1
|
||||
|
||||
for i = 2 to 2^order -1
|
||||
scan
|
||||
a( i, 1) =1
|
||||
a( i, i) =1
|
||||
for j = 2 to i -1
|
||||
'a(i,j)=a(i-1,j-1)+a(i-1,j) 'LB is quite capable for crunching BIG numbers
|
||||
a( i, j) =(a( i -1, j -1) +a( i -1, j)) mod 2 'but for this task, last bit is enough (and it much faster)
|
||||
next
|
||||
for j = 1 to i
|
||||
if a( i, j) mod 2 then #gr "set "; cx +j -i /2; " "; i
|
||||
next
|
||||
next
|
||||
#gr "flush"
|
||||
|
||||
wait
|
||||
|
||||
sub quit handle$
|
||||
close #handle$
|
||||
end
|
||||
end sub
|
||||
Loading…
Add table
Add a link
Reference in a new issue