TransWikia.com

Animate a parametric curve

TeX - LaTeX Asked by Karoline Santos on September 29, 2021

Plotei uma curva paramétrica usando o tikz, mas preciso animá-la. Mas não consigo criar a animação em cima do parâmetro. Estou usando também o pacote animate.

I plotted a parametric curve using tikz, but I need to animate it. But I can’t create the animation on top of the parameter. I am also using the animate package.

One Answer

A PSTricks solution only for either fun or comparison purpose.

Compile the following code with latex twice (2 times) followed by dvips and then ps2pdf. You will see a beautiful shape that will change your life.

documentclass[border=1cm]{standalone}
usepackage{animate}
usepackage{pst-plot}
usepackage[nomessages]{fp}

FPevalDelta{round(2*pi/30:1)}

defx(#1){sin(#1)^3}
defy(#1){(13*cos(#1)-5*cos(2*#1)-2*cos(3*#1)-cos(4*#1))/16}

psset{algebraic,plotpoints=100}

begin{document}
begin{animateinline}[controls,autoplay,loop]{10}
multiframe{31}{n=0.0+Delta}{%
begin{pspicture}(-1.5,-1.5)(1.5,1.5)
    psparametricplot[origin={0,0.15},linecolor=red]{0}{n}{x(t)|y(t)}
end{pspicture}}
end{animateinline}
end{document}

I don't show the output of the curve on purpose.

Answered by Stupid Is As Stupid Does on September 29, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP