Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. documentclass[border=2mm,12pt,tikz]{standalone}
  2. usepackage{tikz-3dplot}
  3. usetikzlibrary{3d,calc,backgrounds,patterns}
  4. begin{document}
  5. pgfmathsetmacro{myr}{3}
  6. pgfmathsetmacro{h}{2}
  7. defangB{0}
  8. defphi{120}
  9. defangA{{angB + phi}}
  10. defangC{phi - 180}
  11. tdplotsetmaincoords{65}{100}
  12. begin{tikzpicture}[tdplot_main_coords,scale=1,line cap=butt,line join=round]
  13. begin{scope}[canvas is xy plane at z=0]
  14. draw[dashed] (tdplotmainphi:myr) arc(tdplotmainphi:tdplotmainphi+180:myr);
  15. coordinate (O) at (0,0);
  16. coordinate (A) at (angA:myr);
  17. coordinate (B) at (angB:myr);
  18. draw[thick] (tdplotmainphi:myr) coordinate(BR) arc(tdplotmainphi:tdplotmainphi-180:myr)
  19. coordinate(BL);
  20. end{scope}
  21. begin{scope}[canvas is xy plane at z=h]
  22. coordinate (O') at (0,0);
  23. coordinate (C) at (angC:myr);
  24. coordinate (D) at ($ (A) + (C) -(B) $);
  25. draw[thick] (O') circle[radius=myr];
  26. draw [thick](BR) -- (tdplotmainphi:myr) (BL) -- (tdplotmainphi-180:myr);
  27. end{scope}
  28. fill (A) circle[radius=1pt] node[above] {$A$};
  29. fill (B) circle[radius=1pt] node[above] {$B$};
  30. fill (C) circle[radius=1pt] node[above] {$C$};
  31. fill (D) circle[radius=1pt] node[above] {$D$};
  32. draw[dashed] (C) -- (B) -- (A) -- (D) ;
  33. draw[] (C) -- (D);
  34. end{tikzpicture}
  35. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement