Consider the clipping of a line segment defined by the latter’s two endpoints. Show that you require only the endpoints to determine whether the line segment is not clipped, is partially visible, or is clipped out completely.

Thanks

Consider the clipping of a line segment defined by the latter’s two endpoints. Show that you require only the endpoints to determine whether the line segment is not clipped, is partially visible, or is clipped out completely.

Thanks

If I understand you correctly you could use the Plane equation Ax + By + Cz + D = 0 to work out if one or both of the end points are infront of the clipping plane or behind it. If each end point is on a different side of the plane then the line segment is partially visible, otherwise it is either completely visible or completely invisible.

Hope that helps

Does the question not sound amazingly like someone’s homework?! =)

Originally posted by john:

Does the question not sound amazingly like someone’s homework?! =)

Who wants to turn in the wrong answer? Veerification is always nice.

Or even worse…a test!