<br><font size=2 face="sans-serif">Hi,</font>
<br>
<br><font size=2 face="sans-serif">I am trying to do a simple carpet/Surface plot but I have been having lots of trouble. I basically have x, y and z data and I just want to warp the x-y plane by the z. I have tried about 10 different ways to do this, including the contour filter, but without success. I think my main problem is in creating the original vtkData object (in java)?</font>
<br>
<br><font size=2 face="sans-serif">At the moment I am creating a rectilineargrid with z = 0 and extracting the z plane as polyData, then setting my scalar values (a vtkFloatArray), see code below.</font>
<br>
<br><font size=2 face="sans-serif">Please help, I am tearing my hair out on this one!</font>
<br>
<br><font size=2 face="sans-serif">Richard</font>
<br>
<br>
<br><font size=2 face="sans-serif">//Set the scalars to the points</font>
<br><font size=2 face="sans-serif"> vtkPolyData vol = geoFilter.GetOutput();</font>
<br><font size=2 face="sans-serif"> </font>
<br><font size=2 face="sans-serif"> vol.GetPointData().SetScalars(scalars);</font>
<br><font size=2 face="sans-serif"> </font>
<br><font size=2 face="sans-serif"> vtkWarpScalar warp = new vtkWarpScalar();</font>
<br><font size=2 face="sans-serif"> warp.SetInput(vol);</font>
<br><font size=2 face="sans-serif"> warp.UseNormalOn();</font>
<br><font size=2 face="sans-serif"> warp.XYPlaneOff();</font>
<br><font size=2 face="sans-serif"> //warp.SetScaleFactor(0.5);</font>
<br><font size=2 face="sans-serif"> </font>
<br><font size=2 face="sans-serif"> vtkPolyDataMapper mapper = new vtkPolyDataMapper();</font>
<br><font size=2 face="sans-serif"> mapper.SetInput(warp.GetPolyDataOutput());//test</font>
<br><font size=2 face="sans-serif"> //mapper.ScalarVisibilityOff();</font>
<br><font size=2 face="sans-serif"> </font>
<br><font size=2 face="sans-serif"> </font>
<br><font size=2 face="sans-serif"> </font>
<br><font size=2 face="sans-serif"> vtkActor surfaceActor = new vtkActor();</font>
<br><font size=2 face="sans-serif"> surfaceActor.SetMapper(mapper);</font>
<br><font size=2 face="sans-serif"> surfaceActor.GetProperty().SetColor( 0.4,0.2, 0.1);<br>
<br>
This message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this message by anyone else is unauthorized and strictly prohibited. If you have received this message in error, please inform the sender immediately.<br>
<br>
TESSELLA Richard.Bridge@tessella.com<br>
__/__/__/ Tessella Support Services plc<br>
__/__/__/ 3 Vineyard Chambers, ABINGDON, OX14 3PX, England<br>
__/__/__/ Tel: (44)(0)1235-555511 Fax: (44)(0)1235-553301<br>
www.tessella.com<br>
Registered in England No. 1466429<br>
</font>