Search code examples
maximawxmaxima

How to plot a path from equations of motion of a point in wxMaxima?


I have the following equations of motion of a point:

x:3*sin(4*t);
y:2*cos(4*t);

I already created a vector:

r:[x,y];

and did some operations but I don't know how to plot the path (the result should be an ellipse).

I tried various commands and only this gave me something similar to what I want to achieve:

load(draw);
draw2d(parametric(x,y,t,0,10));

But the result is strange:

enter image description here

Is there a way to get a proper plot in form of an ellipse in wxMaxima in this case?


Solution

  • Looks like draw2d(parametric(...)) is not applying adaptive subdivision to get a smoother plot; it's just sampling from a fixed grid. You can say draw2d(nticks = <large number>, parametric(...)) to get a somewhat smoother plot, but the problem doesn't go away.

    Try plot2d([parametric, x, y, [t, 0, 10]]) -- I find that gives a nice smooth plot.