Hi folk,

I may be missing something here, but when I tried to plot 0 = x^2 +
y^2 - z^2 I received an error:

*** begin Sage session ***

sage: var("x,y,z");
sage: f = x^2 + y^2 - z^2
sage: plot3d(f == 0, (x,-4,4), (y,-4,4), (z,-4,4));
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (4, 0))

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/mvngu/.sage/temp/sage.math.washington.edu/32198/_home_mvngu__sage_init_sage_0.py
in <module>()

/usr/local/sage/local/lib/python2.5/site-packages/sage/plot/plot3d/plot3d.pyc
in plot3d(f, urange, vrange, adaptive, **kwds)
    191
    192     if adaptive:
--> 193         P = plot3d_adaptive(f, urange, vrange, **kwds)
    194     else:
    195         P = parametric_plot3d.parametric_plot3d(w, urange,
vrange, **kwds)

/usr/local/sage/local/lib/python2.5/site-packages/sage/plot/plot3d/plot3d.pyc
in plot3d_adaptive(f, x_range, y_range, color, grad_f, max_bend,
max_depth, initial_depth, num_colors, **kwds)
    284     plot = TrianglePlot(factory, g, (xmin, xmax), (ymin,
ymax), g = grad_f,
    285                         min_depth=initial_depth, max_depth=max_depth,
--> 286                         max_bend=max_bend, num_colors = None)
    287
    288     P = IndexFaceSet(plot._objects)

/usr/local/sage/local/lib/python2.5/site-packages/sage/plot/tri_plot.pyc
in __init__(self, triangle_factory, f, (min_x, max_x), (min_y, max_y),
g, min_depth, max_depth, num_colors, max_bend)
    133         mid_x = (min_x + max_x)/2
    134         mid_y = (min_y + max_y)/2
--> 135         sw_z = fcn(min_x,min_y)
    136         nw_z = fcn(min_x,max_y)
    137         se_z = fcn(max_x,min_y)

/usr/local/sage/local/lib/python2.5/site-packages/sage/plot/tri_plot.pyc
in fcn(x, y)
    122         if g is None:
    123             def fcn(x,y):
--> 124                 return [self._f(x,y)]
    125         else:
    126             def fcn(x,y):

/usr/local/sage/local/lib/python2.5/site-packages/sage/plot/plot3d/plot3d.pyc
in g(xx, yy)
    247         y, ymin, ymax = y_range
    248         def g(xx,yy):
--> 249             return float(f.subs({x:xx, y:yy}))
    250
    251     else:

TypeError: float() argument must be a string or a number

*** end Sage session ***


What I'm trying to do is generate various 3-D plots of some affine
varieties. As a start, I have no idea how to plot the equation:

x^2 + y^2 - z^2 = 0

But for the equation

z^3 - zx^2 + y^2 = 0

I know that it describes three cones meeting at a common point.

-- 
Regards
Minh Van Nguyen

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to