Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[border={1mm 1mm 1mm 1mm}]{standalone}
- usepackage{tikz}
- usetikzlibrary{intersections}
- begin{document}
- begin{tikzpicture}
- defR{2}
- defH{4}
- defW{2}
- draw [red,domain=90:180] plot ({R*cos(x)}, {R*sin(x)});
- draw[blue](0,0)rectangle(-R,H);
- end{tikzpicture}
- begin{tikzpicture}
- defR{4}
- defH{4}
- defW{2.2}
- draw [red,domain=90:180,name path=A] plot ({R*cos(x)}, {R*sin(x)});
- draw[red](0,0)--(-R,0);
- draw[blue,name path=B](0,0)rectangle(-W,H);
- path [name intersections={of=A and B,by={E, F}}];
- draw[green](0,0)--(F) node[midway,above,sloped]{H};
- draw [fill=red,draw=none] (F) circle(1pt);
- end{tikzpicture}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement