Cristina Neacsu, Karen Daniels University of Massachusetts Lowell
B-Spline Curves & SurfacesB-Spline Curves & Surfaces
• Used in geometric modeling, graphics
Gerald Farin. Curves and Surfaces for Computer Aided Geometric Design, Academic Press, 1988
www.cs.columbia.edu/ ~laza/heart3D/ www.aerohydro.com/products/rg/ papers/nasa_rg1/nasaf1.htmTheo Pavlidis. Algorithms for Graphics and Image Processing, ComputerScience Press, 1982
B-Spline CurvesB-Spline Curves• B-Splines are defined by control polygons• Periodic Cubic B-Spline Curves
– Use a special set of cubic blending functions that have only local influence and each curve segment depends only on the 4 neighboring control points.
• Current work assumption:– non-self-intersecting control polygons (at most one inflection point per curve segment).
Sample Application AreasSample Application Areas
CADCAD
Sensors
Lethal ActionLocate, Identify,Track, Observe
Sensor CoverageSensor CoverageTargetingTargeting
Spline Covering ProblemSpline Covering Problem
mj
j jBA
1
)( mj ,,,, 1
• Covering Items:
• set of spline bounded regions B = {B1, …, Bj, …, Bm}
• Target Item: spline bounded region A
• Output: a solution such that
Sample A and B Translated Bs cover A
A B1 B2
NP-Hard
ApproachApproach
Construct
Inner polygonal approximation to B
Outer polygonal approximation to A
Combinatorial Covering Algorithm
feasible infeasible
Original instance feasible
Construct Cover
?
Construct
Outer polygonal approximation to B
Inner polygonal approximation to A
Combinatorial Covering Algorithm
feasible infeasible
? Original instance infeasible
Previous Work - CoveringPrevious Work - Covering• Solving an apparel trim placement problem using a maximum cover problem approach (IIE Transactions 1999 Grinde, Daniels)
• Translational polygon covering using intersection graphs (CCCG’01 Daniels, Inkulu)
• A Combinatorial Maximum Cover Approach to 2D Translational Geometric Covering (CCCG’03 Daniels, Mathur, Grinde)
Rigid, 2D, Exact, Polygonal & Point, Translation
13 {3} 1 {1}12 {3}
6 {1}
5 {3}
4 {2}
3 {2}
2 {1}
11 {2}
10 {2}
9 {3}
8 {1} 7 {3}
P
Previous Work - SplinesPrevious Work - Splines• Convex hull property & variation diminishing property[Gerald Farin. Curves andSurfaces for CAD. AcademicPress 1988]• Trisection method[Theo Pavlidis. Algorithms for Graphics and Image Processing. Computer Science Press 1982]• Monotone partitioning of spline-bounded shapes [Daniels 92]
• Estimate on the distance between a B-spline curve and its control polygon [D. Lutterkort and J. Peters. Linear Envelopes for Uniform B-Spline Curves. 2000]
L
M
A
B
C
D
P1
P2
P3P4
l1
l2
Curve Polygonal ApproximationCurve Polygonal Approximation
• Monotone partitioning of spline-bounded shapes [Daniels 92]
• Piecewise-linear approximations using midpoints, inflection points, starting points for each curve segment, tangents at these points, and intersection between these tangents.
Polygonal ApproximationPolygonal ApproximationNumber of VerticesNumber of Vertices
• The total number of vertices of the polygonal approximation is:
where n is the number of control points of the control polygon, nN is the number of curve segments with an N-shaped control polyline, nV is the number of curve segments with a V-shaped control polyline, and nS is the number of curve segments with an S-shaped control polyline.
SnVnNnnSnVnNn
n 24
7
232
22
Polygonal ApproximationsPolygonal Approximations
• K. Daniels, R. D. Bergeron, G. Grinstein. Line-monotonic Partitioning of Planar Cubic B-Splines. Computer and Graphics 16, 1 (1992), 55:68.
• D. Lutterkort and J. Peters. Linear Envelopes for Uniform B-Spline Curves. Curves and Surfaces Design: Saint-Malo 1999. P. J. Laurent, et al (Eds.). Vanderbilt University Press, 2000, p. 239:246.
• D. Lutterkort and J. Peters. Tight Linear Envelopes for Splines. Numerische Mathematik 89, 4 (2001), 735:748.
Monotone envelope N (shaded) and rectangle-based envelope H (boldfaced) for non-N-shaped control polyline
Monotone envelope N (shaded) and rectangle-based envelope H (boldfaced) for N-shaped control polyline
Polygonal ApproximationPolygonal Approximation
• Curve segment with non-N-shaped control polyline
P1
P4
P2 P3
S
E M
X2
X1
P22 P2
1 Z
Theorem: For a non-N-shaped control polyline, X1 and X2 cannot both be outside C.
Corollary: For a non-N-shaped control polyline, if X1 or X2 is outside C, then H exits C through P2P2
2.
• C is the convex hull
of SP2P3E
• H = {H1, H2},
where H1 is SX1M and
H2 is MX2E
Polygonal ApproximationPolygonal Approximation
• Curve Segment with nondegenerate-N-shaped control polyline
P1
P2
P3
P4
I
S
E
l
X1
X2
Z2
Y2
P22
P21Theorem: For a nondegenerate N-shaped control
polyline, X1 and X2 cannot both be outside C.
Corollary: For a nondegenerate-N-shaped control polyline, H can exit C only through SP3 if X2 is outside C, or through EP2, if X1 is outside C.
H = N
Combinatorial Covering Procedure
Lagrangian-CoverLagrangian-CoverQj’s:Triangles: Groups:
G1
G2
Q1
Q2
G3
T1
T2
T3
T4
T5
• Grinde, Daniels. Solving an apparel trim placement problem using a maximum cover problem approach, IIE Transactions, 1999• Daniels, Mathur, Grinde. A Combinatorial Maximum Cover Approach to 2D Translational Geometric Covering, CCCG’03
Group choices:
G1 for Q1G2 for Q2
and group k has been assigned to some Qj
LagrangianLagrangianRelaxationRelaxation
Lagrangian Dual: min LR(), subject to >= 0
Lagrangian Relaxation LR()
T
i
m
j bkkjikii
kj
gat1 1 1
T
i
m
j bkkjikii
kj
gat1 1 1
Lagrange Multipliers
1
2
3
4
1
2
3
maximize
>=0 and subtracting term < 0
removing constraints
4minimize
Lower bounds come from any feasible solution to 1
kjg
kjg
kjg
• Grinde, Daniels. Solving an apparel trim placement problem using a maximum cover problem approach, IIE Transactions, 1999
• Daniels, Mathur, Grinde. A Combinatorial Maximum Cover Approach to 2D Translational Geometric Covering, CCCG’03
Lagrangian RelaxationLagrangian Relaxation
Lagrangian Relaxation LR()
T
i
m
j bkkjikii
kj
gat1 1 1
i
T
ii t
1
1 maximize
T
i
m
j bkkjiki
kj
ga1 1 1
LR() is separable
SP1 SP2
Solve: if (1-i) >=0
then set ti=1
else set ti=0Solve: Redistribute:
Solve j sub-subproblems
- compute gkj coefficients
- set to 1 gkj with largest coefficient
m
j bk
T
ikjiki
kj
ga1 1 1
For candidate values, solve SP1, SP2
kjg
kjg
Triangle SubdivisionTriangle Subdivision
Invariant: T is a triangulation of PP
uncovered triangle
T T’
I
II
T’
ResultsResults# m n l r A B k Time
1. 2 6 12 26 C C 0 7
2. 2 12 26 18 N C 0 17
3. 3 4 8 24 C C 8 21
4. 3 15 33 51 N N 33 1573
5. 3 10 22 33 N N&C 22 452
6. 4 8 16 56 C C 31 1394
4.6.
AGENDA
m = # of Bs
n = # of points in A’s control polygon
l = # of points in A’s polygonal approx.
r = total # of points in B’s polygonal app.
C = convex
N = non-convex
k = # points in subdivision
C++, LEDA library
450 MHz SPARC Ultra
ResultsResults# m n l r A B k Time
7. 4 15 36 40 N C 36 1787
8. 4 12 28 68 N N 31 2187
9. 5 17 37 57 N N&C 37 1984
10. 5 16 36 48 N C 36 2937
11. 5 13 27 67 N N 27 1084
12. 6 15 35 72 N C 37 1846*
12.11.8.
AGENDA
m = # of Bs
n = # of points in A’s control polygon
l = # of points in A’s polygonal approx.
r = total # of points in B’s polygonal app.
C = convex
N = non-convex
k = # points in subdivision
Future WorkFuture Work
• Remove constraint of single inflection point
• Cusps, loops Construct
Inner polygonal approximation to B
Outer polygonal approximation to A
Combinatorial Covering Algorithm
feasible infeasible
Original instance feasible
Construct Cover
?
Construct
Outer polygonal approximation to B
Inner polygonal approximation to A
Combinatorial Covering Algorithm
feasible infeasible
? Original instance infeasible
Future Work Future Work – continued– continued
• Generalize further the covering problem
Rigid, 2D, Exact, Spline, Translationthis work:
flexible approximate3D rotationfuture work:
If I do not find an exact covering, can I modify Qj’s control polygons such that they can cover P?
Backup – Backup – Polygonal CoveringPolygonal Covering
Q3
Q1 Q2
Sample P and Q
P1
P2
Translated Q Covers P
• Input:
– Covering Items: Q = {Q1, Q2 , ... , Qm}
– Target Items: P = {P1, P2 , ... , Ps}
– Subgroup G of
• Output: a solution = { 1, …, j , ... , m}, , such that mj
j jQP
1
)()( nRIso
Rigid, 2D, Exact, Polygonal & Point, Translation
Gj
NP-hard
BackupBackup
Subdivision
BackupBackup
Number of points in polygonal approximation
S
E TMI
TME
M
S
E
T1
T2 Out
In
I
S
E T1
T2
Out
In
I
BackupBackup
Each segment of a cubic B-spline curve is influenced by only 4 control points, and conversely each control point influences only 4 curve segments.
pi 1 i
pi+2
pi-1
pi+1
0
p1 p2
p3
p4 p5
p0
p1
*
BackupBackupFor segment i of a periodic cubic B-spline curve we have:
24,414,34,214,1 iiiii puFpuFpuFpuFup 2:1 niwith for open curves
and where Fj,4 are called blending functions and they are:
1336
1 234,1 uuuuF
4636
1 234,2 uuuF
13336
1 234,3 uuuuF
34,4 6
1uuF
10 u
0 u
1 F2,4
F3,4
F1,4 F4,4
F
1
1 u 0 u=1
F2,4 F3,4
F1,4 F4,4
BackupBackup
Periodic Cubic B-Spline Curves
24,414,34,214,1 iiiii puFpuFpuFpuFup
for open curves 2:1 ni
Periodic cubic B-spline curves are well suited to produce closed curves. In matrix notation:
1mod2
1mod1
1mod
1mod1
4,44,34,24,1
ni
ni
ni
ni
i
p
p
p
p
uFuFuFuFup
1:1 ni for closed curves
p1 p2
p3
p4 p5
p0
1
2
5
4
3
0
BackupBackup• C0 continuity ensures that there are no gaps or breaks between a curve’s beginning and ending points.
• C1 continuity between two curve segments requires a common tangent line at their joining point; C1 continuity also requires C0 continuity.
• C2 continuity requires that the two curves possess equal curvature at their joint.
BackupBackup
Variables: Parameters:
Brought into objective function for Lagrangian Relaxation
Lagrangian Relaxation is used as a heuristic since optimal value of Lagrangian Dual is no better than Linear Programming relaxation.
exactly 1 group chosen for each Qj
value of 1 contributed to objective function for each triangle covered by a Qj, where that triangle is in a group chosen for that Qj
kjg