25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

166 satır
5.7KB

  1. %&tex
  2. \documentclass{standalone}
  3. \usepackage{tikz}
  4. \usepackage{siltex}
  5. \usetikzlibrary {calc,arrows.meta,positioning,patterns,math}
  6. %\input{graphics/tics.tikz}
  7. \begin{document}
  8. \begin{tikzpicture}[on grid]
  9. % Define Drawing Box dimentions
  10. \def \boxheight {5};
  11. \def \boxwidth {6};
  12. \def \boxorigin {(-\boxwidth/2,-1)};
  13. \def \boxsize {(\boxwidth,\boxheight)};
  14. \def \armcolor {gray};
  15. \def \width {0.3};
  16. \def \length {5};
  17. \def \holediameter {0.10};
  18. \def \floorheight {0.5};
  19. \pgfmathsetmacro{\floorwidth}{4};
  20. \def \arm {
  21. \draw[fill=\armcolor] (0,0) ++(0,\width/2) arc[start angle=90, end angle=270, radius=\width/2] -- ++(\length,0) arc[start angle=-90, end angle=90, radius=\width/2] -- cycle;
  22. \draw[fill=white] (0,0) circle (\holediameter/2);
  23. \draw[fill=white] (\length,0) circle (\holediameter/2);
  24. }
  25. \def \doublescara {
  26. \pgfmathsetmacro{\C}{sqrt(pow(\A,2)+pow(\B,2)-2*\A*\B*cos(\c))};
  27. \pgfmathsetmacro{\b}{acos((pow(\A,2) + pow(\C,2) - pow(\B,2))/(2*\A*\C))};
  28. \pgfmathsetmacro{\d}{180-\h-\b};
  29. \pgfmathsetmacro{\D}{sqrt(pow(\C,2)+pow(\B,2)-2*\B*\C*cos(\d))};
  30. \pgfmathsetmacro{\g}{acos(\D/(2*\B))};
  31. \pgfmathsetmacro{\f}{acos((pow(\D,2) + pow(\B,2) - pow(\C,2))/(2*\D*\B))};
  32. \pgfmathsetmacro{\a}{180-\b-\c};
  33. \pgfmathsetmacro{\e}{180-\d-\f};
  34. \pgfmathsetmacro{\k}{180-\f-\g};
  35. \pgfmathsetmacro{\m}{180-\g-\e-\a};
  36. \begin{scope}[shift={(-\A/2,0)}, rotate=\c]
  37. \def \length{\B}
  38. \arm
  39. \begin{scope}[shift={(\B,0)}, rotate=-\m]
  40. \def \length{\B}
  41. \arm
  42. \end{scope}
  43. \end{scope}
  44. \begin{scope}[shift={(\A/2,0)}, rotate=\h]
  45. \def \length{\B}
  46. \arm
  47. \begin{scope}[shift={(\B,0)}, rotate=\k]
  48. \def \length{\B}
  49. \arm
  50. \end{scope}
  51. \end{scope}
  52. };
  53. \tikzset{arm/.pic={
  54. \def \length {#1}
  55. \draw[fill=gray] (0,0) ++(0,\width/2) arc[start angle=90, end angle=270, radius=\width/2] -- ++(\length,0) arc[start angle=-90, end angle=90, radius=\width/2] -- cycle;
  56. \draw[fill=white] (0,0) circle (\holediameter/2);
  57. \draw[fill=white] (\length,0) circle (\holediameter/2);
  58. },
  59. floor/.pic={
  60. \def \width {#1/2};
  61. \draw (-\width,0) -- (\width,0);
  62. \fill[pattern=north west lines] (-\width,-\floorheight) rectangle (\width,0);
  63. },
  64. box/.pic={
  65. \draw \boxorigin rectangle ++\boxsize;
  66. }
  67. };
  68. \pgfmathsetmacro{\B}{2};
  69. \pgfmathsetmacro{\A}{1};
  70. \begin{scope}[shift={(0,0)}]
  71. \draw (0,0) pic {box};
  72. \draw (0,0) pic {floor=2};
  73. \pgfmathsetmacro{\c}{90};
  74. \pgfmathsetmacro{\h}{40};
  75. \def \armcolor{lightgray};
  76. \doublescara;
  77. \pgfmathsetmacro{\c}{130};
  78. \pgfmathsetmacro{\h}{60};
  79. \def \armcolor{gray};
  80. \doublescara;
  81. \end{scope}
  82. \begin{scope}[shift={(0*\boxwidth,\boxheight)}]
  83. \draw (0,0) pic {box};
  84. \draw (0,0) pic {floor=2};
  85. \begin{scope}[shift={(0,0)}, rotate=120]
  86. \def \length{\B}
  87. \arm
  88. \begin{scope}[shift={(\B,0)}, rotate=-100]
  89. \def \length{\B}
  90. \arm
  91. \end{scope}
  92. \end{scope}
  93. \end{scope}
  94. \begin{scope}[shift={(\boxwidth,0*\boxheight)}]
  95. \draw (0,0) pic {box};
  96. \draw (0,0) pic {floor=2};
  97. \def \a {105};
  98. \def \b {5};
  99. \def \c {\b-\a};
  100. \def \C {1};
  101. \def \B {2.5};
  102. \def \A {3};
  103. \begin{scope}[shift={(0,0)}, rotate=180+\b]
  104. \def \length{\C}
  105. \begin{scope}[shift={(\length,0)}, rotate=-(180+\c)]
  106. \def \length{\A}
  107. \arm
  108. \begin{scope}[shift={(\length,0)}, rotate=\c]
  109. \def \length{\B+\C}
  110. \arm
  111. \end{scope}
  112. \end{scope}
  113. \arm
  114. \end{scope}
  115. \begin{scope}[shift={(0,0)}, rotate=\a]
  116. \def \length{\A}
  117. \arm
  118. \end{scope}
  119. \begin{scope}[shift={(\C,0)}, rotate=\a]
  120. \def \length{\C}
  121. \begin{scope}[shift={(\length,0)}, rotate=-180-\a]
  122. \def \length{\C}
  123. \arm
  124. \end{scope}
  125. \arm
  126. \end{scope}
  127. \end{scope}
  128. \begin{scope}[shift={(1*\boxwidth,1*\boxheight)}]
  129. \draw (0,0) pic {box};
  130. \draw (0,0) pic {floor=2};
  131. \def \a {105};
  132. \def \b {5};
  133. \def \c {\b-\a};
  134. \def \C {1};
  135. \def \B {2.5};
  136. \def \A {3};
  137. \begin{scope}[shift={(0,0)}, rotate=180+\b]
  138. \def \length{\C}
  139. \begin{scope}[shift={(\length,0)}, rotate=-(180+\c)]
  140. \def \length{\A}
  141. \arm
  142. \begin{scope}[shift={(\length,0)}, rotate=\c]
  143. \def \length{\B+\C}
  144. \arm
  145. \end{scope}
  146. \end{scope}
  147. \arm
  148. \end{scope}
  149. \begin{scope}[shift={(0,0)}, rotate=\a]
  150. \def \length{\A}
  151. \arm
  152. \end{scope}
  153. \end{scope}
  154. \end{tikzpicture}
  155. \end{document}