<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>Problem With texture mapping</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Hi all,<BR>
<BR>
I am trying to map an image on to a cylinder. This is the code i have written in tcl.<BR>
<BR>
package require vtk<BR>
<BR>
vtkCylinderSource cyl<BR>
cyl SetResolution 30<BR>
cyl SetRadius 6<BR>
cyl SetHeight 15<BR>
cyl CappingOn<BR>
cyl SetCenter 0 0 0<BR>
<BR>
vtkDataSetMapper mapper<BR>
mapper SetInputConnection [cyl GetOutputPort]<BR>
<BR>
<BR>
vtkJPEGReader jpgReader<BR>
jpgReader SetFileName "C:\\Data\\image.jpg"<BR>
vtkTexture atext<BR>
atext SetInputConnection [jpgReader GetOutputPort]<BR>
atext InterpolateOn<BR>
vtkActor triangulation<BR>
triangulation SetMapper mapper<BR>
triangulation SetTexture atext<BR>
<BR>
vtkRenderer ren1<BR>
vtkRenderWindow renWin<BR>
renWin AddRenderer ren1<BR>
vtkRenderWindowInteractor iren<BR>
iren SetRenderWindow renWin<BR>
<BR>
ren1 AddActor triangulation<BR>
ren1 SetBackground 1 1 1<BR>
renWin SetSize 640 240<BR>
renWin Render<BR>
<BR>
renWin Render<BR>
wm withdraw .<BR>
<BR>
The problem is that the image is being mapped on the cylinder twice, One being the mirror image of the other.<BR>
If there is some word printed on the image then in the cylinder, the word is being printed normally and apart from that there<BR>
is a mirror image of the word too. The original image is being mapped onto half the cylinder with the mirror image being mapped<BR>
on the other half.<BR>
<BR>
I want just 1 image to be fully mapped on to the cylinder. Can someone please help.<BR>
<BR>
Thanks in advance,<BR>
<BR>
Vinay L<BR>
<BR>
<BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>