alecjacobson / computer-graphics-kinematics

Computer Graphics Assignment about Kinematics
94 stars 32 forks source link

How to check each function's correctness? #5

Closed RioAraki closed 6 years ago

RioAraki commented 6 years ago

Hey, in most previous assignments we can check the output after we have finished every or at least several functions. This time I noticed that this kind of intermediate output is not being provided. Right now I have finished some files but I am unable to tell if I did this correctly ( it compiled, but I may misinterpret some math equations or have other kind of issues) and I can see how hard it would be to debug or separate the problem if we can only see result after finish everything. Thus, I am wondering if there is some plausible way to check each function's correctness?

alecjacobson commented 6 years ago

What have you tried so far?

RioAraki commented 6 years ago

I have finished src/catmull_rom_interpolation.cpp and all files before (4/10), so take catmull_rom_interpolation as an example, it would be great if we can have some sample input keyframes in data type of time and rotations and some query times. By given the answer we could find if our implementation is right or not. Maybe something like this .. I mean it is a fair game since when working research or jobs no answer would not be given, but previous assignments have these and its really handy cuz it let you know you are on the right track.

lcapacitor commented 6 years ago

I agree. Also, is there a feasible way to check if the Jacobian matrix is correctly calculated?

alecjacobson commented 6 years ago

Have you tried creating this test data?

RioAraki commented 6 years ago

Not really, it is a good idea to do so after finishing all functions and begin the testing

alecjacobson commented 6 years ago

I would do it as you write the funcntions. Rather than at the end.

On Sun, Nov 18, 2018 at 11:38 RioAraki notifications@github.com wrote:

Not really, it is a good idea to do so after finishing all functions and begin the testing

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/alecjacobson/computer-graphics-kinematics/issues/5#issuecomment-439706335, or mute the thread https://github.com/notifications/unsubscribe-auth/ACI0mTA0-1giyc9uA6GtBNv4D0DXL3W8ks5uwY0PgaJpZM4YnvXc .

lcapacitor commented 6 years ago

Sorry, so what test data we need to create?

RioAraki commented 6 years ago

True, that's a standard test-driven programming process would do.