# BSP Confusion

This topic is 5060 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I've been reading alot about BSP trees lately, and I think I understand the basic concept. The details, however, really confuse me. All the tutorials I've read talk about using a plane to split the polygons into smaller and smaller sections recursively. Apparently the plane to use is chosen from the list inherited from the previous split. What I don't understand is how to construct a plane from a polygon. Perhaps it's obvious, but I'm somewhat weak on the math. If anybody could help me w/this problem, I'd appreciate it alot.

##### Share on other sites
A plane consists of a normal, and a 'distance from the origin'. A polygon has a normal already, so you have 3/4 (in 3D) of the numbers you need for the plane. The distance is calculated using the plane equation (Ax + By + Cz + D = 0)
You have a point on the plane already (any vertex from the polygon is on the plane), and the (A,B,C) = the normal, so you plug in the values for the point and get D = -(Nx*Px + Ny*Py + Nz*Pz) where N is the polygon's normal and the P is any point on the polygon (a vertex is an easy one since you have it already).
In other words, D is equal to -(N . P) where . is the dot product

Some handly links for this kind of stuff:
Geometry
Math World

##### Share on other sites
Thanks for the info. I've got a better idea of what's going on now. Good links too.

1. 1
Rutin
27
2. 2
3. 3
4. 4
5. 5

• 11
• 9
• 9
• 9
• 14
• ### Forum Statistics

• Total Topics
633312
• Total Posts
3011312
• ### Who's Online (See full list)

There are no registered users currently online

×