John Ratcliff's Code Suppository

A place where I insert my code into the anus of the Internet.

 

Friday, November 28, 2008

CodeSuppository.exe : A Graphics/Demo framework for the Code Suppository Code Snippets



As promised, here is a new demo framework called 'CodeSuppository.exe'

This framework provides a graphical demonstration of various code snippets on this site.  The project installs to \Program Files\CodeSuppository

The source file \Program Files\CodeSuppository\app\CodeSuppository\CodeSuppository.cpp  is specifically designed to visually demonstrate the usage of various code snippets.  This initial release only demonstrates explicitely two snippets.  The best fit OBB routine and the best fit plane.

Over time I will revise this to include more and more demos.

---------Note: I just re-uploaded the code, and I also improved the OBB fitting algorithm.  It now uses the best fit plane technique to derive a rotation matrix to fit the point cloud and then only rotates the points on a single axis of rotation to converge to the best fit solution.  


5 Comments:

  • At 12:56 PM, Blogger guardian said…

    Welcome to the wonderful world of Windows manifest files :(

    Runtime Error!

    Program: C:\...

    R6034
    An application has made an attempt to load the C runtime library incorrectly.
    Please contact the application's support team for more information.

     
  • At 2:23 PM, Blogger John said…

    Blech, I'll fix it on Monday. Were you able to build the source from the provided solution/project files?

    John

     
  • At 2:39 PM, Blogger guardian said…

    sure, I just tweaked the project settings for CodeSuppository:

    Project Settings --> Manifest Tool --> Embed Manifest --> Yes

     
  • At 11:08 AM, Blogger John said…

    Note: I just re-uploaded the code, and I also improved the OBB fitting algorithm. It now uses the best fit plane technique to derive a rotation matrix to fit the point cloud and then only rotates the points on a single axis of rotation to converge to the best fit solution.

     
  • At 11:34 AM, Blogger caffeinatedguy said…

    Hi John,

    First off I wanted to thank you for posting this. Your code has been a big help. I was playing around with

    fm_computeBestFitOBB

    Passing it just triangles to build bound boxes around. Well The matrix and scale came back 1.#INF000. I tracked it down to this function

    fm_rotationArc

    looks like it breaks down at the 180 degree case. The two input vectors are (0,1,0) and (0,-1,0).

    Haven't come up with the fix yet (assume it should be fairly trivial) but just thought I would give you a heads up.

    Here is a link with a bit of detail I found about it

    http://www.euclideanspace.com/maths/algebra/vectors/angleBetween/minorlogic.htm

     

Post a Comment

<< Home