1 | initial version |
Try this:
someTriangle = parametric_plot3d(t*(1-s)*v + s*w, (t,0,1), (s,0,1))
In general, if you want t
to be in the interval [a(s), b(s)]
, just use t' = a(s) + t*(b(s) - a(s))
and let t
range from 0 to 1. For example, to graph the function f(s,t) = 1
for s
in [0,1]
and t
in [s^2, s]
:
sage: var('s,t')
(s, t)
sage: parametric_plot3d([s,(s^2 + t*(s - s^2)),1], (t,0,1), (s,0,1))
And here's a more complicated example:
sage: var('s,t,x,y')
(s, t, x, y)
sage: f = sin(x)*cos(y)
sage: tprime = s^2 + t*(s - s^2)
The rectangular plot:
sage: parametric_plot3d([s,t,f(x=s,y=t)], (t,0,1), (s,0,1))
Change coordinates to plot only a part of the t range:
sage: parametric_plot3d([s,tprime,f(x=s,y=tprime)], (t,0,1), (s,0,1))