
150 II Rendering Techniques
projected size of a sphere with diameter equal to the length of the edge of the patch.
This solution deals effectively with the collinearity issue.
P
2
P
1
e
2
e
1
d
d
Figure 10.2. Diagram to compute
the projected sphere screen size.
To compute the projected size of the sphere
(Figure 10.2) we pick two corners sharing the
same edge, e
1
and e
2
,andcomputetheedge’s
length in world space, d. Then, we compute the
midpoint of the edge, P
1
,andanewpointabove
the centre, P
2
, displaced by the edge’s length, d.
Points P
1
and P
2
are then transformed to screen
space. The distance between the transformed
points provides the screen-space diameter of the ...