On Thu, 15 Sep 2011 at 06:40AM -0700, kcrisman wrote: > On Sep 15, 9:08 am, Dan Drake <dr...@kaist.edu> wrote: > > This is strange: > > > > x, y =var('x y') > > plot3d(sqrt(x^2+y^2)*sin(1/sqrt(x^2+y^2)), (x,-1/2, 1/2), (y, -1/2, 1/2), > > adaptive=True) > > > > fails with "ValueError: cannot convert float NaN to integer". Something > > goes wrong when it partitions up the domain, probably when it looks at > > the origin. Is there a way to avoid this? Is this a bug? > > Or rather, very very close to the origin. I don't have time right > now, but can you confirm that there is not a depth of recursion > keyword like there is in 2d plotting? I would call this a bug.
The docstring for plot3d has an (undocumented!) use of "initial_depth", but that didn't solve my problem. I just set plot_points=200 and that gave me something good enough; switching to cylindrical coordinates also worked, although I didn't like the look as much. Dan -- --- Dan Drake ----- http://mathsci.kaist.ac.kr/~drake -------
signature.asc
Description: Digital signature