Advertisement
Matthen

Golden Ratio Construction

Jun 22nd, 2013
726
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. frame[\[Theta]_] :=
  2. Module[{p = {-Cos[\[Theta]], Sin[\[Theta]]},
  3. n = {Sin[\[Theta]], Cos[\[Theta]]}, q = {1, Sin[\[Theta]]}, \[Phi]},
  4. \[Phi] = (Sqrt[5] + 1)/2;
  5. Graphics[{
  6. Thickness[0.005],
  7. {FaceForm[Directive[Opacity[0.3], Purple]],
  8. EdgeForm[Directive[Thickness[0.005], Black]],
  9. Rectangle[{0, 0}, {-Cos[\[Theta]], 1}]},
  10. PointSize[Large],
  11. {Dashed, Line[{p, q}]},
  12. Line[{p - n, p + Csc[\[Theta]] n}],
  13. Line[{{0, 0}, Csc[\[Theta]] n}],
  14. Line[{p + Csc[\[Theta]] n, Csc[\[Theta]] n}],
  15. Gray,
  16. Line[{{1, 0}, {1, 10}}],
  17. {Black, Disk[{0, 0}, 0.05],
  18. FaceForm[Directive[Opacity[0.2], Orange]],
  19. EdgeForm[Directive[Thickness[0.005], Black]], Disk[{0, 0}, 1]},
  20. Orange,
  21. Point[p],
  22. Blue,
  23. Point[Csc[\[Theta]] n],
  24. Red,
  25. Point[q],
  26. Black,
  27. Text[Style[1, Large], {0.05, 0.5}],
  28. Text[Style[Cos[\[Theta]], Large], {-Cos[\[Theta]]/2, -0.13}]
  29. }, PlotRange -> {{-1.1, 1.1}, {-0.2, 1.61}}]
  30. ]; Manipulate[
  31. frame[\[Theta]],
  32. {\[Theta], Pi/2, ArcCos[1/\[Phi]] - 0.1}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement