Drawing an isosceles trapezoid with perpendicular diagonals
I need to draw an isosceles trapezoid with perpendicular diagonals, but I am not sure where to start. Here is my code for a square with perpendicular diagonals (if it is even helpful).
begin{tikzpicture}[scale=5.5]
coordinate[label=left:$W$] (W) at (0,0);
coordinate[label=right:$X$] (X) at (1,0);
coordinate[label=:$Y$] (Y) at (1, 1);
coordinate[label=:$Z$] (Z) at (0, 1);
coordinate[label=:$O$] (O) at (0.5, 0.5);
draw (W)--(X)--(Y)--(Z)--(W)--(Y)--(Z)--(X);
draw (O) -- node[sloped] {$|$} (Y);
draw (O) -- node[sloped] {$|$} (Z);
draw (O) -- node[sloped] {$|$} (X);
draw (O) -- node[sloped] {$|$} (W);
end{tikzpicture}
Would I have to mathematically find the coordinates of one such trapezoid or is there another way to do it? All help is appreciated!
tikz-graphdrawing
New contributor
M. C. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
|
show 1 more comment
I need to draw an isosceles trapezoid with perpendicular diagonals, but I am not sure where to start. Here is my code for a square with perpendicular diagonals (if it is even helpful).
begin{tikzpicture}[scale=5.5]
coordinate[label=left:$W$] (W) at (0,0);
coordinate[label=right:$X$] (X) at (1,0);
coordinate[label=:$Y$] (Y) at (1, 1);
coordinate[label=:$Z$] (Z) at (0, 1);
coordinate[label=:$O$] (O) at (0.5, 0.5);
draw (W)--(X)--(Y)--(Z)--(W)--(Y)--(Z)--(X);
draw (O) -- node[sloped] {$|$} (Y);
draw (O) -- node[sloped] {$|$} (Z);
draw (O) -- node[sloped] {$|$} (X);
draw (O) -- node[sloped] {$|$} (W);
end{tikzpicture}
Would I have to mathematically find the coordinates of one such trapezoid or is there another way to do it? All help is appreciated!
tikz-graphdrawing
New contributor
M. C. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
How would I implement it? I just learned Latex, so I am a complete beginner.
– M. C.
17 hours ago
Remember that not any such trapezium has such diagonals. You need to identify under such conditions it has.
– Sigur
16 hours ago
Observe that the diagonals determine an isosceles right triangle.
– Sigur
16 hours ago
Yes, I checked the code you wrote and it works out well. I guess my problem statement was a bit unclear. Here is what I meant to say: I need a trapezoid with equal base angles and hence equal left and right side lengths. I also want the diagonals to be drawn and to be perpendicular.
– M. C.
16 hours ago
@M.C., so that is the case. If trapezium has congruent base angles soABOshould be like that. But, if you want to specify the base angles, so that is another history.
– Sigur
16 hours ago
|
show 1 more comment
I need to draw an isosceles trapezoid with perpendicular diagonals, but I am not sure where to start. Here is my code for a square with perpendicular diagonals (if it is even helpful).
begin{tikzpicture}[scale=5.5]
coordinate[label=left:$W$] (W) at (0,0);
coordinate[label=right:$X$] (X) at (1,0);
coordinate[label=:$Y$] (Y) at (1, 1);
coordinate[label=:$Z$] (Z) at (0, 1);
coordinate[label=:$O$] (O) at (0.5, 0.5);
draw (W)--(X)--(Y)--(Z)--(W)--(Y)--(Z)--(X);
draw (O) -- node[sloped] {$|$} (Y);
draw (O) -- node[sloped] {$|$} (Z);
draw (O) -- node[sloped] {$|$} (X);
draw (O) -- node[sloped] {$|$} (W);
end{tikzpicture}
Would I have to mathematically find the coordinates of one such trapezoid or is there another way to do it? All help is appreciated!
tikz-graphdrawing
New contributor
M. C. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I need to draw an isosceles trapezoid with perpendicular diagonals, but I am not sure where to start. Here is my code for a square with perpendicular diagonals (if it is even helpful).
begin{tikzpicture}[scale=5.5]
coordinate[label=left:$W$] (W) at (0,0);
coordinate[label=right:$X$] (X) at (1,0);
coordinate[label=:$Y$] (Y) at (1, 1);
coordinate[label=:$Z$] (Z) at (0, 1);
coordinate[label=:$O$] (O) at (0.5, 0.5);
draw (W)--(X)--(Y)--(Z)--(W)--(Y)--(Z)--(X);
draw (O) -- node[sloped] {$|$} (Y);
draw (O) -- node[sloped] {$|$} (Z);
draw (O) -- node[sloped] {$|$} (X);
draw (O) -- node[sloped] {$|$} (W);
end{tikzpicture}
Would I have to mathematically find the coordinates of one such trapezoid or is there another way to do it? All help is appreciated!
tikz-graphdrawing
tikz-graphdrawing
New contributor
M. C. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
M. C. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
M. C. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 17 hours ago
M. C.M. C.
514
514
New contributor
M. C. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
M. C. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
M. C. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
How would I implement it? I just learned Latex, so I am a complete beginner.
– M. C.
17 hours ago
Remember that not any such trapezium has such diagonals. You need to identify under such conditions it has.
– Sigur
16 hours ago
Observe that the diagonals determine an isosceles right triangle.
– Sigur
16 hours ago
Yes, I checked the code you wrote and it works out well. I guess my problem statement was a bit unclear. Here is what I meant to say: I need a trapezoid with equal base angles and hence equal left and right side lengths. I also want the diagonals to be drawn and to be perpendicular.
– M. C.
16 hours ago
@M.C., so that is the case. If trapezium has congruent base angles soABOshould be like that. But, if you want to specify the base angles, so that is another history.
– Sigur
16 hours ago
|
show 1 more comment
How would I implement it? I just learned Latex, so I am a complete beginner.
– M. C.
17 hours ago
Remember that not any such trapezium has such diagonals. You need to identify under such conditions it has.
– Sigur
16 hours ago
Observe that the diagonals determine an isosceles right triangle.
– Sigur
16 hours ago
Yes, I checked the code you wrote and it works out well. I guess my problem statement was a bit unclear. Here is what I meant to say: I need a trapezoid with equal base angles and hence equal left and right side lengths. I also want the diagonals to be drawn and to be perpendicular.
– M. C.
16 hours ago
@M.C., so that is the case. If trapezium has congruent base angles soABOshould be like that. But, if you want to specify the base angles, so that is another history.
– Sigur
16 hours ago
How would I implement it? I just learned Latex, so I am a complete beginner.
– M. C.
17 hours ago
How would I implement it? I just learned Latex, so I am a complete beginner.
– M. C.
17 hours ago
Remember that not any such trapezium has such diagonals. You need to identify under such conditions it has.
– Sigur
16 hours ago
Remember that not any such trapezium has such diagonals. You need to identify under such conditions it has.
– Sigur
16 hours ago
Observe that the diagonals determine an isosceles right triangle.
– Sigur
16 hours ago
Observe that the diagonals determine an isosceles right triangle.
– Sigur
16 hours ago
Yes, I checked the code you wrote and it works out well. I guess my problem statement was a bit unclear. Here is what I meant to say: I need a trapezoid with equal base angles and hence equal left and right side lengths. I also want the diagonals to be drawn and to be perpendicular.
– M. C.
16 hours ago
Yes, I checked the code you wrote and it works out well. I guess my problem statement was a bit unclear. Here is what I meant to say: I need a trapezoid with equal base angles and hence equal left and right side lengths. I also want the diagonals to be drawn and to be perpendicular.
– M. C.
16 hours ago
@M.C., so that is the case. If trapezium has congruent base angles so
ABO should be like that. But, if you want to specify the base angles, so that is another history.– Sigur
16 hours ago
@M.C., so that is the case. If trapezium has congruent base angles so
ABO should be like that. But, if you want to specify the base angles, so that is another history.– Sigur
16 hours ago
|
show 1 more comment
3 Answers
3
active
oldest
votes
Let ABXY be an isosceles trapezium with perpendicular diagonals AX and BY.
Then, the triangle AOB is isosceles and right at O (ie., the angle at O is right). So, the base angles should have 45 degrees.
Since AB and XY are parallel, to construct the trapezium it is enough to choose the lengths r_1 = OX and r_2 = OA.
If the origin of the coordinate system is O=(0,0) then the vertices can be given in polar coordinates by:
A=(-135:r_2) B=(- 45:r_2) X=( 45:r_1) Y=(135:r_1)

Below, the MWE where the commands
newcommand{radioi}{1cm}
newcommand{radioii}{2cm}
determines the radius r_1 and r_2.

MWE
documentclass[margin=2mm]{standalone}
usepackage{tikz}
begin{document}
begin{tikzpicture}[scale=2]
newcommand{radioi}{1cm}
newcommand{radioii}{2cm}
coordinate[label=below:$O$] (O) at ( 0:0 );
coordinate[label=left:$A$] (A) at (-135:radioii);
coordinate[label=right:$B$] (B) at (- 45:radioii);
coordinate[label=right:$X$] (X) at ( 45:radioi );
coordinate[label=left:$Y$] (Y) at ( 135:radioi );
draw (A) -- (B) -- (X) -- (Y) -- cycle;
draw[dashed] (A) -- (X) (B) -- (Y);
end{tikzpicture}
end{document}
add a comment |
Conceptually the same as @Sigur's nice answer but with slightly different parametrization. There are two free parameters, which can be taken to be the length of the upper edge and the height. They go into commands of the sort
draw[isosceleles trapezium=of width 2 and height 3 and name my trap];
This is illustrated in
documentclass[tikz,border=3.14mm]{standalone}
begin{document}
begin{tikzpicture}[isosceleles trapezium/.style args={of width #1 and height #2
and name #3}{insert path={
(45:{#1/sqrt(2)}) coordinate(#3-TR) -- (-45:{sqrt(#2*#2-#1*#1/2)}) coordinate(#3-BR)
-- (-135:{sqrt(#2*#2-#1*#1/2)}) coordinate(#3-BL) -- (135:{#1/sqrt(2)}) coordinate(#3-TL) -- cycle}}]
draw[isosceleles trapezium=of width 2 and height 3 and name my trap];
draw[dashed] (my trap-TL) -- (my trap-BR) (my trap-TR) -- (my trap-BL);
draw[latex-latex] ([yshift=2mm]my trap-TL) -- ([yshift=2mm]my trap-TR)
node[midway,fill=white] {$w$};
draw[latex-latex] ([xshift=-2mm]my trap-TL -| my trap-BL) --
([xshift=-2mm]my trap-BL) node[midway,fill=white] {$h$};
begin{scope}[xshift=6cm,rotate=30]
draw[isosceleles trapezium=of width 1 and height 2.5 and name another trap];
draw[dashed] (another trap-TL) -- (another trap-BR) (another trap-TR) -- (another trap-BL);
end{scope}
end{tikzpicture}
end{document}

So the first parameter is w and the second one h. In addition, there is the name which is used to name the corners such that you can draw the diagonals, say. And of course you can rotate the thing and so on.
Very interesting.
– Sigur
16 hours ago
@Sigur I'll be happy to remove my answer.
– marmot
16 hours ago
Why? It is elegant and advanced for beginners. Good exercise to study the code.
– Sigur
15 hours ago
@Sigur Conceptually it is the same as your nice post. I slightly modified the parametrization to make my answer, which came later, not completely pointless.
– marmot
15 hours ago
You can define the polar command using as two arguments the length of semi-diagonals, as we did before. The computation is simpler and no tan and sqrt needed. Anyway, nice constructions.
– Sigur
14 hours ago
|
show 2 more comments
A PSTricks solution just for fun purposes.
documentclass[pstricks,12pt]{standalone}
usepackage{pst-eucl}
begin{document}
foreach a in {0,10,...,350}{%
pspicture(-7,-7)(7,7)
pstGeonode(0,0){O}(2;a){A}([offset=6]{A}O){B}
pstRotation[RotAngle=-90]{O}{A}[D]
pstRotation[RotAngle=90]{O}{B}[C]
psline(A)(B)(C)(D)(A)(C)(D)(B)
endpspicture}
end{document}

Algorithm
- Define two points
OandA. - Define point
Bsuch thatOAis perpendicular toOB. - Define
Cas the image of rotating pointBaboutOcounter-clockwise. - Define
Das the image of rotating pointAaboutOclockwise. - Draw the lines.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
M. C. is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469599%2fdrawing-an-isosceles-trapezoid-with-perpendicular-diagonals%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Let ABXY be an isosceles trapezium with perpendicular diagonals AX and BY.
Then, the triangle AOB is isosceles and right at O (ie., the angle at O is right). So, the base angles should have 45 degrees.
Since AB and XY are parallel, to construct the trapezium it is enough to choose the lengths r_1 = OX and r_2 = OA.
If the origin of the coordinate system is O=(0,0) then the vertices can be given in polar coordinates by:
A=(-135:r_2) B=(- 45:r_2) X=( 45:r_1) Y=(135:r_1)

Below, the MWE where the commands
newcommand{radioi}{1cm}
newcommand{radioii}{2cm}
determines the radius r_1 and r_2.

MWE
documentclass[margin=2mm]{standalone}
usepackage{tikz}
begin{document}
begin{tikzpicture}[scale=2]
newcommand{radioi}{1cm}
newcommand{radioii}{2cm}
coordinate[label=below:$O$] (O) at ( 0:0 );
coordinate[label=left:$A$] (A) at (-135:radioii);
coordinate[label=right:$B$] (B) at (- 45:radioii);
coordinate[label=right:$X$] (X) at ( 45:radioi );
coordinate[label=left:$Y$] (Y) at ( 135:radioi );
draw (A) -- (B) -- (X) -- (Y) -- cycle;
draw[dashed] (A) -- (X) (B) -- (Y);
end{tikzpicture}
end{document}
add a comment |
Let ABXY be an isosceles trapezium with perpendicular diagonals AX and BY.
Then, the triangle AOB is isosceles and right at O (ie., the angle at O is right). So, the base angles should have 45 degrees.
Since AB and XY are parallel, to construct the trapezium it is enough to choose the lengths r_1 = OX and r_2 = OA.
If the origin of the coordinate system is O=(0,0) then the vertices can be given in polar coordinates by:
A=(-135:r_2) B=(- 45:r_2) X=( 45:r_1) Y=(135:r_1)

Below, the MWE where the commands
newcommand{radioi}{1cm}
newcommand{radioii}{2cm}
determines the radius r_1 and r_2.

MWE
documentclass[margin=2mm]{standalone}
usepackage{tikz}
begin{document}
begin{tikzpicture}[scale=2]
newcommand{radioi}{1cm}
newcommand{radioii}{2cm}
coordinate[label=below:$O$] (O) at ( 0:0 );
coordinate[label=left:$A$] (A) at (-135:radioii);
coordinate[label=right:$B$] (B) at (- 45:radioii);
coordinate[label=right:$X$] (X) at ( 45:radioi );
coordinate[label=left:$Y$] (Y) at ( 135:radioi );
draw (A) -- (B) -- (X) -- (Y) -- cycle;
draw[dashed] (A) -- (X) (B) -- (Y);
end{tikzpicture}
end{document}
add a comment |
Let ABXY be an isosceles trapezium with perpendicular diagonals AX and BY.
Then, the triangle AOB is isosceles and right at O (ie., the angle at O is right). So, the base angles should have 45 degrees.
Since AB and XY are parallel, to construct the trapezium it is enough to choose the lengths r_1 = OX and r_2 = OA.
If the origin of the coordinate system is O=(0,0) then the vertices can be given in polar coordinates by:
A=(-135:r_2) B=(- 45:r_2) X=( 45:r_1) Y=(135:r_1)

Below, the MWE where the commands
newcommand{radioi}{1cm}
newcommand{radioii}{2cm}
determines the radius r_1 and r_2.

MWE
documentclass[margin=2mm]{standalone}
usepackage{tikz}
begin{document}
begin{tikzpicture}[scale=2]
newcommand{radioi}{1cm}
newcommand{radioii}{2cm}
coordinate[label=below:$O$] (O) at ( 0:0 );
coordinate[label=left:$A$] (A) at (-135:radioii);
coordinate[label=right:$B$] (B) at (- 45:radioii);
coordinate[label=right:$X$] (X) at ( 45:radioi );
coordinate[label=left:$Y$] (Y) at ( 135:radioi );
draw (A) -- (B) -- (X) -- (Y) -- cycle;
draw[dashed] (A) -- (X) (B) -- (Y);
end{tikzpicture}
end{document}
Let ABXY be an isosceles trapezium with perpendicular diagonals AX and BY.
Then, the triangle AOB is isosceles and right at O (ie., the angle at O is right). So, the base angles should have 45 degrees.
Since AB and XY are parallel, to construct the trapezium it is enough to choose the lengths r_1 = OX and r_2 = OA.
If the origin of the coordinate system is O=(0,0) then the vertices can be given in polar coordinates by:
A=(-135:r_2) B=(- 45:r_2) X=( 45:r_1) Y=(135:r_1)

Below, the MWE where the commands
newcommand{radioi}{1cm}
newcommand{radioii}{2cm}
determines the radius r_1 and r_2.

MWE
documentclass[margin=2mm]{standalone}
usepackage{tikz}
begin{document}
begin{tikzpicture}[scale=2]
newcommand{radioi}{1cm}
newcommand{radioii}{2cm}
coordinate[label=below:$O$] (O) at ( 0:0 );
coordinate[label=left:$A$] (A) at (-135:radioii);
coordinate[label=right:$B$] (B) at (- 45:radioii);
coordinate[label=right:$X$] (X) at ( 45:radioi );
coordinate[label=left:$Y$] (Y) at ( 135:radioi );
draw (A) -- (B) -- (X) -- (Y) -- cycle;
draw[dashed] (A) -- (X) (B) -- (Y);
end{tikzpicture}
end{document}
edited 13 hours ago
answered 16 hours ago
SigurSigur
24.4k355138
24.4k355138
add a comment |
add a comment |
Conceptually the same as @Sigur's nice answer but with slightly different parametrization. There are two free parameters, which can be taken to be the length of the upper edge and the height. They go into commands of the sort
draw[isosceleles trapezium=of width 2 and height 3 and name my trap];
This is illustrated in
documentclass[tikz,border=3.14mm]{standalone}
begin{document}
begin{tikzpicture}[isosceleles trapezium/.style args={of width #1 and height #2
and name #3}{insert path={
(45:{#1/sqrt(2)}) coordinate(#3-TR) -- (-45:{sqrt(#2*#2-#1*#1/2)}) coordinate(#3-BR)
-- (-135:{sqrt(#2*#2-#1*#1/2)}) coordinate(#3-BL) -- (135:{#1/sqrt(2)}) coordinate(#3-TL) -- cycle}}]
draw[isosceleles trapezium=of width 2 and height 3 and name my trap];
draw[dashed] (my trap-TL) -- (my trap-BR) (my trap-TR) -- (my trap-BL);
draw[latex-latex] ([yshift=2mm]my trap-TL) -- ([yshift=2mm]my trap-TR)
node[midway,fill=white] {$w$};
draw[latex-latex] ([xshift=-2mm]my trap-TL -| my trap-BL) --
([xshift=-2mm]my trap-BL) node[midway,fill=white] {$h$};
begin{scope}[xshift=6cm,rotate=30]
draw[isosceleles trapezium=of width 1 and height 2.5 and name another trap];
draw[dashed] (another trap-TL) -- (another trap-BR) (another trap-TR) -- (another trap-BL);
end{scope}
end{tikzpicture}
end{document}

So the first parameter is w and the second one h. In addition, there is the name which is used to name the corners such that you can draw the diagonals, say. And of course you can rotate the thing and so on.
Very interesting.
– Sigur
16 hours ago
@Sigur I'll be happy to remove my answer.
– marmot
16 hours ago
Why? It is elegant and advanced for beginners. Good exercise to study the code.
– Sigur
15 hours ago
@Sigur Conceptually it is the same as your nice post. I slightly modified the parametrization to make my answer, which came later, not completely pointless.
– marmot
15 hours ago
You can define the polar command using as two arguments the length of semi-diagonals, as we did before. The computation is simpler and no tan and sqrt needed. Anyway, nice constructions.
– Sigur
14 hours ago
|
show 2 more comments
Conceptually the same as @Sigur's nice answer but with slightly different parametrization. There are two free parameters, which can be taken to be the length of the upper edge and the height. They go into commands of the sort
draw[isosceleles trapezium=of width 2 and height 3 and name my trap];
This is illustrated in
documentclass[tikz,border=3.14mm]{standalone}
begin{document}
begin{tikzpicture}[isosceleles trapezium/.style args={of width #1 and height #2
and name #3}{insert path={
(45:{#1/sqrt(2)}) coordinate(#3-TR) -- (-45:{sqrt(#2*#2-#1*#1/2)}) coordinate(#3-BR)
-- (-135:{sqrt(#2*#2-#1*#1/2)}) coordinate(#3-BL) -- (135:{#1/sqrt(2)}) coordinate(#3-TL) -- cycle}}]
draw[isosceleles trapezium=of width 2 and height 3 and name my trap];
draw[dashed] (my trap-TL) -- (my trap-BR) (my trap-TR) -- (my trap-BL);
draw[latex-latex] ([yshift=2mm]my trap-TL) -- ([yshift=2mm]my trap-TR)
node[midway,fill=white] {$w$};
draw[latex-latex] ([xshift=-2mm]my trap-TL -| my trap-BL) --
([xshift=-2mm]my trap-BL) node[midway,fill=white] {$h$};
begin{scope}[xshift=6cm,rotate=30]
draw[isosceleles trapezium=of width 1 and height 2.5 and name another trap];
draw[dashed] (another trap-TL) -- (another trap-BR) (another trap-TR) -- (another trap-BL);
end{scope}
end{tikzpicture}
end{document}

So the first parameter is w and the second one h. In addition, there is the name which is used to name the corners such that you can draw the diagonals, say. And of course you can rotate the thing and so on.
Very interesting.
– Sigur
16 hours ago
@Sigur I'll be happy to remove my answer.
– marmot
16 hours ago
Why? It is elegant and advanced for beginners. Good exercise to study the code.
– Sigur
15 hours ago
@Sigur Conceptually it is the same as your nice post. I slightly modified the parametrization to make my answer, which came later, not completely pointless.
– marmot
15 hours ago
You can define the polar command using as two arguments the length of semi-diagonals, as we did before. The computation is simpler and no tan and sqrt needed. Anyway, nice constructions.
– Sigur
14 hours ago
|
show 2 more comments
Conceptually the same as @Sigur's nice answer but with slightly different parametrization. There are two free parameters, which can be taken to be the length of the upper edge and the height. They go into commands of the sort
draw[isosceleles trapezium=of width 2 and height 3 and name my trap];
This is illustrated in
documentclass[tikz,border=3.14mm]{standalone}
begin{document}
begin{tikzpicture}[isosceleles trapezium/.style args={of width #1 and height #2
and name #3}{insert path={
(45:{#1/sqrt(2)}) coordinate(#3-TR) -- (-45:{sqrt(#2*#2-#1*#1/2)}) coordinate(#3-BR)
-- (-135:{sqrt(#2*#2-#1*#1/2)}) coordinate(#3-BL) -- (135:{#1/sqrt(2)}) coordinate(#3-TL) -- cycle}}]
draw[isosceleles trapezium=of width 2 and height 3 and name my trap];
draw[dashed] (my trap-TL) -- (my trap-BR) (my trap-TR) -- (my trap-BL);
draw[latex-latex] ([yshift=2mm]my trap-TL) -- ([yshift=2mm]my trap-TR)
node[midway,fill=white] {$w$};
draw[latex-latex] ([xshift=-2mm]my trap-TL -| my trap-BL) --
([xshift=-2mm]my trap-BL) node[midway,fill=white] {$h$};
begin{scope}[xshift=6cm,rotate=30]
draw[isosceleles trapezium=of width 1 and height 2.5 and name another trap];
draw[dashed] (another trap-TL) -- (another trap-BR) (another trap-TR) -- (another trap-BL);
end{scope}
end{tikzpicture}
end{document}

So the first parameter is w and the second one h. In addition, there is the name which is used to name the corners such that you can draw the diagonals, say. And of course you can rotate the thing and so on.
Conceptually the same as @Sigur's nice answer but with slightly different parametrization. There are two free parameters, which can be taken to be the length of the upper edge and the height. They go into commands of the sort
draw[isosceleles trapezium=of width 2 and height 3 and name my trap];
This is illustrated in
documentclass[tikz,border=3.14mm]{standalone}
begin{document}
begin{tikzpicture}[isosceleles trapezium/.style args={of width #1 and height #2
and name #3}{insert path={
(45:{#1/sqrt(2)}) coordinate(#3-TR) -- (-45:{sqrt(#2*#2-#1*#1/2)}) coordinate(#3-BR)
-- (-135:{sqrt(#2*#2-#1*#1/2)}) coordinate(#3-BL) -- (135:{#1/sqrt(2)}) coordinate(#3-TL) -- cycle}}]
draw[isosceleles trapezium=of width 2 and height 3 and name my trap];
draw[dashed] (my trap-TL) -- (my trap-BR) (my trap-TR) -- (my trap-BL);
draw[latex-latex] ([yshift=2mm]my trap-TL) -- ([yshift=2mm]my trap-TR)
node[midway,fill=white] {$w$};
draw[latex-latex] ([xshift=-2mm]my trap-TL -| my trap-BL) --
([xshift=-2mm]my trap-BL) node[midway,fill=white] {$h$};
begin{scope}[xshift=6cm,rotate=30]
draw[isosceleles trapezium=of width 1 and height 2.5 and name another trap];
draw[dashed] (another trap-TL) -- (another trap-BR) (another trap-TR) -- (another trap-BL);
end{scope}
end{tikzpicture}
end{document}

So the first parameter is w and the second one h. In addition, there is the name which is used to name the corners such that you can draw the diagonals, say. And of course you can rotate the thing and so on.
edited 13 hours ago
answered 16 hours ago
marmotmarmot
90.4k4104195
90.4k4104195
Very interesting.
– Sigur
16 hours ago
@Sigur I'll be happy to remove my answer.
– marmot
16 hours ago
Why? It is elegant and advanced for beginners. Good exercise to study the code.
– Sigur
15 hours ago
@Sigur Conceptually it is the same as your nice post. I slightly modified the parametrization to make my answer, which came later, not completely pointless.
– marmot
15 hours ago
You can define the polar command using as two arguments the length of semi-diagonals, as we did before. The computation is simpler and no tan and sqrt needed. Anyway, nice constructions.
– Sigur
14 hours ago
|
show 2 more comments
Very interesting.
– Sigur
16 hours ago
@Sigur I'll be happy to remove my answer.
– marmot
16 hours ago
Why? It is elegant and advanced for beginners. Good exercise to study the code.
– Sigur
15 hours ago
@Sigur Conceptually it is the same as your nice post. I slightly modified the parametrization to make my answer, which came later, not completely pointless.
– marmot
15 hours ago
You can define the polar command using as two arguments the length of semi-diagonals, as we did before. The computation is simpler and no tan and sqrt needed. Anyway, nice constructions.
– Sigur
14 hours ago
Very interesting.
– Sigur
16 hours ago
Very interesting.
– Sigur
16 hours ago
@Sigur I'll be happy to remove my answer.
– marmot
16 hours ago
@Sigur I'll be happy to remove my answer.
– marmot
16 hours ago
Why? It is elegant and advanced for beginners. Good exercise to study the code.
– Sigur
15 hours ago
Why? It is elegant and advanced for beginners. Good exercise to study the code.
– Sigur
15 hours ago
@Sigur Conceptually it is the same as your nice post. I slightly modified the parametrization to make my answer, which came later, not completely pointless.
– marmot
15 hours ago
@Sigur Conceptually it is the same as your nice post. I slightly modified the parametrization to make my answer, which came later, not completely pointless.
– marmot
15 hours ago
You can define the polar command using as two arguments the length of semi-diagonals, as we did before. The computation is simpler and no tan and sqrt needed. Anyway, nice constructions.
– Sigur
14 hours ago
You can define the polar command using as two arguments the length of semi-diagonals, as we did before. The computation is simpler and no tan and sqrt needed. Anyway, nice constructions.
– Sigur
14 hours ago
|
show 2 more comments
A PSTricks solution just for fun purposes.
documentclass[pstricks,12pt]{standalone}
usepackage{pst-eucl}
begin{document}
foreach a in {0,10,...,350}{%
pspicture(-7,-7)(7,7)
pstGeonode(0,0){O}(2;a){A}([offset=6]{A}O){B}
pstRotation[RotAngle=-90]{O}{A}[D]
pstRotation[RotAngle=90]{O}{B}[C]
psline(A)(B)(C)(D)(A)(C)(D)(B)
endpspicture}
end{document}

Algorithm
- Define two points
OandA. - Define point
Bsuch thatOAis perpendicular toOB. - Define
Cas the image of rotating pointBaboutOcounter-clockwise. - Define
Das the image of rotating pointAaboutOclockwise. - Draw the lines.
add a comment |
A PSTricks solution just for fun purposes.
documentclass[pstricks,12pt]{standalone}
usepackage{pst-eucl}
begin{document}
foreach a in {0,10,...,350}{%
pspicture(-7,-7)(7,7)
pstGeonode(0,0){O}(2;a){A}([offset=6]{A}O){B}
pstRotation[RotAngle=-90]{O}{A}[D]
pstRotation[RotAngle=90]{O}{B}[C]
psline(A)(B)(C)(D)(A)(C)(D)(B)
endpspicture}
end{document}

Algorithm
- Define two points
OandA. - Define point
Bsuch thatOAis perpendicular toOB. - Define
Cas the image of rotating pointBaboutOcounter-clockwise. - Define
Das the image of rotating pointAaboutOclockwise. - Draw the lines.
add a comment |
A PSTricks solution just for fun purposes.
documentclass[pstricks,12pt]{standalone}
usepackage{pst-eucl}
begin{document}
foreach a in {0,10,...,350}{%
pspicture(-7,-7)(7,7)
pstGeonode(0,0){O}(2;a){A}([offset=6]{A}O){B}
pstRotation[RotAngle=-90]{O}{A}[D]
pstRotation[RotAngle=90]{O}{B}[C]
psline(A)(B)(C)(D)(A)(C)(D)(B)
endpspicture}
end{document}

Algorithm
- Define two points
OandA. - Define point
Bsuch thatOAis perpendicular toOB. - Define
Cas the image of rotating pointBaboutOcounter-clockwise. - Define
Das the image of rotating pointAaboutOclockwise. - Draw the lines.
A PSTricks solution just for fun purposes.
documentclass[pstricks,12pt]{standalone}
usepackage{pst-eucl}
begin{document}
foreach a in {0,10,...,350}{%
pspicture(-7,-7)(7,7)
pstGeonode(0,0){O}(2;a){A}([offset=6]{A}O){B}
pstRotation[RotAngle=-90]{O}{A}[D]
pstRotation[RotAngle=90]{O}{B}[C]
psline(A)(B)(C)(D)(A)(C)(D)(B)
endpspicture}
end{document}

Algorithm
- Define two points
OandA. - Define point
Bsuch thatOAis perpendicular toOB. - Define
Cas the image of rotating pointBaboutOcounter-clockwise. - Define
Das the image of rotating pointAaboutOclockwise. - Draw the lines.
edited 13 hours ago
answered 13 hours ago
God Must Be CrazyGod Must Be Crazy
6,05511039
6,05511039
add a comment |
add a comment |
M. C. is a new contributor. Be nice, and check out our Code of Conduct.
M. C. is a new contributor. Be nice, and check out our Code of Conduct.
M. C. is a new contributor. Be nice, and check out our Code of Conduct.
M. C. is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469599%2fdrawing-an-isosceles-trapezoid-with-perpendicular-diagonals%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
How would I implement it? I just learned Latex, so I am a complete beginner.
– M. C.
17 hours ago
Remember that not any such trapezium has such diagonals. You need to identify under such conditions it has.
– Sigur
16 hours ago
Observe that the diagonals determine an isosceles right triangle.
– Sigur
16 hours ago
Yes, I checked the code you wrote and it works out well. I guess my problem statement was a bit unclear. Here is what I meant to say: I need a trapezoid with equal base angles and hence equal left and right side lengths. I also want the diagonals to be drawn and to be perpendicular.
– M. C.
16 hours ago
@M.C., so that is the case. If trapezium has congruent base angles so
ABOshould be like that. But, if you want to specify the base angles, so that is another history.– Sigur
16 hours ago