<div class="gmail_quote">On Wed, Nov 4, 2009 at 10:33 AM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Wed, Nov 4, 2009 at 8:28 AM, Karthik Krishnan<br>
<<a href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>> wrote:<br>
> Add a third redundancy to it :-). vtkDelaunay2D.<br>
<br>
</div>I have some questions about<br>
 void vtkTextureMapToPlane::ComputeNormal(vtkDataSet *output)<br>
<br></blockquote><div><br>David:<br><br>Thanks for taking the time to look at this class.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

1) why is the input called 'output'? The only thing the function does<br>
is set this-Normal, right? 'output' is not modified as far as I can<br>
tell.<br></blockquote><div><br><br>Doesn't matter whether you call call ComputeNormal(output) or ComputeNormal(input). The filters starts off by copying the geometry and topology from the input to the output. See line 80 :<br>
<br>    output->CopyStructure( input );<br><br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2) the last line is<br>
this->Normal[2] = -1.0; // because of the formulation<br>
<br>
My normal computation will certainly not always have the z component<br>
of the normal = -1... why is this supposed to be the case?<br></blockquote><div><br>I don't think that is meant to imply that the normal vector is [0, 0, -1]. It means that the solution to the normal is the 3 component tuple after solving the linear system by kramer's rule :<br>
  [A, B, -1]<br><br>The actual normal is obtained by normalizing this vector to unit norm. That would automatically give you the solution to the z component, which need not be -1.<br><br>thx<br>--<br>karthik<br><br></div>
</div><br>