On Wed, Dec 15, 2010 at 08:14:50PM +0000, Juha Jäykkä wrote:
> > Yes, probably. Although I cannot teel what the problem is, I know the
> > usual problems :). Quite often it helps culling out backface (or front
> > faces, depending on the orientation of your mesh) as in the following

> I found further details. This view works:

> mlab.view(45.0, numpy.arctan2(numpy.sqrt(2),1)*180/numpy.pi, 6.0)

> but this does not

> mlab.view(45.0, numpy.arctan2(numpy.sqrt(2),1)*180/numpy.pi+80, 6.0)

> The crucial point where it stops working is when the zenith angle is
> exactly 135 degrees. I.e. when camera is exactly on one of the space
> diagonals of the lattice I visualize.

OK, it's probably a problem with the frontface/backface ambiguity. VTK
precomputes what it believes is a front face or a back face. The problem
is that this depends on the position of the camera. Thus it ends up wrong
at some point.

The reason that the VTK guys don't do this on the fly, is that it makes
the scene rotation much slower, and it is not needed most often.

As a coincidence, a collegue who knows Mayavi better than me was
mentionning today that there is a filter that corrects for this by
reorienting the normals as the camera moves.

However, a quick google didn't show me the name of this filter, and I
don't have much time to spend on this, as I am trying to meet a deadline
soon.

Cheers 

        Haël

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
MayaVi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to