tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
4
Task/Dragon-curve/Mathematica/dragon-curve.math
Normal file
4
Task/Dragon-curve/Mathematica/dragon-curve.math
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
FoldOutLine[{a_,b_}]:={{a,#},{b,#}}&[a+0.5(b-a)+{{0.,0.5},{-0.5,0.}}.(b-a)]
|
||||
NextStep[in_]:=Flatten[FoldOutLine/@in,1]
|
||||
lines={{{0.,0.},{1.,0.}}};
|
||||
Graphics[Line/@Nest[NextStep,lines,11]]
|
||||
Loading…
Add table
Add a link
Reference in a new issue