TeX - LaTeX Asked on December 15, 2020
I would like to be able to draw different quadrilaterals with right-angles at different corners. I tried to use relative co-ordinates and failed, here’s my MWE. I also tried to use the right angle -| and failed.
documentclass{amsart}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
usepackage{tkz-euclide}% this needed for markings on trianlges with red markings
usetikzlibrary{shapes,shapes.multipart}
thispagestyle{empty}
begin{document}
begin{tikzpicture}
draw [help lines] (-3,-3) grid (2,2);
draw[green,fill=green] (0,0) circle (.5ex);
draw [color=blue, very thick] (-1,-3) -- (-3,0) -- (-1,2) -- (-30:2cm) --cycle;
draw [very thick, color= red] (-1.3,1.75) -- (-1,1.4)-- (-0.8,1.8) ;
end{tikzpicture}
end{document}
a solution
documentclass{amsart}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
%usepackage{tkz-euclide}% this needed for markings on trianlges with red markings
usetikzlibrary{shapes,shapes.multipart}
thispagestyle{empty}
begin{document}
begin{tikzpicture}
path[thick,blue] (2,0)coordinate(A) -- (4.5,-3)coordinate(B);
coordinate(C) at ($(B)!2.5cm!90:(A)$) ;
coordinate(D) at ($(A)!3cm!-70:(B)$) ;
draw[thick,blue] (A) -- (B) -- (C) -- (D) -- cycle;
draw pic[draw,fill=green!30,angle radius=1cm,"$theta$" shift={(1mm,1mm)}] {angle=A--B--C};
draw (0,0) grid (5,-5);
end{tikzpicture}
end{document}
Correct answer by rpapa on December 15, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP