Graphics Reference
In-Depth Information
r
d
2
/
d
1
d
2
d
1
d
L
3
L
1
L
2
FIGURE 4.14
Measurements used to map an object vertex to a polyline.
Next, each object vertex is mapped to its corresponding polyline segment. A line segment is con-
structed through the object vertex parallel to the polyline segment and between the boundary lines. For
a given object vertex, the following information is recorded (
Figure 4.14
): the closest line segment (
L
2
);
the line segment's distance to the polyline segment (
d
); and the object vertex's relative position on this
line segment, that is, the ratio
r
of the length of the line segment (
d
1
) and the distance from one end of
the line segment to the object vertex (
d
2
).
The polyline is then repositioned by the user and each object vertex is repositioned relative to the
polyline using the information previously recorded for that vertex. A line parallel to the newly posi-
tioned segment is constructed
d
units away and the vertex's new position is the same fraction along this
line that it was in the original configuration (see
Figure 4.15
)
.
Global deformation
Alan Barr [
1
] presents a method of globally deforming the space in which an object is defined. Essen-
tially, he applies a 3
3 transformation matrix,
M
, which is a function of the point being transformed,
that is,
p
0
ΒΌ M
(
p
)
p
, where
M
(
p
) indicates the dependence of
M
on
p
. For example,
Figure 4.16
shows a
sr
s
d
L
2
FIGURE 4.15
Remapping of an object vertex relative to a deformed polyline (see
Figure 4.14
)
.
Search WWH ::
Custom Search