For example, to rotate e^x from x=0 to x=1 around the x-axis
{{{
var('u,v')
f = lambda x : e^x
a = 0
b = 1
parametric_plot3d([u,sin(v)*f(u),cos(v)*f(u)],(u,a,b),(v,0,2*pi))
}}}
The graph is what I want except that it has a gap. Apparently v
doesn't go all the way to 2*pi. For now, I have added a fudge factor
to the upper limits and that is fixing the problem. When I try to
plot additional surfaces to add end-caps to the solid, the fudge
factors cause the it to stick out of the caps.
Is there a more elegant solution (such as telling it to include the
upper end point) or at least a way to tell the exact fudge factor
required to get it to plot the last little piece as closely as
possible?
Thanks,
--
Jacob Hicks
Mathematics Teacher
Trinity Collegiate School
Hi Jacob,
The above was a bug that was fixed in a recent version
of Sage. Just install sage-2.10.1 and it should work
perfectly for you (and it should _not_ work with certain
older versions). I've attached a screenshot to illustrate
this.
William
Next up on my calculus demo list is slope fields.
Jacob
You might want to look into examples/calculus/field_plot2d.sage
or Maxima's plotdf package (which uses gnuplot)
http://maxima.sourceforge.net/docs/manual/en/maxima_67.html