Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Sierpinski-triangle/Logo/sierpinski-triangle.logo
Normal file
14
Task/Sierpinski-triangle/Logo/sierpinski-triangle.logo
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
; Print rows of the triangle from 0 to :limit inclusive.
|
||||
; limit=15 gives the order 4 form per the task.
|
||||
; The range of :y is arbitrary, any rows of the triangle can be printed.
|
||||
|
||||
make "limit 15
|
||||
for [y 0 :limit] [
|
||||
for [x -:limit :y] [
|
||||
type ifelse (and :y+:x >= 0 ; blank left of triangle
|
||||
(remainder :y+:x 2) = 0 ; only "even" squares
|
||||
(bitand :y+:x :y-:x) = 0 ; Sierpinski bit test
|
||||
) ["*] ["| |] ; star or space
|
||||
]
|
||||
print []
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue