Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sun Jan 22, 2012 6:23 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 6:09 pm
Posts: 5
Location: Chapel Hill, NC, USA
Suppose I have a polygon with vertices specified in a floating point format (float or double - I'm not sure that it's fundamentally relevant which), and I want to compute a plane that "best fits" the given data. I have a number of questions about how to minimize floating point error.

  • Typically, one would compute the cross product between two edge vectors to obtain the plane normal. Which two vectors will give the best approximation?
  • There are many equivalent plane representations, when dealing with the real numbers. In floating point, which format preserves the most information?

I've been reading Goldberg's paper on floating point, as well as other sources. I was wondering, though, if anyone had readily available answers to these more geometrically oriented questions. Thanks!

edit: I am honored to have posted the 1024th topic. :D


Top
 Profile  
 
PostPosted: Mon Jan 23, 2012 3:19 pm 
Offline

Joined: Tue Feb 20, 2007 4:56 pm
Posts: 179
I think the idea you are looking for is the "least squares plane fit" - you might do a Google search for that. I know David Eberly, for one, had a fairly simple code snippet for finding it. If you can't find it, I may be able to dig it up.


Top
 Profile  
 
PostPosted: Mon Jan 23, 2012 5:09 pm 
Offline

Joined: Sun Jul 03, 2005 4:06 pm
Posts: 750
Location: Bellevue, WA
Google for Newell plane. You find it discussed in "Real-Time Collision Detection" from Christer Ericson and in Gino's book. Here is a PDF as reference: http://cs.haifa.ac.il/~gordon/plane.pdf
You might also be able to find it in the Bullet source code since you usually use it for face merging. So you can maybe also search the forum and the source code.

HTH,
-Dirk


Top
 Profile  
 
PostPosted: Mon Jan 23, 2012 9:29 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 6:09 pm
Posts: 5
Location: Chapel Hill, NC, USA
Great! Thanks for the answers - I'll have a look into that algorithm.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group