[Algorithms] Cyrus-beck line clipping algorithm
Brought to you by:
vexxed72
From: Phil Y. <ph...@cl...> - 2000-07-25 17:29:47
|
I have just been looking through the definition of the Cyrus-Beck line clipping algorithm, as defined in 'Procedural elements for computer graphics' by David Rogers. On talking about deriving the normals to the top, bottom and side planes of the viewing frustrum, he talks about using the 'cross products of the vectors from the centre of projection to the corners at z=0, the plane of projection'. However, he previously defines the view frustrum as a 'perspective volume with (xl, xr, yb, yt, zh, zy ) = (-1, 1, -1, 1, 1, -1), with a centre of projection at zcp = 5'. He lists the vectors as: v1 = [ 1, 1, -5 ] v2 = [ -1, 1, -5 ] v3 = [ -1, -1, -5 ] v4 = [ 1, -1, -5 ] Surely the plane of projection should be z = -1, and therefore the z component in the above vectors should be -6? Or am I (more likely!) missing something obvious here? _____________________________________ Phil Yard, Lead Programmer, Climax (Brighton) Ltd 01273 764109 mob: 0771 258 1164 web: www.climax.co.uk |