Surface Area Heuristic
Posted 10 November 2009 - 10:08 PM
It says that the surface area is calculated as:
area = 2 * width * height * depth
But when I look at the provided source code it much different. Although, probably not incorrect. Here it's:
real SAV = 0.5f / (a_Box.w() * a_Box.d() + a_Box.w() * a_Box.h() + a_Box.d() * a_Box.h());
Did Jacco forgot to update is article or is the change based on some optimization?
Posted 11 November 2009 - 12:23 AM
The second formula appears to be calculating the inverse surface area.
w=width, h=height, d=depth
= 2 * (wh + wd + hd)
Inv. surface area
= 1 / (2 * (wh + wd + hd))
= 0.5 / (wh + wd + hd)
The inverse surface area is more useful as you can just multiply by it to divide by the surface area. As you should know, dividing is quite significantly more expensive than multiplying, so you'll often see people storing inverses for performance reasons.
Posted 21 January 2010 - 04:24 PM
Ctraversal and Cintersect in the article that you speak of. Any hints??
Posted 21 January 2010 - 05:15 PM
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users