<div dir="ltr"><div>Hi Dr. Thompson,</div><div><br></div><div>I found you left an interface for vtkBezierPatchAdaptro::EvaluateDeriv(double Pt[3], double* Paras, int d).</div><div>For 1-d curve, the derivative is always a 3*1 vector, but with the parametric dimension increasing, higher order derivatives will contain many points (it becomes matrix-by-vector differential). I can't figure out a generalized way to interpret this. That's why I declared functions to compute derivative for curve, surface and volume separately. Do you have any suggestions for that? Thanks!</div><div><br></div><div>Best,</div><div>Lin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 18, 2015 at 1:04 AM, David Thompson <span dir="ltr"><<a href="mailto:david.thompson@kitware.com" target="_blank">david.thompson@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Lin,<br>
<span><br>
> I have some questions about the test.<br>
> 1. About simplicial interpolation. Should I test some simple cases (hard coded simple shape) or some shapes like the motorcycle?<br>
<br>
</span>Those are 2 different types of tests. (There are many; see <a href="http://stackoverflow.com/questions/437897/what-are-unit-testing-and-integration-testing-and-what-other-types-of-testing-s" target="_blank" rel="noreferrer">http://stackoverflow.com/questions/437897/what-are-unit-testing-and-integration-testing-and-what-other-types-of-testing-s</a> for some lists of test types). The first test (simple hard-coded shape) is a unit test and the second (test of both the reader, spline-to-patch class, and patch interpolation) is an integration test.<br>
<br>
Both are important, but since you already have an integration test for the motorcycle, I think a good set of unit tests for simplicial interpolation would be enough.<br>
<span><br>
> If it is the latter one, how to convert the rectangular patch to simpicial patch?<br>
><br>
</span>> 2. About point inversion. How to test it for the simpicial patch? I only implemented the point inversion for NURBS patch.<br>
<br>
If you didn't implement it, you can't test it. :-) However, if you know what you want the test to look like, you can write the test before you implement inversion and just leave it commented out with a note. Many people think this is how development should be done in the first place, since it forces you to consider how people will use what you write.<br>
<span><br>
> 3. About derivative computation. Should I just test them numerically? For example, given a shape and a parametric coordinate, test the result of our implementation with ground truth.<br>
<br>
</span>Again, since you are using the derivatives in code that is part of an integration, I think unit testing (as you suggest) is enough.<br>
<span class="HOEnZb"><font color="#888888"><br>
David</font></span></blockquote></div><br></div>