Date post: | 28-Dec-2015 |
Category: |
Documents |
Upload: | kristin-bradley |
View: | 216 times |
Download: | 0 times |
Computational Geometry
The systematic study of algorithms and data structures for geometric objects, with a focus on exact algorithms that are asymptotically fast.
Two key ingredients of a good algorithmic solution:
Thorough understanding of the problem geometry.
Proper application of algorithmic techniques and data structures.
Example 1 Proximity
Closest café on campus?
Voronoi diagram
Delaunay triangulation
Example 2 Path Planning
Robot
How can a robot find a short route to the destination that avoids all obstacles?
Applications in Computer Graphics
Creating scene images on a display device.
Intersect geometric primitives (lines, polygons, polyhedra, etc.)
Determine primitives lying in a region.
Hidden surface removal – determine the visible part of a 3D scene while discard the occluded part from a view point.
Create realistic-looking scenes – taking into account lighting and computing shadows.
Deal with moving objects and detect collisions.
Applications in Robotics
How the robot perceives, understands, and acts upon its environment,
Motion planning.
Grasping.
Parts orienting.
Optimal placement.
Applications in GIS
Storage of geographical data (contours of countries, height of mountains, course of rivers, population, roads, electricity lines, etc.)
Large amount of data – requiring efficient algorithms.
Geographic data storage (e.g., map of roads for car positioning or computer display).
Interpolation between nearby sample data points
Overlay of multiple maps.
Applications in CAD/CAM
Design of Products with a computer.
Intersection, union, and decomposition of objects.
Testing on product specifications.
Design for assembly – modeling and simulation of assembly.
Testing design for feasibility.
Line Segments & Vectors
x
y
Dot (Inner) Product
Cross (Vector) Product
Turning of Consecutive Segments
Case of Collinearity
No change of direction Direction reversal
Intersection of Two Lines
p
1l
2l
0: 1111 cybxal
0: 2222 cybxal
Rewrite the above equations in terms ofdot products:
0)1,,(),,( 111 yxcba
0)1,,(),,( 222 yxcba
Hence is perpendicular to both and . )1,,( yx ),,( 111 cba ),,( 222 cba
)1,,( yx must be parallel to their cross product!
Homogeneous Coordinates)1,,( yxRepresent every point as
homogeneous coordinates of ),( yx
).,,(),,(),,( 122112211221222111 babaacaccbcbcbacba
)1,,( yx Intersection is parallel to the cross product vector:
Normalize the z-coordinate of the cross product to 1.
).1,,(1221
1221
1221
1221
baba
acac
baba
cbcb
Hence the intersection point: ).,(1221
1221
1221
1221
baba
acac
baba
cbcb
homogeneous coordinates of intersection
),( yx
Intersection Example
Find the intersect point of the lines:
087 yx 0143 yx
Take the cross product of the two coefficient vectors:
)17,23,25()1,4,3()8,7,1(
Intersection point: )17
23,
17
25(
Two Parallel Lines0: 1111 cybxal
0: 2222 cybxal
).,,(),,(),,( 122112211221222111 babaacaccbcbcbacba
02121 abba
).0,,( 12211221 acaccbcb
point at infinity
Two parallel lines “intersect” at infinity.
Line through Two Points
),( 11 yx
),( 22 yx
?0 cbyax
0)1,,(),,( 11 yxcba
0)1,,(),,( 22 yxcba
011 cbyax022 cbyax
)1,,()1,,(),,( 2211 yxyxcba Scaling yields the same line!
Ex. The line through (3, 1) and (-4, 5) has coefficients (i.e., homogeneous coordinates)
)19,7,4()1,5,4()1,1,3( and equation 01974 yx
Advantages of Homogeneous Coordinates
Scaling independent:
Uniform handling of all cases (horizontal, perpendicular, parallel lines, etc.)
No need to solve equations – just take a cross product.
)17,23,25( )34,46,50( )1,17
23,
17
25(
all represent the same point )17
23,
17
25(
Lines in the Space
For more, see http://web.cs.iastate.edu/~cs577/handouts/plucker-coordinates.pdf
Compute the distance between two lines.
Find their common perpendicular.
Find intersections with their common perpendicular.
(When the lines intersect, the two intersections coincide.)
Compute the distance between two lines.