[vtk-developers] Triangular patch interpolation
Lin M
majcjc at gmail.com
Mon Aug 17 22:40:46 EDT 2015
Hi Dr. Thompson,
I found you left an interface for
vtkBezierPatchAdaptro::EvaluateDeriv(double Pt[3], double* Paras, int d).
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!
Best,
Lin
On Tue, Aug 18, 2015 at 1:04 AM, David Thompson <david.thompson at kitware.com>
wrote:
> Hi Lin,
>
> > I have some questions about the test.
> > 1. About simplicial interpolation. Should I test some simple cases (hard
> coded simple shape) or some shapes like the motorcycle?
>
> Those are 2 different types of tests. (There are many; see
> http://stackoverflow.com/questions/437897/what-are-unit-testing-and-integration-testing-and-what-other-types-of-testing-s
> 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.
>
> 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.
>
> > If it is the latter one, how to convert the rectangular patch to
> simpicial patch?
> >
> > 2. About point inversion. How to test it for the simpicial patch? I only
> implemented the point inversion for NURBS patch.
>
> 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.
>
> > 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.
>
> Again, since you are using the derivatives in code that is part of an
> integration, I think unit testing (as you suggest) is enough.
>
> David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150818/59692dc4/attachment.html>
More information about the vtk-developers
mailing list