MASSACHUSETTS INSTITUTE OF TECHNOLOGY ARTIFICIAL INTELLIGENCE LABORATORY. Working Paper 113 March 29, ON SOLVING THE FINDSPACE PROBLEM, or

Similar documents
Two-Dimensional Viewing. Chapter 6

CSCI 4620/8626. Computer Graphics Clipping Algorithms (Chapter 8-5 )

Computer Graphics. The Two-Dimensional Viewing. Somsak Walairacht, Computer Engineering, KMITL

UNIT PLAN. Big Idea/Theme: Polygons can be identified, classified, and described.

Computational Geometry

Lecture 3: Art Gallery Problems and Polygon Triangulation

Clipping Lines. Dr. Scott Schaefer

Clipping Points Consider a clip window which is rectangular in shape. P(x, y) is a point to be displayed.

Multivariable Calculus

From Vertices To Fragments-1

Practical Linear Algebra: A Geometry Toolbox

Geometry Sixth Grade

Polygon Partitioning. Lecture03

Indirect measure the measurement of an object through the known measure of another object.

Rubber bands. Chapter Rubber band representation

Course Number: Course Title: Geometry

Elementary Planar Geometry

Unit 12 Topics in Analytic Geometry - Classwork

9. Visible-Surface Detection Methods

B553 Lecture 12: Global Optimization

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

heptagon; not regular; hexagon; not regular; quadrilateral; convex concave regular; convex

4.5 VISIBLE SURFACE DETECTION METHODES

Chapter 5. Transforming Shapes

Page 1. Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms

An angle that has a measure less than a right angle.

MASSACHUSETTS INSTITUTE OF TECHNOLOGY ARTIFICIAL INTELLIGENCE LABORATORY. Hand Eye Coordination. Glen Speckert

Midterm Exam Fundamentals of Computer Graphics (COMP 557) Thurs. Feb. 19, 2015 Professor Michael Langer

6th Grade Math. Parent Handbook

Planes Intersecting Cones: Static Hypertext Version

Near-Optimum Adaptive Tessellation of General Catmull-Clark Subdivision Surfaces

Answer Key: Three-Dimensional Cross Sections

COMPUTING CONSTRAINED DELAUNAY

MATHEMATICS 105 Plane Trigonometry

Polygon. Note: Each segment is called a side. Each endpoint is called a vertex.

Math 2260 Exam #1 Practice Problem Solutions

Constructing a Cycle Basis for a Planar Graph

GEOMETRY. slide #3. 6th Grade Math Unit 7. 6th Grade Unit 7: GEOMETRY. Name: Table of Contents. Area of Rectangles

Clipping & Culling. Lecture 11 Spring Trivial Rejection Outcode Clipping Plane-at-a-time Clipping Backface Culling

Computational Geometry

CS488. Visible-Surface Determination. Luc RENAMBOT

(Refer Slide Time 03:00)

Math 414 Lecture 2 Everyone have a laptop?

Part 3: 2D Transformation

Lofting 3D Shapes. Abstract

4 INFORMED SEARCH AND EXPLORATION. 4.1 Heuristic Search Strategies

CSCI 4620/8626. Coordinate Reference Frames

A System for Computer Generated Movies. Edwin Catmull, University of Utah

ACT Math test Plane Geometry Review

UNIT 2. Translation/ Scaling/ Rotation. Unit-02/Lecture-01

Polygonal Meshes: Representing 3D Objects

ACT SparkNotes Test Prep: Plane Geometry

Mrs. Daniel s Geometry Vocab List

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10

Review for Mastery Using Graphs and Tables to Solve Linear Systems

Part IV. 2D Clipping

Polygon decomposition. Motivation: Art gallery problem

Polygon Triangulation

COMPUTATIONAL GEOMETRY

Module Four: Connecting Algebra and Geometry Through Coordinates

CMSC 435/634: Introduction to Graphics

Standard 1 Students will expand number sense to include integers and perform operations with whole numbers, simple fractions, and decimals.

Number and Operations - Fractions

Naming Angles. One complete rotation measures 360º. Half a rotation would then measure 180º. A quarter rotation would measure 90º.

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Clipping. Concepts, Algorithms for line clipping. 1 of 16. Andries van Dam. Clipping - 10/12/17

Maximal Monochromatic Geodesics in an Antipodal Coloring of Hypercube

Convex Hulls in Three Dimensions. Polyhedra

Simplified Voronoi diagrams for motion planning of quadratically-solvable Gough-Stewart platforms

Mathematics Curriculum

Topic: Topic 1-Numeration

L1 - Introduction. Contents. Introduction of CAD/CAM system Components of CAD/CAM systems Basic concepts of graphics programming

Classification of Extremal Curves with 6 Double Points and of Tree-like Curves with 6 Double Points and I! 5

Triangulation by Ear Clipping

Discrete Mathematics I So Practice Sheet Solutions 1

Computer Graphics. - Clipping - Philipp Slusallek & Stefan Lemme

Computer Science 474 Spring 2010 Viewing Transformation

We can use square dot paper to draw each view (top, front, and sides) of the three dimensional objects:

Geometry R. Unit 12 Coordinate Geometry. Day Classwork Day Homework Wednesday 3/7 Thursday 3/8 Friday 3/9

2D Drawing Primitives

Solutions to problem set 1

CS 373: Combinatorial Algorithms, Fall Name: Net ID: Alias: U 3 / 4 1

Lesson 1. Unit 2 Practice Problems. Problem 2. Problem 1. Solution 1, 4, 5. Solution. Problem 3

Isometries: Teacher Notes

On-Line Computer Graphics Notes CLIPPING

Clipping and Intersection

Uniform edge-c-colorings of the Archimedean Tilings

The Helly Number of the Prime-coordinate Point Set

CS452/552; EE465/505. Clipping & Scan Conversion

To earn the extra credit, one of the following has to hold true. Please circle and sign.

Chapter 8. Properties of Triangles and Quadrilaterals. 02/2017 LSowatsky

Table of Contents. Foundations 5p Vocabulary List

30. Constrained Optimization

Hidden-Surface Removal.

Computational Geometry

8. Hidden Surface Elimination

Prime Time (Factors and Multiples)

Unit 1, Lesson 1: Moving in the Plane

RASTERIZING POLYGONS IN IMAGE SPACE

coding of various parts showing different features, the possibility of rotation or of hiding covering parts of the object's surface to gain an insight

10. Line Arrangements Lecture on Monday 2 nd November, 2009 by Michael Homann

Transcription:

MASSACHUSETTS INSTITUTE OF TECHNOLOGY ARTIFICIAL INTELLIGENCE LABORATORY Working Paper 113 March 29, 1973 ON SOLVING THE FINDSPACE PROBLEM, or How to Find Out Where Things Aren't... Gregory F. Pfister This report describes research done at the Artificial Intelligence Laboratory of the Massachusetts Institute of Technology. Support for the laboratory's artificial intelligence research is provided in part by the Advanced Research Projects Agency of the Department of Defense under Office of Naval Research contract NOOO14-70-A-0362-0006.

The FINDSPACE problem is that of finding a volume, in a bounded space containing impenetrable objects of fixed position and orientation, where another object of specified dimensions will fit. In two dimensions it corresponds to deciding where to put something down on a cluttered table. The genesis of the problem name is a function in the block manipulation programs of Winograd's natural language understanding system [1]. The applicability of this problem to robotics is clear. Sussman noted [2] that the FINDSPACE problem appears to involve two major subproblems: a proposer, to suggest a position for an object; and a verifier, to check if the suggested position is feasible. The task of the verifier is more straightforward. It tests whether an object with a given position and orientation intersects with any of a set of fixed objects. The proposer, o.i the other hand, appears difficult due to the presumed difficulty of finding "the places where objects are't" -- in two dimensions, those areas on a bounded plane not occupied by other objects. In fact, finding "where objects aren't" -- the FINDEMPTYSPACE (or FES) problem -- can be done very efficiently in two dimensions. This working paper presents an efficient solution which generalizes well to three dimensions. The solution presented is a simple modification of the wellknown Warnock algorithm [3] for removing hidden lines from three-dimensional pictures consisting of planar polygons. The critical inner loop test of the FES algorithm presented is basically Sproull and Sutherland's algorithm [4] for "clipping" line segments where they cross a rectangular area. The exact inner loop test needed has a hardware implementation in

the Evans and Sutherland LDS-! display system [5]. The test also may be implemented efficiently in software. DATA: This solution uses data in the following form: (1) the left, bottom, right, and top coordinates of the area to be considered. (2) a list of polygons. Each polygon is represented as an ordered list of (X,Y) vertex coordinates, obtained by a walk around the polygon. The area under consideration is assumed to be rectangular, and its sides are assumed to be parallel to the coordinate axes. The polygons may be interpreted as the outer boundaries of the figures obtained when objects "resting on the plane" are projected isometrically onto the plane. Which vertex starts each polygon list is irrelevant. The polygons may be arbitrarily complex: they may be concave, they may intersect, and they need not be realizable physically (lines connecting vertices may cross).

TOP-LEVEL ALGORITHM The solution proceeds first by examining each polygon and putting it into one of the following classes: I. The polygon totally surrounds the area II. III. The polygon lies totally outside the area The polygon intersects or lies inside of the area. (Clearly, every polygon falls into one of those classes. The classification algorithm is crucial, and is described below). If any polygon is in class I, FES gives up, since clearly there is no free space available. If all of the polygons are in class II, FES tells the verifier that the entire area is free, and terminates. (The verifier should be a co-routine of FES). Otherwise, FES recurses: It divides the "total area" in half, using, in alternate recursions, a vertical or horizontal line. It passes each "half area", and all the polygons in class III, to each of two separate recursions. This recursion terminates ultimately when an initially chosen resolution limit is reached. The top-level algorithm is a log search for free areas; it has the good quality that it tends to find large free areas first. Warnock's original algorithm was, of course, interested in areas of class I; these were passed to a display file. The originial algorithm also recursed fourfold at each

step, dividing the total area into four quadrants. This is, in fact, probably a good recursion/iteration tradeoff if the polygons are uniformly distributed rather than bunched. Since the algorithm converges to areas immediately surrounding polygons very quickly, thereby "bunching" polygons, fourfold recursion may always be better for this algorithm; it was not specified because it makes the verifier work harder; by unnecessarily splitting free areas. CLASSIFYING POLYGONS First, consider intersection. If no line of the polygon intersects the total area, the polygon does not intersect the total area. Each line, defined by successive pairings of vertices, can be tested as follows: (1) if either endpoint lies inside the area, the line intersects the area or lies totally within it. (2) if both endpoints simultaneously lie above, below, to the left, or to the right of the area, the line does not intersect the area. (3) if the line satisfies neither of the above conditions, find its midpoint and recurse on each half. The "recursion" in step (3) can be done by an iteration, since one-half of the line is always trivally in or out according to step (1) or (2). Also, note that if the endpoints are translated to coordinate systems based on the edges of the area, the tests in (1) and (2) are sign tests.

-5- The ultimate termination is again done by a resolution limit (possibly different from that of the top-level algorithm). This is another log search. Sproull and Sutherland's original algorithm continued until it found the point of intersection between the line and an edge of the area. If no line of a polygon intersects the area, the polygon could either surround the areaor lie outside it. This can be tested by counting how many times any ray from within the area crosses lines of the polygon. If the direction of the crossing is counted -- +1 for counterclockwise, -1 for clockwise -- a result of 0 means the polygon lies outside. A directed intersection check is conveniently done as part of the intersection test if the ray chosen is colinear with a side of the area. The classification algorithm presented here is implemented as the "minimum effort mode" of the Evans and Sutherland LDS-1 display. GUIDING THE SEARCH: The search for free areas can be made somewhat faster -- by making the areas found larger -- if "interesting" positions for splitting the area are used instead of a simple half-and-half split. Such "interesting" positions are: (1) the locations of vertices within, or on the edge of, the area (2) the intersections of lines with the edge of the area.

In fact, use of vertex locations above produces good results for little effort, since it produces areas where diagonals are lines (the optimum) and can be computed as a side effect of classifying polygons. Intersections are probably not worth the effort. Which of a group of vertices is "most interesting" is a harder question to answer, and the speed with which the top-level algorithm converges implies that not much time should be spent answering it. One reasonable ordering is by "Manhattan distance" (AX + AY) from the area center. On the other hand, the verifier could possibly help by indicating where it would like to find more free area, since using and passing such information down in recursion would not require much work. The most important help this could give would be an indication of which side to recurse down first. The latter considerations lead to thoughts of a program to do a guided breadth-first search. The recursion depth could be controlled by manipulating the top-level (not classifier) resolution limit, and the branch followed next could be determined by the verifier. Excessive complexity should be guarded against, however, since situations where such complexity is "needed" will probably find the verifier being the real weak link: how do you translate and rotate an object to fit in the free space you already have? (This "verifier" itself contains a proposer and a verifier; the inner verifier is clearly a full hiddensurface test.)

THREE DtMENSIONS The top-level algorithm obviously generalizes to three dimensions, using a rectangular volume and planar polyhedra. The classifier, however, must now worry about intersections of three-dimensional planar polygons with a rectangular volume. This is a special case of the hidden surface problem. If arbitrary polygons are allowed, even this special case is difficult to solve. However, if all polygons are triangularized, the following extension of the two-dimensional classifier works: (1) if any of the three vertices are inside the volume, the triangle intersects the volume. (2) if all three vertices are simultaneously above, below, left of, right of, in front of, or in back of the volume, the triangle does not intersect the volume. (3) otherwise, recurse using the centrold of the triangle (vector sum of vertices divided by 3) to define three triangles within the given one. This has the unfortunate characteristic that only one of the three triangles in the recursion will necessarily terminate trivially on the next step. I suspect that there is a non-recursive and/or faster way to do this. Line intersections with the volume can be computed by a trivial extension of the two-dimensional classifier, and this will lead to faster "trivial"

detection of intersection In many cases, However, it is unclear whether the extra computational overhead is worth it; experiments are In order. If line intersection information can easily be combined wtth above/below etc. vertex information to also increase the number of non-intersections "trivially" found, I believe that the line intersection computations would stand a very good chance of being justified. It should be noted that the type of algorithm presented here is not complete in a practical sense. Simply finding an appropriate free volume is not enough, since one also needs to know the path an object must take to reach the volume. This significantly harder problem does not appear in the two-dimensional problem, since for practical cases the latter is always embedded in three-dimensions (a cluttered table). CONCLUSION This memo has presented a method for finding the unoccupied space in a bounded plane containing arbitrary polygons, and has indicated how the method can be extended to the three-dimensional case. The full FINDSPACE problem, however, has not been solved. In particular, little has been said about either (1) consolidating the separate rectangular free areas produced into larger, irregular areas; or (2) deciding whether a given object actually fits into such an irregular free area. This has been assumed to be the domain of the verifier. However, the solution described has the good property that if it is done

breadth-first, the largest free areas are found first. This means that in an uncluttered plane, i.e., one with large free areas, an extremely "stupid" verifier can be successfully used. Moreover, if the polygons are restricted to being rectangles oriented along the coordinate axes, as in the original problem context of Winograd's blocks manipulator, an optimal verifier is not very complex. In addition, the algorithm presented will be extremely efficient in this context. For the case where the bounded plane is very cluttered with general polygons, it was noted that the verifier can guide the algorithm presented so as to aid the verification process. An optimal verifier for this case will be very complex, since it must incorporate a general pattern matcher (and possibly a jigsaw puzzle solver). Of course, people don't do too well in the bad cases either.

.I BIBLIOGRAPHY Winograd, T., A Computer Program for Understanding Natural Language, M.I.T. Ph.D. dissertation, February, 1971. Sussman, G., The FINDSPACE Problem, M.I.T. A.I. Laboratory Memo No. 286, March, 1973. Warnock, J., A Hidden Surface Algorithm for Computer Generated Halftone Pictures, University of Utah Ph.D. dissertation. Sproull, R., and Sutherland, I., A Clipping Divider, Proc. AFIPS 1968 FJCC, Vol. 33, Pt. 1, AFIPS Press, Montvale, N.J., pp. 765-775. -------, Line Drawing System Model 1, System Reference Manual, Evans and Sutherland Computer Corporation, 3 Research Road, Salt Lake City, Utah, November, 1970.