lambdaway
::
stars
2
|
list
|
login
|
load
|
|
_h1 ... [[koch]] | stars _p Exploring some figures generated by turtle's moves, I discovered these strange ones. _p 1) We define a unique sequence of turtle's moves generating five segments {center {code M'{* 2 :d} T-:a M:d T-:a M'{* 2 :d} T:a M'{* 3 :d} T:a M:d T:a} } {pre '{def star {lambda {:n :d :a} // :d is size and :a is angle {if {< :n 1} then else M{* 2 :d} T-:a M:d T-:a M{* 2 :d} T:a M{* 3 :d} T:a M:d T:a {star {- :n 1} :d :a} }}} -> {def star {lambda {:n :d :a} {if {< :n 1} then else M{* 2 :d} T-:a M:d T-:a M{* 2 :d} T:a M{* 3 :d} T:a M:d T:a {star {- :n 1} :d :a} }}} } _p 2) We call it iteratively to draw a range of closed waving shapes with different values for the angle and the number of iterations: {pre '{def stars {lambda {:i} {polyline {@ points="{turtle 370 450 {* :i 10} {star :i 10 {/ 360 :i}}}" fill="{if {= :i 3} then cyan else {if {= :i 4} then red else #ffa}}" stroke="black" stroke-width="1"}}}} -> {def stars {lambda {:i} {polyline {@ points="{turtle 370 450 {* :i 10} {star :i 10 {/ 360 :i}}}" fill="{if {= :i 3} then cyan else {if {= :i 4} then red else #ffa}}" stroke="black" stroke-width="1"}}}} '{svg {@ width="600px" height="600px" style="border:1px solid #888; background:#fff;"} {S.map stars {S.serie 16 3 -1}} } } {svg {@ width="600px" height="600px" style="border:1px solid #888; background:#444;"} {S.map stars {S.serie 16 3 -1}} } _p 3) The result is quite strange, looking like a kind of brain growing from two first shapes, in cyan (3x120°) and red (4x90°), rather inexpected, so different and symbolically very impressive. {svg {@ width="600px" height="230px" style="border:1px solid #888; background:#fff;"} {polyline {@ points="{turtle 200 60 30 {star 3 60 {/ 360 3}}}" fill="transparent" stroke="grey" stroke-width="1"}} {polyline {@ points="{turtle 200 60 30 {star 1 60 {/ 360 3}}}" fill="transparent" stroke="cyan" stroke-width="3"}} {polyline {@ points="{turtle 480 15 0 {star 4 40 {/ 360 4}}}" fill="transparent" stroke="grey" stroke-width="1"}} {polyline {@ points="{turtle 480 15 0 {star 1 40 {/ 360 4}}}" fill="transparent" stroke="red" stroke-width="3"}} } _p The [[Star of David|https://en.wikipedia.org/wiki/Star_of_David]] and the [[Sauwastika|https://en.wikipedia.org/wiki/Sauwastika]] (the backwards svastika) look to be in the brain's heart? What does it mean exactly? _p And what about the next one (5x72°)? Would it be the star of the {b XXI{sup fst}} century? {svg {@ width="600px" height="330px" style="border:1px solid #888; background:#fff;"} {polyline {@ points="{turtle 300 20 0 {star 5 30 {/ 360 5}}}" fill="transparent" stroke="grey" stroke-width="1"}} {polyline {@ points="{turtle 300 20 0 {star 1 30 {/ 360 5}}}" fill="transparent" stroke="red" stroke-width="3"}} } {img {@ src="http://lambdaway.free.fr/workshop/data/digital_brain.jpg" width="100%" title="Digital brain"}} {style ;; #page_frame { width:620px; } }
lambdaway v.20211111