Last active
December 15, 2015 21:50
-
-
Save butchi/2c4979be8ff9dc57650b to your computer and use it in GitHub Desktop.
Mathematicaで星形を書くよ☆ ref: http://qiita.com/butchi_y/items/b648a4c33f8112bb7c37
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
(-1)^Range[0, 4, 4/5] | |
ListPlot[{Re[#], Im[#]} & /@ %, Joined -> True, AspectRatio -> Automatic] |
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
Re[(-1)^Range[0, 4, 4/5]][[3]] |
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
1/Cos[Pi/5]*(Sqrt[5] - 1)/4 // FullSimplify |
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
(-1)^Range[0, 4, 4/5]; | |
Show[ | |
ListPlot[{Re[#], Im[#]} & /@ %, Joined -> True, AspectRatio -> Automatic], | |
Graphics[Circle[{0, 0}, (3 - Sqrt[5])/2]] | |
] |
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
(-1)^((2 Range[0, 8, 2])/10) | |
ListPlot[{Re[#], Im[#]} & /@ %, Joined -> True, | |
AspectRatio -> Automatic] |
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
(3 - Sqrt[5])/2 (-1)^((2 Range[1, 10, 2])/10); | |
ListPlot[{Re[#], Im[#]} & /@ %, Joined -> True, | |
AspectRatio -> Automatic] |
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
Riffle[ | |
(-1)^((2 Range[0, 8, 2])/10), | |
(3 - Sqrt[5])/2 (-1)^((2 Range[1, 10, 2])/10) | |
]; | |
ListPlot[{Re[#], Im[#]} & /@ %, Joined -> True, AspectRatio -> Automatic] |
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[{EdgeForm[Thick], Yellow, | |
Polygon[{Im[#], Re[#]} & /@ Riffle[ | |
(-1)^((2 Range[0, 8, 2])/10), | |
(3 - Sqrt[5])/2 (-1)^((2 Range[1, 10, 2])/10) | |
]] | |
}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment