summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/lapdf/rparams.tex
blob: 210926d942540d2253db08356636817fb594bce1 (plain)
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
\input preamble.tex

\def\fr{\displaystyle\frac}

% ---------------------------------------------------------------------------
\begin{document}
\unitlength1.125cm

\begin{center}
{\Huge \bf{Ellipse Parameters}}
\bigskip

\begin{lapdf}(16,16)(-8,-11)
 \Lingrid(10)(1,1)(-8,8)(-11,5)
 \Setwidth(0.01)
 \Dash(1)
 \Polygon(-7.2,-3.2)(0,4)(7.2,-3.2)(-7.2,-3.2)(0,-10.4)(7.2,-3.2) \Stroke
 \Polygon(5.33,-1.33)(-5.33,-1.33)(0,-6.67)(5.33,-1.33) \Stroke
 \Polygon(4.5,-0.5)(-4.5,-0.5)(0,-5)(4.5,-0.5) \Stroke
 \Dash(0)
 \Setwidth(0.02)
 \Red
 \Rcurve(128)(-4,0,3)(0,4,2)(4,0,3) \Stroke
 \Rcurve(128)(-4,0,3)(0,4,-2)(4,0,3) \Stroke
 \Green
 \Rcurve(96)(-4,0,2)(0,4,1)(4,0,2) \Stroke
 \Rcurve(96)(-4,0,2)(0,4,-1)(4,0,2) \Stroke
 \Blue
 \Rcurve(64)(-4,0,3)(0,4,1)(4,0,3) \Stroke
 \Rcurve(64)(-4,0,3)(0,4,-1)(4,0,3) \Stroke
 \Point(1)(-4,0)
 \Point(1)(0,4)
 \Point(1)(4,0)
 \Point(1)(7.2,-3.2)
 \Point(1)(4,-6.4)
 \Point(1)(0,-10.4)
 \Point(1)(-4,-6.4)
 \Point(1)(-7.2,-3.2)
 \Point(1)(-5.33,-1.33)
 \Point(1)(-4,-2.67)
 \Point(1)(0,-6.67)
 \Point(1)(4,-2.67)
 \Point(1)(5.33,-1.33)
 \Point(1)(-4.5,-0.5)
 \Point(1)(-4,-1)
 \Point(1)(0,-5)
 \Point(1)(4,-1)
 \Point(1)(4.5,-0.5)
 \Point(0)(0,-3.2)
 \Point(0)(0,-1.33)
 \Point(0)(0,-0.5)
\end{lapdf}
{\large $w=2/3$, $w=1/2$, $w=1/3$}
\end{center}
\parskip0.2cm
We know the center $M=(x_m,y_m)$ and the values of $a$ and $b$. We want
to calculate the curve points $P_0$, $P_1$ and $P_2$ and the weight
$w$ to draw the ellipse. With $r=\sqrt{a^2+b^2}$ we get:
\begin{equation}
P_0={{x_m-\fr{a^2}{r}}\choose{y_m+\fr{b^2}{r}}} \quad
P_1={{xm}\choose{ym+r}} \quad
P_2={{x_m+\fr{a^2}{r}}\choose{y_m+\fr{b^2}{r}}} \quad
w_0=1 \quad
w_1=\pm\fr{b}{r} \quad
\end{equation}
With these weights we can draw the ellipse with two segments. One segment
uses the positive and the other the negative weight $w_1$.
\end{document}