Thanks<br><br><div class="gmail_quote">On Wed, Nov 4, 2009 at 11:36 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;">
On Wed, Nov 4, 2009 at 11:28 AM, Karthik Krishnan<br>
<div><div></div><div class="h5"><<a href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>> wrote:<br>
> On Wed, Nov 4, 2009 at 10:33 AM, David Doria <<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>><br>
> wrote:<br>
>><br>
>> 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>
>> I have some questions about<br>
>>  void vtkTextureMapToPlane::ComputeNormal(vtkDataSet *output)<br>
>><br>
><br>
> David:<br>
><br>
> Thanks for taking the time to look at this class.<br>
><br>
>><br>
>> 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>
><br>
><br>
> Doesn't matter whether you call call ComputeNormal(output) or<br>
> ComputeNormal(input). The filters starts off by copying the geometry and<br>
> topology from the input to the output. See line 80 :<br>
><br>
>     output->CopyStructure( input );<br>
><br>
><br>
><br>
>><br>
>> 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>
><br>
> I don't think that is meant to imply that the normal vector is [0, 0, -1].<br>
> It means that the solution to the normal is the 3 component tuple after<br>
> 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<br>
> would automatically give you the solution to the z component, which need not<br>
> be -1.<br>
><br>
> thx<br>
> --<br>
> karthik<br>
><br>
><br>
><br>
<br>
</div></div>Of course it doesn't matter what you call it - but it DOES make it<br>
more confusing :)<br>
<br>
About the -1, I didn't see the normalization taking place inside this<br>
function so I was confused, but it doesn't sound like there would be<br>
any problem. I have updated both of these classes but some of my<br>
(non-related) tests are freezing. (see my post on the users list).<br>
François is helping me looking into it - once they are working if all<br>
the tests that don't fail before my changes still pass I'll send the<br>
updated files to the list for you guys to approve.<br>
<div><div></div><div class="h5"><br>
Thanks,<br>
<br>
David<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>