3

I want to define a point (node) D on line AC such that angle ABC equals to angle CDE. How to do this by using the easiest trick of PSTricks?

\documentclass[pstricks,border=1cm]{standalone}
\usepackage{pst-eucl}

\begin{document}
\begin{pspicture}(8,-6)
    \pstTriangle(0,-6){B}(8,-6){A}(2,0){C}
    \pstMarkAngle{A}{B}{C}{}
    \pstGeonode[PosAngle=180]([nodesep=4]{B}C){E}
\end{pspicture}
\end{document}

enter image description here

0

5 Answers 5

2

The angle between the line ED and the horizontal line is beta-alpha, the reason why we know the slope of the line.

\documentclass[pstricks,border=1cm]{standalone}
\usepackage{pst-eucl}

\begin{document}
\begin{pspicture}(8,-6)
    \pstTriangle(0,-6){B}(8,-6){A}(2,0){C}
    \pstMarkAngle{A}{B}{C}{}
    \pstGeonode[PosAngle=180]([nodesep=4]{B}C){E}%
     (! \psGetNodeCenter{A} \psGetNodeCenter{B} 
      \psGetNodeCenter{C} \psGetNodeCenter{E}
      C.y A.y sub A.x C.x sub atan /Alpha ED
      C.y B.y sub C.x B.x sub atan /Beta ED
      Beta Alpha sub abs Tan E.y add E.x 1 add exch ){D'}
    \pstInterLL{C}{A}{E}{D'}{D}
    \pstLineAB[linecolor=red]{D}{E}
    \pstMarkAngle[linecolor=red]{C}{D}{E}{}
\end{pspicture}
\end{document}

enter image description here

5

Not sure if this is the easiest. But it works.

\documentclass[pstricks,border=1cm]{standalone}
\usepackage{pst-eucl}

\begin{document}
\begin{pspicture}(8,-6)
    \pstTriangle(0,-6){B}(8,-6){A}(2,0){C}
    \pstMarkAngle{A}{B}{C}{}
    \pstGeonode[PosAngle=180]([nodesep=4]{B}C){E}
    \pstInterLC[PointSymbol=none,PointName=none]{C}{A}{C}{E}{G}{F}
    \pstTranslation[PointSymbol=none,PointName=none]{A}{B}{F}
    \pstInterLL[PointSymbol=none,PointName=none]{C}{B}{F}{F'}{D'}
    \pstInterLC{C}{A}{C}{D'}{G'}{D}
    \pstLineAB{D}{E}
    \pstMarkAngle{C}{D}{E}{}
    %\pstArcOAB[linecolor=blue]{C}{E}{A}
    %\pstLineAB{F}{F'}
    %\pstArcOAB[linecolor=blue]{C}{D'}{A}
\end{pspicture}
\end{document}

angle

To see the construction, simply remove the three [PointSymbol=none,PointName=none]’s and uncomment the last three lines within the pspicture.

2

Just for comparison, anyone wrestling with the pst-eucl syntax and documentation, might like to try this type of thing in Metapost, using the elegant implicit definition of linear variables.

enter image description here

\documentclass[border=5mm]{standalone}
\usepackage{luatex85}
\usepackage{luamplib}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}

vardef angle_mark(expr a, b, c, r) = 
    fullcircle scaled 2r 
               rotated angle (a-b)
               shifted b 
               cutafter (b--c)
enddef;

beginfig(1);
    pair A, B, C, D, E;

    A = 6 right scaled 1cm;
    B = 2 left scaled 1cm;
    C = 6 up scaled 1cm;

    E = 1/5[B,C]; % or wherever you like along B--C....

    numeric a, b, d, e;
    a = abs(B-C);
    b = abs(C-A);
    d = abs(C-E);
    a/b = e/d;  % implicitly define "e"

    D = (e/b)[C,A]; % D is then e/b along C--A...

    label.ulft("$a$", 1/2[B,C]) withcolor 2/3 blue;
    label.urt ("$b$", 1/2[A,C]) withcolor 2/3 blue;
    label.lrt ("$d$", 1/2[C,E]) withcolor 2/3 blue;
    label.llft("$e$", 1/2[C,D]) withcolor 2/3 blue;

    draw angle_mark(A, B, C, 12) withcolor 2/3 red;
    draw angle_mark(C, D, E, 12) withcolor 2/3 red;

    draw A--B--C--cycle;
    draw D--E;

    dotlabel.lrt ("$A$", A);
    dotlabel.llft("$B$", B);
    dotlabel.top ("$C$", C);
    dotlabel.urt ("$D$", D);
    dotlabel.ulft("$E$", E);

endfig;
\end{mplibcode}
\end{document}
1

My own solution.

\documentclass[pstricks,border=15pt]{standalone}
\usepackage{pst-eucl}
\begin{document}
\begin{pspicture}(6,-4)
    \pstTriangle(0,-4){B}(6,-4){A}(2,0){C}
    \pstMarkAngle{A}{B}{C}{}
    \pstGeonode[PosAngle=180]([nodesep=3]{B}C){E}
    \pstRotation[RotAngle=\pstAngleAOB{B}{A}{C},PointName=none,PointSymbol=none]{E}{C}[C']
    \pstInterLL[PosAngle=30]{A}{C}{E}{C'}{D}
    \pstMarkAngle{C}{D}{E}{}
    \ncline{E}{D}
\end{pspicture}
\end{document}

enter image description here

1

Just for fun: a TikZ solution. Notice that there is the tkz-euclide package which offers a very similar syntax as in these pstricks codes. The point of this answer, however, is just to say that in TikZ there is the calc syntax, which is, admittedly, a bit strange when one sees it for the first time. However, I would like to argue that, once one gets a bit familiar with it, it is much more powerful and universal than the other helpers that are on the market. There is no need to define a new complicated macro for every purpose, calc allows one to deal with all these things in a universal way.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\draw (0,-6) coordinate (B) -- (8,-6) coordinate (A) -- (2,0) coordinate (C)
-- cycle;
\draw let \p1=($(C)-(B)$),\p2=($(A)-(B)$),\n1={(atan2(\y1,\x1)+atan2(\y2,\x2))/2}
in (B)  ++ ({\n1}:4) coordinate (D)
(B) --  (intersection cs:first line={(A)--(C)}, second line={(B)--(D)});
\end{tikzpicture}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .