Carl Witty wrote: > On Mon, Mar 9, 2009 at 7:09 AM, Jason Grout <jason-s...@creativetrax.com> > wrote: > >> I've noticed on this and several other interacts I've done where the >> tangent plane looks ugly because right around the point of tangency, >> jmol apparently gets confused with the two surfaces. >> >> Is this numerical error? Is there anything we can do to fix it or at >> least make it better? >> > > In computer graphics, this is known as "Z-fighting". You can do a > google search to see lots of discussion of the problem. > > > There's no really satisfying solution in general, although there are > lots of things that can help in special cases. > > For this special case of drawing tangent planes, the first thing I > would try is to manually (in your interact) shift the tangent plane so > that it's not actually tangent, but sits 0.01 units (say) off the > surface. Hopefully this will fix the problem. >
I did that in one situation, but I still had a circle of Z-fighting (thought it was smaller). I like the term z-fighting. > Of course, this is easier said than done... to make this work with > arbitrary functions, you would ideally compute the local curvature to > decide which direction to shift the tangent. (And if the function is > saddle-shaped, there's no way to shift the plane and still look > correct.) > Yet somehow, Mathematica and I believe Mayavi still are able to display something that looks nice, i.e., isn't flickering as you rotate it, doesn't have what looks like a gaping hole where the two surfaces are close to each other, etc. I was thinking that maybe this was also related, or at least aggravated, by us rescaling graphics to fit inside of a predetermined cube (I think that's what is being done), combined with jmol not computing with enough precision, perhaps. Thoughts? Jason --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sage-edu" group. To post to this group, send email to sage-edu@googlegroups.com To unsubscribe from this group, send email to sage-edu+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-edu?hl=en -~----------~----~----~----~------~----~------~--~---