Startpage >> Main >> PlottingParametricCurves

Plotting Parametric Curves

We describe:

  1. the cardioid, example 4.4 page 66 manual v3.20,
  2. the simple \(y=x^2\) curve,
  3. the coordinate axis.

Observe that for a straight line, like the axis, just one node gives the full segment.

The different parametric curves

download example: curves.edp or return to 2D examples

real b=1,a=1;
func real phix(real t)
{
return (a+b)*cos(t)-b*cos(t*(a+b)/b); 
}
func real phiy(real t)
{
return (a+b)*sin(t)-b*sin(t*(a+b)/b);
} 
border C(t=0,2*pi) { x=phix(t); y=phiy(t); } 
border OX(t=-.5,5){x=t;y=0;}//OX axis
border OY(t=-0.5,5){x=0;y=t;}//OY axis
border G(t=-2,2){x=t;y=t^2;}
string text="Some parametric curves";
plot(cmm=text,OX(1),OY(1),C(30),G(10),wait=1,ps="curves.eps");

return to 2D examples

Page last modified on June 27, 2018, at 03:29 PM