MAPaint Technical Report:
Lines of Intersection
|
Next: 3D Orientation Feedback
Up: Geometry
Previous: Fixed Point Constraints
To make the painting easier on an undistorted image the arbitrary
sections are not displayed with any sort of orthographic or perspective
projection but as seen from the viewing angle. This can be somewhat
confusing and to help navigation the line of intersection of the view
that has the current ``input-focus'' (usually when the cursor is in the
view window) with all other views is displayed and will move as the
controls are adjusted. To determine the line of intersection is
straightforward geometry and requires solving a set of three simultaneous
equations to find a point in each view that is common to both.
For two given planes p1 and p2 with viewing angles
and
respectively we want to establish the angle,
,
and a point,
,
of the line of intersection
of plane 1 in plane 2. With these two quantities we can then draw the
line of intersection in plane 2:
If
is the normal to viewing plane 1 and
is the
normal to viewing plane 2 then the line of intersection, which must lie
in both planes, is parallel to the vector
.
To establish the angle in plane 2 we rotate this vector to plane 2
coordinates,
,
and
To calculate a point of intersection of the two planes we solve for
the point of intersection of a line in plane 1 with plane 2.
A line in plane 1 which must intersect plane 2 is a normal to the
line of intersection. If
and d1 are the fixed point
and distance parameters of plane 1 then the normal to the line
of intersection which passes through the origin in plane 1 is
 |
(20) |
where s1 is a scalar parameter. Plane 2 can defined in terms of
a vector parameter
where x2, y2 are
free parameters and d2 is the distance parameter of plane 2 by the
equation
 |
(21) |
The point of intersection between this plane and the line in plane 1
is found by solving
 |
(22) |
for the parameters s1, x2 and y2. This vector equation results
in a set of three simultaneous equations which can be expressed in
matrix form
 |
(23) |
where
and
The equations are solved in the paint program using standard linear
equations algorithms.
Next: 3D Orientation Feedback
Up: Geometry
Previous: Fixed Point Constraints
Richard Baldock
1998-06-05