Question on accuracy of NURBS

Next
 From:  mhein
808.1 
Hi!

I'm a computer science student from Germany. For my diploma thesis I'm working on several algorithms dealing with nurbs surfaces, i.e. distance calculation and ray-surface intersection. My software implementation is using the openNURBS Toolkit to be able to read *.3dm files.
Since Rhino is very expensive (and kind of complicated to use, in my point of view) I'm using MoI to create some test models, it's a very cool programm and easy to understand.

To see how accurate my distance algorithm is, I want to do some distance queries on a sphere described by a NURBS surface and compare it to a sphere described by its center and radius. I've already learned to create a NURBS sphere in MoI, entering its coordinates and radius with my keyboard.
Now I've already done some testing, and the average error on the distance calculation is at about 2.5e-13, which I think is already a very good result.

But know I'm a little bit curios about where this small error occurs: Is it in my distance computation (thats what I guess), or is it in the difference between the NURBS sphere and the sphere described by radius and center? Or in another way: How accurate is the NURBS representation of simple objects like a sphere?

Thanks for your help!
Michael

PS: If the answer to this question is rather complicated (or large), then it would also be very nice to point me to some literature or web sources for further reading, if possible.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
808.2 In reply to 808.1 
Hi Michael, I'm glad that MoI was useful for your diploma thesis project!

> How accurate is the NURBS representation of simple objects like a sphere?

Purely mathematically it is completely accurate - one of the properties of a NURBS curve or surface is that it can have the 100% exact same geometric shape as a conic, that's a big reason why they have become the standard for CAD applications.

One reference for this is "The NURBS Book 2nd Edition", Les Piegl and Wayne Tiller, Chapter 7 Conics and circles.

Basically, the R (rational) part of NURBS was introduced specifically to make this possible.

But like any kind of math done on the computer, each calculation only has a limited precision, and you will do more calculations and just generally have more data in the definition of a NURBS sphere rather than a pure analytic point and radius definition. So there is more opportunity for tiny rounding errors to accumulate for the NURBS version, but I'd think that these would be less than 1e-13.

2.5e-13 for your distance accuracy sounds like a really good result to me. You're probably doing just a lot more calculations in general for your NURBS distance computation so again with more calculations your rounding error increases, that's just a normal side effect.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  mhein
808.3 In reply to 808.2 
Hey Michael,

thanks for your help! (The NURBS-Book is next to me on the Desk - it was a big help on my thesis, but I've somehow missed chapter 7...)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All