在 ProfCollege 包中查找直线上投影点的语法是什么?

在 ProfCollege 包中查找直线上投影点的语法是什么?

我正在尝试找到A线上点的投影SC。我尝试使用语法H=ProjectionsurDroit(A,S,C);,但无法获得结果。我的代码(使用 LuaLaTex 运行)。

 \documentclass[border = 2mm]{standalone}
\usepackage{ProfCollege}
\begin{document}
\begin{Geometrie}[CoinBG={u*(-10,-10)}]
    Initialisation(70,30,20,1500);
    color A,B,C,D,S,O,H;
    A=(0,0,0);
    B=(3,0,0);
    C=(3,4,0);
    D=(0,4,0);
    S=(0,0,5);
    O=(A+C)/2;
    %H=ProjectionsurDroit(A,S,C);
    drawoptions(dashed evenly); 
    draw chemin(S,A,B);
    draw chemin(A,D);
    draw chemin(A,C);
    draw chemin(B,D);
    drawoptions(); 
    draw chemin(S,B,C,D);
    draw chemin(C,S,D);
    dotlabel.bot(btex $A$ etex,Projette(A));
    dotlabel.bot(btex $O$ etex,Projette(O));
    dotlabel.bot(btex $B$ etex,Projette(B));
    dotlabel.bot(btex $C$ etex,Projette(C)); 
    dotlabel.urt(btex $D$ etex,Projette(D));
    dotlabel.urt(btex $S$ etex,Projette(S));
\end{Geometrie}
\end{document}

在此处输入图片描述

答案1

这不是对你问题的回答。因为我H手动计算了该点的坐标。

\documentclass[border=3.14]{standalone}
\usepackage{ProfCollege}
\begin{document}
    \begin{Geometrie}[CoinBG={u*(-10,-10)}]
        Initialisation(70,30,20,1500);
        color A,B,C,D,S,O,H;
        a=3;
        b=5;
        h=7;
        A=(0,0,0);
        B=(a,0,0);
        C=(a,b,0);
        D=(0,b,0);
        S=(0,0,h);
        O=(A+C)/2;
        H=(h*h*a/(a*a + b*b + h*h), h*h*b/(a*a + b*b + h*h), h*(a*a + b*b)/(a*a + b*b + h*h));
    trace codeperp(Projette(S),Projette(H),Projette(A),5);
drawoptions(dashed evenly); 
draw chemin(S,A,B);
    draw chemin(A,D);
    draw chemin(A,C);
    draw chemin(B,D);
    draw chemin(A,H);
    drawoptions(); 
    draw chemin(S,B,C,D);
    draw chemin(C,S,D);
        dotlabel.bot(btex $A$ etex,Projette(A));
        dotlabel.bot(btex $O$ etex,Projette(O));
        dotlabel.bot(btex $B$ etex,Projette(B));
        dotlabel.bot(btex $C$ etex,Projette(C)); 
            dotlabel.urt(btex $D$ etex,Projette(D));
    dotlabel.urt(btex $S$ etex,Projette(S));
            dotlabel.urt(btex $H$ etex,Projette(H));    
        \end{Geometrie}
\end{document}

在此处输入图片描述

您可以使用3d工具,此工具具有用于查找直线上投影点的语法。在此代码中,我H通过Maple 查找3dtoolsK

\documentclass[tikz,border=3mm]{standalone} 
\usetikzlibrary{3dtools} % https://github.com/marmotghost/tikz-3dtools
\begin{document}
    \begin{tikzpicture}[line cap=butt,
        line join=round,declare function={a=13;b=17;h=19;},c/.style={circle,fill,inner sep=1pt},3d/install view={phi=120,psi=0,theta=70}]
            \path
            (0,0,0) coordinate (A)
            (a,0,0)  coordinate (B)
            (a,b,0) coordinate (C)
            (0,b,0) coordinate (D)
            (0,0,h) coordinate (S)
            ({h^2*a/(a^2 + b^2 + h^2)}, {h^2*b/(a^2 + b^2 + h^2)}, {h*(a^2 + b^2)/(a^2 + b^2 + h^2)}) coordinate (K);
            %found by Maple
        \path[3d/line through={(S) and (C) named lSC}];
        \path[3d/project={(A) on lSC}] coordinate (H);
        \draw[3d/visible] (S) --  (B)-- (C) -- (D) -- cycle (S) -- (C);
        \draw[3d/hidden] (S) -- (A) (B)-- (A) -- (D) (A) -- (H);
        \path foreach \p/\g in {A/180,B/-90,C/-90,S/90,D/-90,H/0,K/180}{(\p)node[c]{}+(\g:2.5mm) node{$\p$}};   
        \end{tikzpicture}  
    \end{document}

在此处输入图片描述

相关内容