Bodies in Contact

The method and functions described in this subsection require contact/model2const.l, contact/inequalities.l, contact/drawconst.l.




body [class]


  :super   object 

:slots ()


defines a three dimensional shape.


:constraint b [method]

returns self's constraint when self is in contact with b.


constrained-motion c [function]

returns the possible motions which satisfy the constraint c.


constrained-force m [function]

returns the force which is applicable from the constrained body to the constraining body.


draw-constraint c [function]

draws the constraint c.


draw-motion m a b [function]

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.

Figure 11: Constraints for a peg in a hole.
\begin{figure}\mbox{\epsfxsize =7.5cm
\epsfbox{fig/fig-peg-in-hole1.ps}
}
\mbo...
...s}
}
\mbox{\epsfxsize =7.5cm
\epsfbox{fig/fig-peg-in-hole4.ps}
}\end{figure}

The following figures shows an example of the possible motions of a peg in a hole. The example corresponds to the above program.

Figure 12: Possible motions of a peg in a hole
\begin{figure}\begin{center}
\mbox{\epsfxsize =7.5cm
\epsfbox{fig/fig-peg-nana...
...\epsfxsize =7.5cm
\epsfbox{fig/fig-peg-naname-m4.ps}
}
\end{center}
\end{figure}

k-okada 2013-05-21