Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[border=2mm,12pt,tikz]{standalone}
- usepackage{tikz-3dplot}
- usetikzlibrary{3d,calc,backgrounds,patterns}
- begin{document}
- pgfmathsetmacro{myr}{3}
- pgfmathsetmacro{h}{2}
- defangB{0}
- defphi{120}
- defangA{{angB + phi}}
- defangC{phi - 180}
- tdplotsetmaincoords{65}{100}
- begin{tikzpicture}[tdplot_main_coords,scale=1,line cap=butt,line join=round]
- begin{scope}[canvas is xy plane at z=0]
- draw[dashed] (tdplotmainphi:myr) arc(tdplotmainphi:tdplotmainphi+180:myr);
- coordinate (O) at (0,0);
- coordinate (A) at (angA:myr);
- coordinate (B) at (angB:myr);
- draw[thick] (tdplotmainphi:myr) coordinate(BR) arc(tdplotmainphi:tdplotmainphi-180:myr)
- coordinate(BL);
- end{scope}
- begin{scope}[canvas is xy plane at z=h]
- coordinate (O') at (0,0);
- coordinate (C) at (angC:myr);
- coordinate (D) at ($ (A) + (C) -(B) $);
- draw[thick] (O') circle[radius=myr];
- draw [thick](BR) -- (tdplotmainphi:myr) (BL) -- (tdplotmainphi-180:myr);
- end{scope}
- fill (A) circle[radius=1pt] node[above] {$A$};
- fill (B) circle[radius=1pt] node[above] {$B$};
- fill (C) circle[radius=1pt] node[above] {$C$};
- fill (D) circle[radius=1pt] node[above] {$D$};
- draw[dashed] (C) -- (B) -- (A) -- (D) ;
- draw[] (C) -- (D);
- end{tikzpicture}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement