最速降线

最速降线

有人能帮我用 tikz 编程吗?我已经尝试了好几天都没有结果在此处输入图片描述

答案1

碰巧,这是我之前画的。蓝色的“摆线”是最速降线。

在此处输入图片描述

这是在元帖子,并包装在luamplib,因此您应该用 来编译它lualatex

\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
beginfig(1);

    path Y, L, C, P, S;

    % cycloid
    numeric r; r = 164;
    Y = origin for t=5 step 5 until 140:
        -- (0, r) rotated t shifted (t / 57.29577951308232 * r, -r)
    endfor cutafter (origin -- 4r * dir -45);

    z0 = point 0 of Y;
    z1 = point infinity of Y;

    % line
    L = z0 -- z1;  

    % circle
    C = quartercircle rotated 180 scaled 2x1 shifted (x1, y0);
    
    % parabola f = x^2, f' = 2x
    P = z0{1,-2} ... (xpart 1/2[z1, z0], ypart 1/4[z1, z0]){1,-1} ... z1 {1, 0};
    
    % sixth degree f = x^6, f' = 6x^5 
    S = z0{1,-6} ... (xpart 1/2[z1, z0], ypart 1/64[z1, z0]){1, -6/32} ... z1 {1, 0};

    % axes
    draw z0 -- (x0,y1) -- z1 withcolor 3/4;

    drawoptions(withcolor 2/3 red);         draw L; dotlabel.urt("Line", point 1/4 of L);
    drawoptions(withcolor 1/2 green);       draw C; dotlabel.urt("Circle", point 1 of C);
    drawoptions(withcolor 1/4[red, green]); draw P; dotlabel.urt("Parabola", point 1/2 of P);
    drawoptions(withcolor 3/4[red, green]); draw S; dotlabel.llft("Sixth degree", point 3/4 of S);
    drawoptions(withcolor 1/2 blue);        draw Y; dotlabel.urt("Cycloid", point 22 of Y);
    drawoptions();

    dotlabel.ulft("$A$", z0);
    dotlabel.urt("$B$", z1);

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

摆线是通过描画滚动圆的路径来绘制的。(可能有更简单的方法……)

相关内容