如何在具有角度约束的直线上创建点?

时间:2021-05-19 16:58:02

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?

我想在线AC上定义一个点(节点)D,使得角度ABC等于角度CDE。如何使用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}

如何在具有角度约束的直线上创建点?

2 个解决方案

#1


3  

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}

如何在具有角度约束的直线上创建点?

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

要查看构造,只需删除三个[PointSymbol = none,PointName = none]并取消注释pspicture中的最后三行。

#2


1  

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.

只是为了比较,任何与pst-eucl语法和文档搏斗的人都可能想在Metapost中尝试这种类型的东西,使用线性变量的优雅隐式定义。

如何在具有角度约束的直线上创建点?

\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


3  

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}

如何在具有角度约束的直线上创建点?

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

要查看构造,只需删除三个[PointSymbol = none,PointName = none]并取消注释pspicture中的最后三行。

#2


1  

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.

只是为了比较,任何与pst-eucl语法和文档搏斗的人都可能想在Metapost中尝试这种类型的东西,使用线性变量的优雅隐式定义。

如何在具有角度约束的直线上创建点?

\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}