On Nov 4, 10:51 am, David Kirkby <david.kir...@onetel.net> wrote: > On 4 November 2010 15:46, Jason Grout <jason-s...@creativetrax.com> wrote: > > > On 11/4/10 10:43 AM, David Kirkby wrote: > > >> It looks smoother, but does not change the fundamental problem > > > I agree. I guess one way to deal with the problem is to subdivide the space > > like the implicit_plot3d function does. Another way is to use the adaptive > > plotting (which presumably slices up triangles as needed), but as you saw, > > that currently has a NaN issue that prevents it from working. > > > Thanks, > > > Jason > It might be worth adding 1.1 or somthing like that so the result is > always positive and never complex. That might avoid NAN's, but again > does not solve the problem. But it might indicate where it is. > > Dave
I wonder if the numpy functions for converting NaN numbers to numbers would be of help. see numpy.nan_to_num(). If 'nan' then 0; 'inf' (infinity) -> some really huge number http://www.scipy.org/Numpy_Example_List_With_Doc#head-c98ac710ae88aadee85e953af821e560ab316ef3 I also notice that the traceback includes these two lines of code at the end span = (len(texture)-1) / (max_z - min_z) # max to avoid dividing by 0 --> 777 parts = P.partition(lambda x,y,z: int((z- min_z)*span)) If we want to still preserve nan, there are min and max functions in numpy designed to handle nan (ie ignore nan values) Maybe those could be of use too (for min_z and max_z). -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org