# Physics Simulation Forum

 Page 1 of 1 [ 4 posts ]
 Print view Previous topic | Next topic
Author Message
 Posted: Sun Jan 22, 2012 6:23 pm

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.

Top

 Posted: Mon Jan 23, 2012 3:19 pm

Joined: Tue Feb 20, 2007 4:56 pm
Posts: 190
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

 Posted: Mon Jan 23, 2012 5:09 pm

Joined: Sun Jul 03, 2005 4:06 pm
Posts: 773
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

 Posted: Mon Jan 23, 2012 9:29 pm

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

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 4 posts ]

#### Who is online

Users browsing this forum: No registered users and 2 guests

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

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities