Computer Science Department TECHNICAL REPORT The Kinematics ofCutting Solid Objects Ernest Davis Technical Report 541 Jajiuary 1991 NEW YORK UNIVERSITY in o 1 I « CE5h 4J COO -P Department of Computer Science 1UCO-Oi1 WqCM; 4<e<J0D-XorO!-i Coura25n1tMEIRnCstEiRtuStTeREoEfT,MNaEtWheYmOaRtK,icN.aYl. 1S0c01i2ences O -•-< T! CJ CQ j<: •>-< D•>H <D iO-l ^ D E-i The Kinematics of Cutting Solid Objects Ernest Davis Technical Report 541 January 1991 The Kinematics of Cutting Solid Objects Ernest Davis* Courant Institute New York, New York February 1, 1991 Abstract This paper studies how the cutting of one solid object by another can be described in a formal theory. We present twoalternativefirst-order representations forthisdomain. Thefirst viewsanobjectasgradually changingitsshapeuntilitissplit, atwhichtimetheoriginal object ceases toexist and two (ormore) newobjectscomeintoexistence. Thesecond focussesinstead onchunksofmaterial whicharepartoftheovercdlobject. Achunkpersistswithconstantshape untilsomepieceofitiscutaway,when thechunkceasestoexist. Weprovethatthetwotheories are equivalent under ordinary circumstances, and we show that they are sufficient to support somesimplecommonsense inferences and algorithms. 1 Introduction Previous AIstudiesofreasoningabout thephysicsofsolidobjects (e.g. [Davis,88], [Joskowicz, 87], [Fallings, 87]) have, almostwithout exception, assumed that solidobjects are rigid and immutable. The only properties that can change over time are position and its concomitants, such as velocity and energy. A full commonsense theory ofsolid objects must deal with a range ofphenomenathat violatethis condition, such as bending, breaking, and cutting. Thispaper deals with the cutting of onesolid object, called the ta—rget, by another, called the blade. Weshow how the geometric aspect ofvarious cuttingoperations slicing an object in half, cutting—a notch into an object, stabbing a holethrough anobject, andcarvingawaythesurfaceofanobject can bedescribed in afirst-order theory. Ourtheorycharacterizes theintermediatestatesthattakeplaceduringacuttingprocessand the geometric relations between the shapes and motionsofthe blades and targets. It allows great freedom in the combinations ofcutting operations that may take place concurrently: a blade may cutmany targetsatonce, atargetmay becutbymanybladesatonce, anobjectmaysimultaneously be cutting at oneend and being cut at another, and soon. In fact, we present two alternative representations for cutting. The first views an object as gradually changing its shape until it is split, at which time the original object ceeises to exist and two (or more) new objects come intoexistence. The second focusses instead on chunks ofmaterial which arepartoftheoverallobject. A chunk persistswithconstantshapeuntilsomepieceofitiscut away, when the chunk ceases toexist. Under ordinary circumstances (which we will define formally below)thetwotheoriesareprovablyequivalent. Ourtheoriessupportcommonsenseinferences about cutting,such as "Anobject cannot becut ifitisisolatedfromotherobjects," and "It isnot possible to cut an internal cavity using a blade outside the target." They allow the results of a cutting 'ThisresearchhasbeensupportedbyNSFgrant#IRI-900144" operation to be computed given the initial shape ofthe targets, the shape ofthe blades, and the motionsofthe targets and blades. A number oflimitationsofourstudy should be noted: • We assume that the cutting operation works by removing and destroying ofthe material of the target in the path ofthe blade, rather than by pushing it aside. Thus, the imagewe are usingismorelike asawcuttingitsway through aboard—, rather than likeawedge beingdriven into a crack. Though this is not actually true to life in most cases, cutting involves some distortion ofthe materialbeingcut, a—nd in many,such as aknifegoingintocheese, itinvolves virtually no destruction of material still, ifthe blade is sufficiently thin, it gives a good approximation. To go beyond this restriction would require a theory ofsmall distortions; that is, bending. Such atheory will,ofcourse, ultimatelybe necessary, but appears tobedifficult. It is hard to characterize bendingand itslimitswithout usingthelanguageofpartialdifferentialequations, which is unintuitive and does not (at least easily) support qualitative reasoning. • We deal only with the kinematics ofcutting, the relations amongthe positions and shapes of the objects involved, not with its dynamics, the forces and velocities required for cutting. In general, dynamictheories are much moredifficult than kinematictheories; the formulation of adynamic theory ofrigid objects useful forcommonsenseinference isstill very much an open problem [Davis, 88]. There is also a close relation between this restriction and the previous, since muchoftheforceonabladecomesfromtheelasticresistanceofthetargettobeingbent, and this, ofcourse, can only becharacterized in atheory that incorporates thebendingofthe target. • We do not consider any restrictions on the shape ofthe objects involved; we do not require that the blade be sharp. In the absence of a dynamic theory, such restrictions would be superficial and ad hoc. Restriction on the materialsofthe objects are taken as optional. In many commonsense environments, such as cooking, it can be assumed that a hard object, like a knife, is cutting asoft object, like cheese, and this assumption can often simplifies the inference process. However, addingordropping the assumption makes only asmall difference to the structure ofthe theory, and we willconsider both versions. Section 2ofthispaper givesan informalaccountofthetwotheories. Section 3 presentsasimple algorithm that can be used to calculate the result ofcutting given complete knowledge. Section 4 discusses the pros and cons ofthe two theories. Section 5 discusses sometechnical issues that arise with certain anomalousCcises, and gives a precise definition ofthe "ordinary circumstances" under which thetwotheories areequivalent. Section 6presents theformaltheories infirst-order language. Section 7 proves that the two theories are equivalent. Section 8 gives an exampleofcommonsense inferences that can bejustified by the theories. Guidetothe reader; The dedicated reader should read sections2,4, and 5, which are written in English, and glance at section 3, which is in pseudo-code. (The casual reader has already dropped out.) Thefanaticaldevoteeoffirst-order representationsmay beinterested in lookingat the formal- izationofthe theories insection 6, thedefinitionsofeach theory in termsoftheother insection 7.1, and the commonsense inference in section 8. No one will be interested in reading the equivalence proofs in sections 7.2-7.5. 2 The Ontology The major difference between a microworld ofimmutable objects and one in which cutting occurs is that objects can be created, destroyed, and changed in shape. Our two theories differ in their approach to the conception ofthese operations and to the identity ofobjects over time. As a preliminary step, we observe that, since for our theory to be first-order, existence in the sense of the existential quantifier cannot be time-dependent. Thus, since we wish objects to be denoted by termsand variables, they must be logicallybeeternal. Whetheran object ispresent "in theflesh" at agiven moment isafluent (astate). Thusifpisatermdenotingan object, wesuppose thatpdenotes aghost at times when theobject is not present. Ghosts need not be constrained by physical laws. Inourfirsttheory,weconsideratargetbeingcutbyabladeasretainingitsidentity, butchanging its shape, up to the moment that it falls into pieces. At the moment when it comes into separate pieces, the original target ceases to exists and each piece becomes a new object. We will call this the "mutableobject" theory. (Figure 1) This conception ofobject identity does not correspond precisely to the intuitive notion. Intu- itively, ifasmallchip iscut offalargeobject, theobject persists in the large remainingpiece, while ourtheory says that the originalobject is replaced by twowholly new pieces. Conversely, ifa large object isfiled down toasmallonewithoutever cuttingoffaseparate piece, our theory willsay that the identity ofthe object remains the same, while intuitively one might say that it has changed. However, ourtheory isprobably asclose asone can cometo theintuition withoutdrawingarbitrary dividinglines. (How large a chip can be cut off? How much can be filed away?) There are, then, three kindsofstatechangein thistheory: theshapeofanobjectiscut away; an object comesintoexistence; and an object ceases toexist. The dynamicsofthe theory thus consist primarilyofspecifications ofthe circumstances and extent ofeach ofthese changes. The rules are asfollows; MO.l Change ofshape: Ifan object O persists from time51 to 52 then its shape in 52 isequal to its shape in 51 minus the set ofall points occupied by some blade between 51 and 52. (As we will discuss below, boundary points requirespecial care.) MO.2 Sufficient condition for destroying and creating objects: Ifthe shape ofO is disconnected at time5, then Oisaghost at5and alllatertimes,andeach connected componentoftheshape ofO becomes a real object. (We assume that O persists in the same place for the instant 5 that it isdisconnected, though it is aghost.) MO.3 Necessary condition fordestruction: IfO isreal at time51 and aghost attime52 > 51, then the shapeofO is disconnected at sometime53€ (51,52]. MO.4 Necessary condition for creation: IfO is aghost at time 51 and real at time 52 > 51, then O came into existence as a connected component ofsome disconnected object 02 at time 53€ (51,52] Additional restrictions on the objects involved can be added as conditions in rule MO.l. For example, the rule that the blade must be harder than the target can be imposed by rewriting MO.l in the form MO.la If an object O persists from time 51 to 52 then its shape in 52 is equal to its shape in 51 minus the set ofall points occupied by some blade OB harder than O between 51 and 52. Our second theory, called the "immutable chun—k" theory, starts with the observation that—it should bepossibletoview allthree typesofchange creation, destruction, and changeofshape asconsequences ofasingle typeofchange, namelythe destruction ofmaterial. Ifthe destruction of thematerialofanobjectdoesnotdisconnectit, theshapeoftheobjectchanges; ifitdoesdisconnect it, the object changes identity. But locally, at the contact point between the blade and the target, the two look exactly the same, and it should be possiblejust to characterize the local change, and deduce the global changefrom that. Our new theory, in effect, merges reshaping and creation into destruction. We can eliminate creation as a separate process if we take the point of view that the two new pieces were always there; they werejust entrapped inside the larger object. When the larger object is destroyed they are liberated, and free to move separately. Similarly, we can assimilate reshaping into destruction by viewing the new shape as having always been latent in the oldshape, and beingrevealed by the destruction ofthe old shape. Thus, wevieweachobject ashavinglatent withinit allpossiblepieces, called chunks, thatcould be cut out. Every reasonableshape (to be defined below) insidethe object is a chunk. Cuttinghas the effect ofdestroying all the chunks that are cut into. The chunks that are visible at any given momentarethosethat havebeen "liberated" bythedestruction ofallthechunksthatcontainthem. Sometimes, this destruction ofchunks will leave one visible chunk; sometimes, it will leave several. In the formercase, the object is reshaped; in the latter, itissplit. (Figure 2) Duringthe processofcutting, acontinuousinfinitudeoflatent chunksbecomereal foronesingle instant, and then immediatelyarecut intoand becomeghosts. Each such is latentover theinterval (—00,TO), real for the single instant TO, and a ghost for the remaining interval (TO,00). There is another infinitudeoflatent chunksthatbecomeghostswithoutever beingreal, because they arecut intowithoutever being fullycut out. Theremainingfeatures ofthe theory areeasilyfit intothisframework. At anygiven time,there are two primary classes ofchunks: materialchunks, which includes both latent and visiblechunks, and ghosts. Material chunks are organized in ahierarchy ofsub-chunk relations; CI is asub-chunk ofC2 ifthe region occupied by CI is asubset ofthe region occupied by C2. A vtstble or top-level chunk is a material chunk that is maximal in the sub-chunk hierarchy; non-maximal chunks are latent. Every latent chunk is a sub-chunk of some top-level chunk; every reasonable (still to be defined)subset oftheregionoccupied byatop-level chunk isoccupied bysomelatentchunk. Latent chunks are constrained to move together with the top-level chunk that contains them. As a target is cut, the current top-level chunk is continually turned into aghost, thus lowering the top level down to one (or more) of its sub-chunks. The top level thus moves steadily down the sub-chunk hierarchy. The sub-chunks ofthe new top-level chunk remain latent; chunks in the hierarchy that are not its sub-chunks become ghosts. The target is split when the cutting process splitsthe live part ofthe hierarchy intotwo. (Figure 3) In this theory there is only one primitive type ofchange (aside from change ofposition, which is the same in both theories): the change ofa chunk from material to ghost. The dynamicsofthe theory consist oftwo rules statingthat achunk becomes aghostjust ifit is penetrated by a blade. IC.l 1. IfCI is materialat time51 and aghost at timeS2, then, (a) SI precedes 52; and (b) There isatime53G (51,52] and achunk C2such that C2 istop-level at 53, CI isnot a sub-chunk ofC2, and CI intersects C2 at 53, IC.2 IfCI and C2 are distinct top-level chunks at time 5, then they do not intersect at 5. A number offeatures ofthese rules are noteworthy: y / £> r_77 BiJ^Dt lf\^E' TflR^fl DlrDUmb rh^6-El '^?LTT r'lO^CCe i - /^\^\cx)2U Obj«r4 ILen.-y y • IC.l serves as a frame axiom; that is, a necessary condition for CI to turn from a material chunk to aghost. IC.2, in its contrapositive, "IfC2 is top-level and intersects CI, then CI is aghost" serves as a causal axiom; it gives asufficient condition for CI to be aghost. • IC.2 isjust the basic ruleofsolidobject kinematics that real objects may not intersect. • IC.l incorporates the condition that chunks cannot change fromghosts to material. • Additional necessary conditions on cutting, such as a rule that the blade must be hard and the target must besoft, can be added as additional consequences in rule IC.l. It should be noted that, in this model, a blade can completely annihilate a target by pushing through itsentireextent. In fact, ifwe donot require that thebladebe harder than the target, two objects can mutually annihilate by pushing intoone another, like twosoft snowballs being crushed together Inorder tobringtheobjects and chunks theories intoclosecorrespondence, wemusteither eliminate this possibility from the chunks theory or add it to the objects theory. The latter turns out to be easier; it suffices to define a "vanishing shape" to be either a disconnected shape or the null shape, and then to replace "disconnected" by "vanishing" in rules MO.3 and MO.5. We still need a definition of a "reasonable" shape for both objects and chunks. Certainly, an object must occupy a connected region, except at the instant when it is split; disconnected pieces donot move in concert. Wedonot allow infiniteobjects an object must occupy abounded region. ; Alsothere aretechnical advantages torequiringtheshapeofaobjecttobean open region, contrary tomostpreviouspractice(e.g. [Requicha,80], [Davis,88])whichhasbeen tousenormalregions. We must prohibit theobject from having isolated points orlower-dimensional slitsmissing; technically, we require the shape to be equal to the interior ofits closure. Finally, there is no point in allowing empty objects. These conditions will suffice for our purposes; we will allow a material object or a chunk to occupy any non-empty bounded, connected region that is equal to the interior of its closure. Such aregion will besaid to be "well-shaped" or "proper." Since we are taking theshapesofobjects to beopen regions, we must view the blade as annihi- latingthe pointsofthe target on its boundary, as well as those in its interior. 3 Algorithm Suppose that blades are hard and targets are soft, and that we have some meansofcalculating the motion ofeach object at each time. (Note that it is possible to know the motion ofthe targets in advance without specifying how many targets there are at each instant. For instance, it may be known thatalltargets aremotionless.) Then thefollowingsimulationalgorithm,usinguniformtime steps, will allow us to predict theeffect ofthe cuttingoperations.