Last active
December 15, 2015 21:52
-
-
Save butchi/029c3ea62f2c8c65d71e to your computer and use it in GitHub Desktop.
シェルピンスキーのギャスケット(Mathematicaショートフラクタルシリーズ) ref: http://qiita.com/butchi_y/items/fbf5d2b9b49c10c8f217
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Graphics@Polygon[Transpose[{Re[#], Im[#]}] & /@ | |
Nest[ | |
Flatten[{#/2, #/2 + 1/4 + Sqrt[3]/4 I, #/2 + 1/2}, 1] &, | |
{{0, 1/2 + Sqrt[3]/2 I, 1}}, | |
6 | |
] | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Graphics[Polygon[{Re[#], Im[#]} & /@ {0, 1/2 + Sqrt[3]/2 I, 1}]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ifs[x_] := {x/2, x/2 + 1/4 + Sqrt[3]/4 I, x/2 + 1/2}; | |
triForce = ifs[{0, 1/2 + Sqrt[3]/2 I, 1}]; | |
Graphics[Polygon[Transpose[{Re[#], Im[#]}] & /@ triForce]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ifs[x_] := {x/2, x/2 + 1/4 + Sqrt[3]/4 I, x/2 + 1/2}; | |
gasket = Nest[Flatten[ifs[#], 1] &, {{0, 1/2 + Sqrt[3]/2 I, 1}}, 2]; | |
Graphics[Polygon[Transpose[{Re[#], Im[#]}] & /@ gasket]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Graphics@Polygon[Transpose[{Re[#],Im[#]}]&/@Nest[Flatten[{2#,2#+1+Sqrt[3]I,2#+2}/4,1]&,{{0,2+2Sqrt[3]I,4}/4},6]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Graphics[Point[{Re[#],Im[#]}&/@Nest[Flatten[{#/2,#/2+1/4+Sqrt[3]/4I,#/2+1/2}]&,0,6]]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment