<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title></title>
</head>
<body>
<blockquote type="cite">
  <pre>Jared,

        Your code seems easy to reproduce. Is it possible you send us a 
cxx/tcl/python code to reproduce this ?

Thanks
Mathieu</pre>
</blockquote>
<br>
<big>Sure thing, here you go (it's in Python)<br>
<br>
<br>
<br>
<font face="Courier New, Courier, monospace">import Numeric as N<br>
import sys<br>
from vtk import *<br>
<br>
deg2rad = N.pi / 180.0<br>
radius = 1.0<br>
th_min, th_max = 0.0, 360.0 * deg2rad<br>
ph_min, ph_max = 0.0, 180.0 * deg2rad<br>
<br>
#create the plane<br>
plane = vtkPlaneSource()<br>
plane.SetOrigin(radius, ph_max, th_min)<br>
plane.SetPoint1(radius, ph_max, th_max)<br>
plane.SetPoint2(radius, ph_min, th_min)<br>
plane.SetXResolution(36)<br>
plane.SetYResolution(18)<br>
plane.Update()<br>
<br>
#warp it into a sphere<br>
transform = vtkSphericalTransform()<br>
transform.Update()<br>
<br>
tpoly = vtkTransformPolyDataFilter()<br>
tpoly.SetInput(plane.GetOutput())<br>
tpoly.SetTransform(transform)<br>
tpoly.Update()<br>
<br>
#merge coincident points -- this is what causes<br>
#the distortion<br>
clean = vtkCleanPolyData()<br>
clean.SetInput(tpoly.GetOutput())<br>
clean.PointMergingOn()<br>
clean.SetTolerance(0.000001)<br>
<br>
#setup standard VTK pipeline<br>
mapper = vtkPolyDataMapper()<br>
mapper.SetInput(clean.GetOutput())<br>
mapper.ImmediateModeRenderingOn()<br>
mapper.Update()<br>
<br>
actor = vtkActor()<br>
actor.SetMapper(mapper)<br>
actor.PickableOn()<br>
actor.GetProperty().BackfaceCullingOn()<br>
<br>
reader = vtkPNMReader()<br>
reader.SetFileName("../../wrap/earth.ppm")<br>
<br>
texture = vtkTexture()<br>
texture.SetInput(reader.GetOutput())<br>
texture.InterpolateOn()<br>
<br>
actor.SetTexture(texture)<br>
<br>
ren = vtkRenderer()<br>
ren.AddActor(actor)<br>
<br>
win = vtkRenderWindow()<br>
win.AddRenderer(ren)<br>
win.SetSize(500, 500)<br>
<br>
iren = vtkRenderWindowInteractor()<br>
iren.SetRenderWindow(win)<br>
<br>
style = vtkInteractorStyleTrackballCamera()<br>
iren.SetInteractorStyle(style)<br>
<br>
iren.Initialize()<br>
win.Render()<br>
iren.Start()</font></big>
</body>
</html>