I have a complete working VTK 5.0.3/C++ application that includes these lines:<br><br> vtkTextureMapToSphere *textureMapper = vtkTextureMapToSphere::New();<br> textureMapper->SetInput(globeOverlay->GetOutput());<br> textureMapper->PreventSeamOff(); <br><br>The application displays a rotating 3D globe with earth geography mapped from an 2D image to a 2D texture. The 2D image is rectangular and linear in X and Y with the prime meridian in the center, 180 longitude on the right edge, and, -180 longitude on the left edge. From vtkTransformTextureCoords I use<br><br> ->AddPosition(0.5,0.0,0.0) <br> ->FlipROn()<br><br>My application does exactly what it is supposed to do except that the prime meridian is a jumbled narrow band of colors and there is a visible seam in the Pacific at 180.<br><br>If I change only this line:<br><br> textureMapper->PreventSeamOn();
<br><br>the prime meridan closes, but the entire geography is compressed and duplicated in both the eastern and western hemispheres.<br><br>No amount of experimenting with vtkTransformTextureCoords scaling, positioning, and flipping has restored the correct geography.<br><br>I'm beginning to believe that this code from vtkTextureMapToSphere.cxx is causing the problem, but it looks logical. What am I missing?<br><br> if ( this->PreventSeam )<br> {<br> tc[0] = thetaX / vtkMath::Pi();<br> }<br> else<br> {<br> tc[0] = thetaX / (2.0*vtkMath::Pi());<br> if ( thetaY < 0.0 )<br> {<br> tc[0] = 1.0 - tc[0];<br>
}<br> }<br><br> <br><BR><BR><p> 
<hr size=1>Moody friends. Drama queens. Your life? Nope! - their life, your story.<br> <a href="http://us.rd.yahoo.com/evt=48224/*http://sims.yahoo.com/">Play Sims Stories at Yahoo! Games. </a>