File: contact.tex

package info (click to toggle)
euslisp 9.27%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 55,344 kB
  • sloc: ansic: 41,162; lisp: 3,339; makefile: 256; sh: 208; asm: 138; python: 53
file content (129 lines) | stat: -rw-r--r-- 3,450 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
\subsection{\label{Contact}Bodies in Contact}

The method and functions described in this subsection require
{\bf contact/model2const.l, con\-tact/in\-e\-qual\-i\-ties.l,
 contact/drawconst.l}.

\begin{refdesc}

\funcdesc{constrained-motion}{c}{
returns the possible motions
which satisfy the constraint {\em c}.}

\funcdesc{constrained-force}{m}{
returns the force which is applicable
from the constrained body to the constraining body.}

\funcdesc{draw-constraint}{c}{
draws the constraint {\em c}.}

\funcdesc{draw-motion}{m a b}{
draws the possible motions of {\em a}
in contact with {\em b}. Type the return key for drawing.}

\end{refdesc}

Example\\
\begin{verbatim}
;;
;;      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)
\end{verbatim}
\clearpage
The following figures shows examples of constraints.
The small arrows in the figures designate the constraints for the pegs.
\\ 

\begin{figure}[h]
\includegraphics[width=7.9cm]{fig/fig-peg-in-hole1.ps}
%\epsfile{file=fig/fig-peg-in-hole1.ps,width=7.9cm}
%\mbox{
%\epsfxsize=7.5cm
%\epsfbox{fig/fig-peg-in-hole1.ps}
%}
\includegraphics[width=7.9cm]{fig/fig-peg-in-hole2.ps}
%\epsfile{file=fig/fig-peg-in-hole2.ps,width=7.9cm}\\
%\mbox{
%\epsfxsize=7.5cm
%\epsfbox{fig/fig-peg-in-hole2.ps}
%}
%\epsfile{file=fig/fig-peg-in-hole3.ps,width=7.9cm}
\includegraphics[width=7.9cm]{fig/fig-peg-in-hole3.ps}
%\mbox{
%\epsfxsize=7.5cm
%\epsfbox{fig/fig-peg-in-hole3.ps}
%}
%\epsfile{file=fig/fig-peg-in-hole4.ps,width=7.9cm}
\includegraphics[width=7.9cm]{fig/fig-peg-in-hole4.ps}
%\mbox{
%\epsfxsize=7.5cm
%\epsfbox{fig/fig-peg-in-hole4.ps}
%}
\caption{Constraints for a peg in a hole.}
\label{fig:peg-in-hole}
\end{figure}

\clearpage

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

\begin{figure}[h]
\begin{center}
\includegraphics[width=7.9cm]{fig/fig-peg-naname-m1.ps}
%\epsfile{file=fig/fig-peg-naname-m1.ps,width=7.9cm}
%\mbox{
%\epsfxsize=7.5cm
%\epsfbox{fig/fig-peg-naname-m1.ps}
%}
%\epsfile{file=fig/fig-peg-naname-m2.ps,width=7.9cm}\\
\includegraphics[width=7.9cm]{fig/fig-peg-naname-m2.ps}
%\mbox{
%\epsfxsize=7.5cm
%\epsfbox{fig/fig-peg-naname-m2.ps}
%}
%\epsfile{file=fig/fig-peg-naname-m3.ps,width=7.9cm}
\includegraphics[width=7.9cm]{fig/fig-peg-naname-m3.ps}
%\mbox{
%\epsfxsize=7.5cm
%\epsfbox{fig/fig-peg-naname-m3.ps}
%}
%\epsfile{file=fig/fig-peg-naname-m4.ps,width=7.9cm}
\includegraphics[width=7.9cm]{fig/fig-peg-naname-m4.ps}
%\mbox{
%\epsfxsize=7.5cm
%\epsfbox{fig/fig-peg-naname-m4.ps}
%}
\end{center}
\caption{Possible motions of a peg in a hole}
\label{fig:peg-in-a-hole}
\end{figure}

\clearpage