Drawing an isosceles trapezoid with perpendicular diagonals

Clash Royale CLAN TAG#URR8PPP
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).
begintikzpicture[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);
endtikzpicture
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
|
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).
begintikzpicture[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);
endtikzpicture
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
How would I implement it? I just learned Latex, so I am a complete beginner.
– M. C.
Jan 10 at 18:17
Remember that not any such trapezium has such diagonals. You need to identify under such conditions it has.
– Sigur
Jan 10 at 18:24
Observe that the diagonals determine an isosceles right triangle.
– Sigur
Jan 10 at 18:26
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.
Jan 10 at 18:30
@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
Jan 10 at 19:06
|
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).
begintikzpicture[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);
endtikzpicture
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
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).
begintikzpicture[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);
endtikzpicture
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
asked Jan 10 at 18:15
M. C.M. C.
596
596
How would I implement it? I just learned Latex, so I am a complete beginner.
– M. C.
Jan 10 at 18:17
Remember that not any such trapezium has such diagonals. You need to identify under such conditions it has.
– Sigur
Jan 10 at 18:24
Observe that the diagonals determine an isosceles right triangle.
– Sigur
Jan 10 at 18:26
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.
Jan 10 at 18:30
@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
Jan 10 at 19:06
|
show 1 more comment
How would I implement it? I just learned Latex, so I am a complete beginner.
– M. C.
Jan 10 at 18:17
Remember that not any such trapezium has such diagonals. You need to identify under such conditions it has.
– Sigur
Jan 10 at 18:24
Observe that the diagonals determine an isosceles right triangle.
– Sigur
Jan 10 at 18:26
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.
Jan 10 at 18:30
@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
Jan 10 at 19:06
How would I implement it? I just learned Latex, so I am a complete beginner.
– M. C.
Jan 10 at 18:17
How would I implement it? I just learned Latex, so I am a complete beginner.
– M. C.
Jan 10 at 18:17
Remember that not any such trapezium has such diagonals. You need to identify under such conditions it has.
– Sigur
Jan 10 at 18:24
Remember that not any such trapezium has such diagonals. You need to identify under such conditions it has.
– Sigur
Jan 10 at 18:24
Observe that the diagonals determine an isosceles right triangle.
– Sigur
Jan 10 at 18:26
Observe that the diagonals determine an isosceles right triangle.
– Sigur
Jan 10 at 18:26
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.
Jan 10 at 18:30
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.
Jan 10 at 18:30
@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
Jan 10 at 19:06
@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
Jan 10 at 19:06
|
show 1 more comment
3 Answers
3
active
oldest
votes
A PSTricks solution just for fun purposes.
documentclass[pstricks,12pt]standalone
usepackagepst-eucl
begindocument
foreach a in 0,10,...,350%
pspicture(-7,-7)(7,7)
pstGeonode(0,0)O(2;a)A([offset=6]AO)B
pstRotation[RotAngle=-90]OA[D]
pstRotation[RotAngle=90]OB[C]
psline(A)(B)(C)(D)(A)(C)(D)(B)
endpspicture
enddocument

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 |
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
newcommandradioi1cm
newcommandradioii2cm
determines the radius r_1 and r_2.

MWE
documentclass[margin=2mm]standalone
usepackagetikz
begindocument
begintikzpicture[scale=2]
newcommandradioi1cm
newcommandradioii2cm
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);
endtikzpicture
enddocument
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
begindocument
begintikzpicture[isosceleles trapezium/.style args=of width #1 and height #2
and name #3insert 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$;
beginscope[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);
endscope
endtikzpicture
enddocument

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
Jan 10 at 19:07
@Sigur I'll be happy to remove my answer.
– marmot
Jan 10 at 19:21
Why? It is elegant and advanced for beginners. Good exercise to study the code.
– Sigur
Jan 10 at 19:31
@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
Jan 10 at 19:58
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
Jan 10 at 20:47
|
show 2 more comments
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
);
);
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
A PSTricks solution just for fun purposes.
documentclass[pstricks,12pt]standalone
usepackagepst-eucl
begindocument
foreach a in 0,10,...,350%
pspicture(-7,-7)(7,7)
pstGeonode(0,0)O(2;a)A([offset=6]AO)B
pstRotation[RotAngle=-90]OA[D]
pstRotation[RotAngle=90]OB[C]
psline(A)(B)(C)(D)(A)(C)(D)(B)
endpspicture
enddocument

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
usepackagepst-eucl
begindocument
foreach a in 0,10,...,350%
pspicture(-7,-7)(7,7)
pstGeonode(0,0)O(2;a)A([offset=6]AO)B
pstRotation[RotAngle=-90]OA[D]
pstRotation[RotAngle=90]OB[C]
psline(A)(B)(C)(D)(A)(C)(D)(B)
endpspicture
enddocument

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
usepackagepst-eucl
begindocument
foreach a in 0,10,...,350%
pspicture(-7,-7)(7,7)
pstGeonode(0,0)O(2;a)A([offset=6]AO)B
pstRotation[RotAngle=-90]OA[D]
pstRotation[RotAngle=90]OB[C]
psline(A)(B)(C)(D)(A)(C)(D)(B)
endpspicture
enddocument

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
usepackagepst-eucl
begindocument
foreach a in 0,10,...,350%
pspicture(-7,-7)(7,7)
pstGeonode(0,0)O(2;a)A([offset=6]AO)B
pstRotation[RotAngle=-90]OA[D]
pstRotation[RotAngle=90]OB[C]
psline(A)(B)(C)(D)(A)(C)(D)(B)
endpspicture
enddocument

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 Jan 10 at 21:48
answered Jan 10 at 21:42
Artificial StupidityArtificial Stupidity
5,21511039
5,21511039
add a comment |
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
newcommandradioi1cm
newcommandradioii2cm
determines the radius r_1 and r_2.

MWE
documentclass[margin=2mm]standalone
usepackagetikz
begindocument
begintikzpicture[scale=2]
newcommandradioi1cm
newcommandradioii2cm
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);
endtikzpicture
enddocument
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
newcommandradioi1cm
newcommandradioii2cm
determines the radius r_1 and r_2.

MWE
documentclass[margin=2mm]standalone
usepackagetikz
begindocument
begintikzpicture[scale=2]
newcommandradioi1cm
newcommandradioii2cm
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);
endtikzpicture
enddocument
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
newcommandradioi1cm
newcommandradioii2cm
determines the radius r_1 and r_2.

MWE
documentclass[margin=2mm]standalone
usepackagetikz
begindocument
begintikzpicture[scale=2]
newcommandradioi1cm
newcommandradioii2cm
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);
endtikzpicture
enddocument
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
newcommandradioi1cm
newcommandradioii2cm
determines the radius r_1 and r_2.

MWE
documentclass[margin=2mm]standalone
usepackagetikz
begindocument
begintikzpicture[scale=2]
newcommandradioi1cm
newcommandradioii2cm
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);
endtikzpicture
enddocument
edited Jan 10 at 21:28
answered Jan 10 at 18:31
SigurSigur
24.6k355138
24.6k355138
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
begindocument
begintikzpicture[isosceleles trapezium/.style args=of width #1 and height #2
and name #3insert 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$;
beginscope[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);
endscope
endtikzpicture
enddocument

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
Jan 10 at 19:07
@Sigur I'll be happy to remove my answer.
– marmot
Jan 10 at 19:21
Why? It is elegant and advanced for beginners. Good exercise to study the code.
– Sigur
Jan 10 at 19:31
@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
Jan 10 at 19:58
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
Jan 10 at 20:47
|
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
begindocument
begintikzpicture[isosceleles trapezium/.style args=of width #1 and height #2
and name #3insert 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$;
beginscope[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);
endscope
endtikzpicture
enddocument

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
Jan 10 at 19:07
@Sigur I'll be happy to remove my answer.
– marmot
Jan 10 at 19:21
Why? It is elegant and advanced for beginners. Good exercise to study the code.
– Sigur
Jan 10 at 19:31
@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
Jan 10 at 19:58
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
Jan 10 at 20:47
|
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
begindocument
begintikzpicture[isosceleles trapezium/.style args=of width #1 and height #2
and name #3insert 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$;
beginscope[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);
endscope
endtikzpicture
enddocument

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
begindocument
begintikzpicture[isosceleles trapezium/.style args=of width #1 and height #2
and name #3insert 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$;
beginscope[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);
endscope
endtikzpicture
enddocument

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 Jan 10 at 22:13
answered Jan 10 at 18:41
marmotmarmot
94.5k4109209
94.5k4109209
Very interesting.
– Sigur
Jan 10 at 19:07
@Sigur I'll be happy to remove my answer.
– marmot
Jan 10 at 19:21
Why? It is elegant and advanced for beginners. Good exercise to study the code.
– Sigur
Jan 10 at 19:31
@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
Jan 10 at 19:58
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
Jan 10 at 20:47
|
show 2 more comments
Very interesting.
– Sigur
Jan 10 at 19:07
@Sigur I'll be happy to remove my answer.
– marmot
Jan 10 at 19:21
Why? It is elegant and advanced for beginners. Good exercise to study the code.
– Sigur
Jan 10 at 19:31
@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
Jan 10 at 19:58
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
Jan 10 at 20:47
Very interesting.
– Sigur
Jan 10 at 19:07
Very interesting.
– Sigur
Jan 10 at 19:07
@Sigur I'll be happy to remove my answer.
– marmot
Jan 10 at 19:21
@Sigur I'll be happy to remove my answer.
– marmot
Jan 10 at 19:21
Why? It is elegant and advanced for beginners. Good exercise to study the code.
– Sigur
Jan 10 at 19:31
Why? It is elegant and advanced for beginners. Good exercise to study the code.
– Sigur
Jan 10 at 19:31
@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
Jan 10 at 19:58
@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
Jan 10 at 19:58
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
Jan 10 at 20:47
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
Jan 10 at 20:47
|
show 2 more comments
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.
Jan 10 at 18:17
Remember that not any such trapezium has such diagonals. You need to identify under such conditions it has.
– Sigur
Jan 10 at 18:24
Observe that the diagonals determine an isosceles right triangle.
– Sigur
Jan 10 at 18:26
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.
Jan 10 at 18:30
@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
Jan 10 at 19:06