On Wed, 15 May 2002 15:17:09 -0400
Gosse Michel <michel.gosse@ac-poitiers.fr> wrote:
> Hello
>
> Is it possible to plot a parametric curve with maxima, for example :
> x(t)=sin(t)
> y(t)=t+cos(t)
> for 0<t<7 ?
>
Here is an old answer of Bill Shelter to the
same question. Worked on last releases of Bill
(last 5.6 or so).
Best regards
>From wfs@math.utexas.edu Wed Jun 6 10:13:19 2001
From: William Schelter
Date: Wed, 6 Jun 2001 04:13:19 -0500
Subject: Parametric plots
Pedro writes:>
I think Maxima should have an easy method for plotting para-
metric curves and surfaces..., like
parametricplot2d([3*cosh(t),3*sinh(t)],[t,-2,2]);
I have added a 2d parametric plot. I believe I added the 3d one a couple
of years ago, and I am not sure why I did not do a 2d one..
For plot3d for example doing a moebius band:
plot3d([cos(x)*(3+y*cos(x/2)),
sin(x)*(3+y*cos(x/2)),y*sin(x/2)],
[x,-%pi,%pi],[y,-1,1],['grid,50,15]);
thus the first argument is a list of 3 functions, in the parametric case.
For plot2d, since the argument could already be a list of functions (meaning
plot them all simultaneously on the same window), I added parametric expressions:
things like
[parametric,cos(t),sin(t),[t,-5,5]]
which would mean the unit circle.
(C1) plot2d([parametric,cos(t),sin(t),[t,-%pi*2,%pi*2]]);
(C2) plot2d([parametric,cos(t),sin(t),[t,-%pi*2,%pi*2],
[nticks,8]]);
(C3) plot2d([x^3+2,[parametric,cos(t),sin(t),[t,-5,5]]],
[x,-3,3]);
- Function: PLOT2D (expr,range,...,options,..)
- Function: PLOT2D ([expr1,expr2,..,exprn],xrange,...,options,..)
- Function: PLOT2D (parametric_expr)
- Function: PLOT2D ([..,expr,..,parametric_expr,..],xrange,...,options)
are the possibilities, so you can plot several parametric expressions.
william
[these things are in the cvs, you need
src/plot.lisp src/max_ext.lisp info/Plotting.texi
and I also had to change the gcl function info mechanism slightly (1 character
change) to handle the 'describe' of multiple line info entries like the above.. see
gcl/o/info.lsp
--
Daniel Duparc <daniel.duparc@free.fr>
29 av. de la Commune de Paris
94400 Vitry sur Seine (France)