• Andrew Maclean's avatar
    Fixing the triangulation of the Parametric Surfaces. · c7b75843
    Andrew Maclean authored
    Bill Lorenson noticed that the front face of orientable surfaces was being
     displayed as a back face. This arose as a "hack" when these functions
      first implemented because the cross-product used to create the normals
       right-handed, thus the triangulation orientation was clockwise.
        Additionally there were weird triangulations in the
         and ParametricSuperToroid.
         The following three fixes have been applied:
         1) The orientation of the normals is fixed in the case of
            ordering by calculating cross(Dv,Du) instead of cross(Du,Dv).
    	   When this is done the normals point in the expected direction
    	   and the
    	      front face is rendered correctly. See:
    	      2) All the surfaces now implement anti-clockwise ordering
    	      with respect to the
    		 3) The ParametricSuperEllipsoid and ParametricSuperToroid
    		 have been reworked,
    		    now the surface is constructed as four pieces that are
    		    abutted together,
    		       this removes the triangulations resulting in weird
    		       4) In order to implement the anti-clockwise
    		       ordering in the triangulation
    		          the x, y points have had to be swapped in a few
    			  5) TestParametricFunctions.png has had to be
    			  replaced. The images for
    			     ParametricTorus, ParametricSuperEllipsoid and
    			        changed as a result of the above changes
vtkParametricConicSpiral.cxx 3.04 KB