# How many vertices can result from clipping a a triangle to a view frustum.

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

## Recommended Posts

If I have a triangle and a frustum how many vertices can result from clipping that triangle to the frustum. I can only come up with 7 points. Is this really the maximum? I think that a triangle can only pass through more than 4 planes of a frustum if it passes exactly through the corners in which case it only creates one additional vertex anyways.

##### Share on other sites
A triangle (or plane) can pass through all 6 planes of the frustum...but I only see 6 vertices being created there

##### Share on other sites
In the worst case, 6*4 , assuming the frustum has 6 planes and the triangle
and its resulting part intersect the other 6-1 planes in turn.
This is a rare case, but it could happen,
More general cases depend on triangle positions , generally the formula is

P= ( original triangle points - clipped points ) * intersected frustum planes

##### Share on other sites
The triangle could potentially intersect all of the six frustum planes. You would have to test one plane after the other. For each plane two new vertices could be generated if an intersection occurs, so in the end it would be possible that you would have to generate 6*2=12 new vertices in total of which not all have to actually be used by the resulting, clipped polygon.

##### Share on other sites
Seven is the maximum for clipping to the X and Y planes, but you can get one more each from clipping to the near and far planes as well. Think of it this way - each plane can turn a single vertex of your (already partially clipped) polygon into an edge - so it takes away one vertex and adds two. So you start with a triangle = 3 vertices, and each of the 6 planes +/-X, +/-Y, +/-Z can add a single vertex each. Total = 9.

1. 1
Rutin
38
2. 2
3. 3
4. 4
5. 5

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

• Total Topics
633350
• Total Posts
3011470
• ### Who's Online (See full list)

There are no registered users currently online

×