|
|
File: /sagenb/sage_install/sage-4.7.2/local/lib/python2.6/site-packages/sage/misc/decorators.py
Type: <type ‘function’>
Definition: parametric_plot(funcs, aspect_ratio=1.0, *args, **kwargs)
Docstring:
Plot a parametric curve or surface in 2d or 3d.
parametric_plot() takes two or three functions as a
list or a tuple and makes a plot with the first function giving the
x coordinates, the second function giving the y
coordinates, and the third function (if present) giving the
z coordinates.
In the 2d case, parametric_plot() is equivalent to the plot() command
with the option parametric=True. In the 3d case, parametric_plot()
is equivalent to parametric_plot3d().
See each of these functions for more help and examples.
INPUT:
- funcs - 2 or 3-tuple of functions, or a vector of dimension 2 or 3.
- other options - passed to plot() or parametric_plot3d()
EXAMPLES: We draw some 2d parametric plots. Note that the default aspect ratio
is 1, so that circles look like circles.
sage: t = var('t')
sage: parametric_plot( (cos(t), sin(t)), (t, 0, 2*pi))
sage: parametric_plot( (sin(t), sin(2*t)), (t, 0, 2*pi), color=hue(0.6) )
sage: parametric_plot((1, t), (t, 0, 4))
Note that in parametric_plot, there is only fill or no fill.
sage: parametric_plot((t, t^2), (t, -4, 4), fill = True)
A filled Hypotrochoid:
sage: parametric_plot([cos(x) + 2 * cos(x/4), sin(x) - 2 * sin(x/4)], (x,0, 8*pi), fill = True)
sage: parametric_plot( (5*cos(x), 5*sin(x), x), (x,-12, 12), plot_points=150, color="red")
sage: y=var('y')
sage: parametric_plot( (5*cos(x), x*y, cos(x*y)), (x, -4,4), (y,-4,4))
sage: t=var('t')
sage: parametric_plot( vector((sin(t), sin(2*t))), (t, 0, 2*pi), color='green')
sage: parametric_plot( vector([t, t+1, t^2]), (t, 0, 1))
TESTS:
sage: parametric_plot((x, t^2), (x, -4, 4))
Traceback (click to the left of this block for traceback)
...
File: /sagenb/sage_install/sage-4.7.2/local/lib/python2.6/site-packages/sage/misc/decorators.py
Type: <type ‘function’>
Definition: parametric_plot(funcs, aspect_ratio=1.0, *args, **kwargs)
Docstring:
Plot a parametric curve or surface in 2d or 3d.
parametric_plot() takes two or three functions as a
list or a tuple and makes a plot with the first function giving the
x coordinates, the second function giving the y
coordinates, and the third function (if present) giving the
z coordinates.
In the 2d case, parametric_plot() is equivalent to the plot() command
with the option parametric=True. In the 3d case, parametric_plot()
is equivalent to parametric_plot3d().
See each of these functions for more help and examples.
INPUT:
- funcs - 2 or 3-tuple of functions, or a vector of dimension 2 or 3.
- other options - passed to plot() or parametric_plot3d()
EXAMPLES: We draw some 2d parametric plots. Note that the default aspect ratio
is 1, so that circles look like circles.
sage: t = var('t')
sage: parametric_plot( (cos(t), sin(t)), (t, 0, 2*pi))
sage: parametric_plot( (sin(t), sin(2*t)), (t, 0, 2*pi), color=hue(0.6) )
sage: parametric_plot((1, t), (t, 0, 4))
Note that in parametric_plot, there is only fill or no fill.
sage: parametric_plot((t, t^2), (t, -4, 4), fill = True)
A filled Hypotrochoid:
sage: parametric_plot([cos(x) + 2 * cos(x/4), sin(x) - 2 * sin(x/4)], (x,0, 8*pi), fill = True)
sage: parametric_plot( (5*cos(x), 5*sin(x), x), (x,-12, 12), plot_points=150, color="red")
sage: y=var('y')
sage: parametric_plot( (5*cos(x), x*y, cos(x*y)), (x, -4,4), (y,-4,4))
sage: t=var('t')
sage: parametric_plot( vector((sin(t), sin(2*t))), (t, 0, 2*pi), color='green')
sage: parametric_plot( vector([t, t+1, t^2]), (t, 0, 1))
TESTS:
sage: parametric_plot((x, t^2), (x, -4, 4))
Traceback (most recent call last):
...
ValueError: there are more variables than variable ranges
sage: parametric_plot((1, x+t), (x, -4, 4))
Traceback (most recent call last):
...
ValueError: there are more variables than variable ranges
sage: parametric_plot((-t, x+t), (x, -4, 4))
Traceback (most recent call last):
...
ValueError: there are more variables than variable ranges
sage: parametric_plot((1, x+t, y), (x, -4, 4), (t, -4, 4))
Traceback (most recent call last):
...
ValueError: there are more variables than variable ranges
sage: parametric_plot((1, x, y), 0, 4)
Traceback (most recent call last):
...
ValueError: there are more variables than variable ranges
|