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
|
\def\voicecoil#1#2#3{
% ======================
% Parameters
% ======================
\def\voicecoilw{#1} % Total Width
\def\voicecoilh{#2} % Total Height
\def\magnetw{\voicecoilw} % Width of the magnet
\def\magneth{\voicecoilh/1.4} % Height of the magnet
\def\magnetwb{0.15*\magnetw} % Width of the borders of the magnet
\def\magnetmw{0.15*\magnetw} % Width of the middle part of the magnet
\def\magnetwg{0.5*\magnetw} % Width of the gap of the magnet
\def\magnethl{\magnetwb} % Height of the low part of the magnet
\def\magnetmh{0.15*\magneth} % Height of the middle part of the magnet
\def\magnethg{0.2*\magneth} % Height of the gap of the magnet
% ======================
\begin{scope}[shift={(0.5*\voicecoilw, 0.5*\voicecoilh)}, rotate=#3, shift={(0, -0.5*\voicecoilh)}]
% ======================
% Magnet
% ======================
\draw[fill=white] (0, 0) -| ++(0.5*\magnetw, \magneth) -| ++(-0.5*\magnetw+0.5*\magnetwg, -\magnethg) -| (0.5*\magnetw-\magnetwb, \magnethl) -| (-0.5*\magnetw+\magnetwb, \magneth-\magnethg) -| (-0.5*\magnetwg, \magneth) -| (-0.5*\magnetw, 0) -- (cycle);
\begin{scope}[shift={(0, \magnethl)}]
\draw[fill=red] (-0.5*\magnetmw, 0) rectangle (0.5*\magnetmw, \magnetmh);
\draw[fill=blue] (-0.5*\magnetmw, \magnetmh) rectangle (0.5*\magnetmw, 2*\magnetmh);
% Top conductive Magnet
\draw[fill=white] (-0.5*\magnetmw, 2*\magnetmh) -| (0.5*\magnetmw, -\magnethl+\magneth-\magnethg) -| ++(0.1, \magnethg) -| ++(-0.2-\magnetmw, -\magnethg) -| (-0.5*\magnetmw, \magnetmh);
\end{scope}
% ======================
% ======================
% Coil
% ======================
\pgfmathsetmacro{\coilwidth}{0.5*0.5*\magnetmw+0.5*0.1+0.25*\magnetwg}%
\draw[] ( \coilwidth, 0.5*\magneth) -- ++(0, 0.7*\magneth);
\draw[] (-\coilwidth, 0.5*\magneth) -- ++(0, 0.7*\magneth);
% Point on the coil
\foreach \x in {0,1,...,9}
{
\node[circle,inner sep=0.6pt,fill] at ( \coilwidth, \x*0.7*\magneth/10+0.5*\magneth);
\node[circle,inner sep=0.6pt,fill] at (-\coilwidth, \x*0.7*\magneth/10+0.5*\magneth);
}
\draw[fill=white] (-0.5*\magnetw, 1.2*\magneth) rectangle ++(\magnetw, \magnethg);
% ======================
% ======================
% Coordinates
% ======================
% Force
\coordinate[] (vc_force) at (0, \magneth-0.5*\magnethg);
% Coil
\coordinate[] (vc_coil) at (0, \voicecoilh);
% Magnet
\coordinate[] (vc_magnet) at (0, 0);
% Coil Wires
\coordinate[] (vc_wire_one) at ( \coilwidth, 1.2*\magneth);
\coordinate[] (vc_wire_two) at (-\coilwidth, 1.2*\magneth);
% ======================
\end{scope}
}
|