Bodies in ContactΒΆ
The method and functions described in this subsection require contact/model2const.l, contact/inequalities.l, contact/drawconst.l.
constrained-motion c
returns the possible motions which satisfy the constraint c.
constrained-force m
returns the force which is applicable from the constrained body to the constraining body.
draw-constraint c
draws the constraint c.
draw-motion m a b
draws the possible motions of a in contact with b. Type the return key for drawing.
Example
;;
;; peg in a hole with 6 contact points
;;
(in-package "GEOMETRY")
(load "view")
(load "../model2const.l" :package "GEOMETRY")
(load "../inequalities.l" :package "GEOMETRY")
(load "../drawconst.l" :package "GEOMETRY")
(setq x (make-prism '(#f(50 50 0) #f(50 -50 0) #f(-50 -50 0) #f(-50 50 0))
#f(0 0 200)))
(setq x1 (copy-object x))
(send x1 :translate #f(0 0 -100))
(send x1 :worldcoords)
(setq a1 (make-prism '(#f(100 100 -150) #f(100 -100 -150)
#f(-100 -100 -150) #f(-100 100 -150))
#f(0 0 150)))
(setq ana (body- a1 x1))
(send x :translate #f(0 -18.30127 -18.30127))
(send x :rotate -0.523599 :x)
(send x :worldcoords)
(setq c (list (send x :constraint ana)))
(setq m (constrained-motion c))
(setq f (constrained-force m))
(hidd x ana)
(draw-constraint c)
(draw-motion m)
The following figures shows examples of constraints. The small arrows
in the figures designate the constraints for the pegs.
The following figures shows an example of the possible motions of a
peg in a hole. The example corresponds to the above program.