Re: Transparent surface

*To*: mathgroup at smc.vnet.net*Subject*: [mg55163] Re: Transparent surface*From*: Jon Harrop <usenet at jdh30.plus.com>*Date*: Tue, 15 Mar 2005 00:21:46 -0500 (EST)*References*: <d13jev$qmt$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

David Turner wrote: > I wish to sketch concentric spheres with Mathematica 5.1.1. I want the > outer (larger radius) sphere to be transparent. That is, I want to be > able to view the outer sphere but still see the inner sphere, as with a > Gaussian surface. I also wish to be able to control the level of > transparency. I do not want to use WireFrame[] for the outer sphere. There is no easy way to obtain transparency in Mathematica, AFAIK. Hopefully this will change when the front end starts to use OpenGL but until then you have a few easy and some not-so-easy solutions. WRI seem to slice surfaces open in order to show what is underneath. This will be far more effective if the result is animated. You could implement transparency by computing the intersections of all polygons to create a mesh and then color the polygons in the mesh according to the number of polygons underneath. Some of the built-in Mathematica functions may help with this, although I can't think how off the top of my head. You could export the scene to a ray tracer. This would allow you to introduce subtle rendering effects which would help a human to interpret what they are seeing (e.g. reflections and shadows). Finally, render using something other than Mathematica. There are tools out there which render Mathematica graphics as OpenGL. If you know a decent language and OpenGL then you could knock up such a program in a couple of hours and then easily add any custom functionality. This is the route I would take... In order to use relatively few triangles, you may also want to generate your spheres by subdividing an icosahedron. -- Dr Jon D Harrop, Flying Frog Consultancy http://www.ffconsultancy.com