1
\documentclass[12pt,a4paper,oneside,openany]{article}
2
\usepackage[squaren]{SIunits}
3
%% LaTeX Preamble - Common packages
4
%\usepackage[german]{babel}
7
\usepackage[utf8]{inputenc} % Any characters can be typed directly from the keyboard, eg éçñ
8
\usepackage{textcomp} % provide lots of new symbols
9
\usepackage{graphicx} % Add graphics capabilities
10
\usepackage{flafter} % Don't place floats before their definition
11
%\usepackage{topcapt} % Define \topcaption for placing captions above tables (not in gwTeX)
12
\usepackage{natbib} % use author/date bibliographic citations
13
\usepackage{subfigure}
15
\usepackage{amsmath,amssymb} % Better maths support & more symbols
16
\usepackage{bm} % Define \bm{} to use bold math fonts
18
\usepackage[usenames,dvipsnames]{color}
20
\usepackage[pdftex,bookmarks,colorlinks,breaklinks]{hyperref} % PDF hyperlinks, with coloured links
21
%\definecolor{dullmagenta}{rgb}{0.4,0,0.4} % #660066
22
%\definecolor{darkblue}{rgb}{0,0,0.4}
23
%\hypersetup{linkcolor=red,citecolor=blue,filecolor=blue,urlcolor=blue} % coloured links
24
\hypersetup{linkcolor=black,citecolor=black,filecolor=black,urlcolor=black} % black links, for print output
26
\usepackage{memhfixc} % remove conflict between the memoir class & hyperref
27
% \usepackage[activate]{pdfcprot} % Turn on margin kerning (not in gwTeX)
28
%\usepackage{pdfsync} % enable tex source and pdf output syncronicity
34
\marginsize{3cm}{3cm}{3cm}{3cm}
39
\def\nomlabel#1{\textbf{#1}\hfil}
41
\newcommand{\Parameters}{\subsection*{Parameters}}
42
\newcommand{\ReturnValue}{\subsection*{Return Value}}
43
\newcommand{\Description}{\subsection*{Description}}
44
\newcommand{\ClassName}[1]{{\tt #1}}
45
\newcommand{\ReturnType}[1]{{\tt (#1)}}
46
\newcommand{\Function}[1]{{\tt #1()}}
47
\newcommand{\Self}{{\tt self}}
49
\newcommand{\ud}{\ensuremath{\mathrm{d}}}
50
\newcommand{\vx}{\ensuremath{\boldsymbol{x}}}
51
\newcommand{\vv}{\ensuremath{\boldsymbol{v}}}
52
\newcommand{\va}{\ensuremath{\boldsymbol{a}}}
53
\newcommand{\vf}{\ensuremath{\boldsymbol{f}}}
54
\newcommand{\mM}{\ensuremath{\boldsymbol{M}}}
55
\newcommand{\mW}{\ensuremath{\boldsymbol{W}}}
56
\newcommand{\mJ}{\ensuremath{\boldsymbol{J}}}
57
\newcommand{\vq}{\ensuremath{\boldsymbol{q}}}
58
\newcommand{\vC}{\ensuremath{\boldsymbol{C}}}
59
\newcommand{\vQ}{\ensuremath{\boldsymbol{Q}}}
60
\newcommand{\vlambda}{\ensuremath{\boldsymbol{\lambda}}}
61
\newcommand{\vd}{\ensuremath{\boldsymbol{d}}}
62
\newcommand{\mI}{\ensuremath{\boldsymbol{I}}}
63
\newcommand{\vc}{\ensuremath{\boldsymbol{c}}}
64
\newcommand{\vr}{\ensuremath{\boldsymbol{r}}}
65
\newcommand{\vF}{\ensuremath{\boldsymbol{F}}}
66
\newcommand{\vtau}{\ensuremath{\boldsymbol{\tau}}}
67
\newcommand{\valpha}{\ensuremath{\boldsymbol{\alpha}}}
69
\newtheorem{mydef}{Definition}
72
\lstset{numbers=left,basicstyle=\footnotesize,numberstyle=\tiny,tabsize=4,breaklines=true}
74
\long\def\symbolfootnote[#1]#2{\begingroup%
75
\def\thefootnote{\fnsymbol{footnote}}\footnote[#1]{#2}\endgroup}
87
P_{01} &=& P_0 \cdot (1-t) + P_1 \cdot t \\
88
P_{12} &=& P_1 \cdot (1-t) + P_2 \cdot t \\
89
P_{23} &=& P_2 \cdot (1-t) + P_3 \cdot t \\
90
P_{02} &=& P_{01} \cdot (1-t) + P_{12} \cdot t \\
91
&=& \left( P_0 \cdot (1-t) + P_1 \cdot t \right) \cdot (1-t) + \left( P_1 \cdot (1-t) + P_2 \cdot t \right) \cdot t \\
92
&=& P_0 \cdot \left( 1-t \right) ^2 + 2 \cdot P_1 \cdot t \cdot \left( 1-t \right) + P_2 \cdot t ^2 \\
93
P_{13} &=& P_1 \cdot \left( 1-t \right) ^2 + 2 \cdot P_2 \cdot t \cdot \left( 1-t \right) + P_3 \cdot t ^2 \\
94
P(t) &=& P_{02} \cdot ( 1 -t ) + P_{13} \cdot t \\
95
&=& ( 1 -t ) ^3 P_0 + 3 \cdot t \cdot ( 1 -t ) ^2 P_1 + 3 \cdot t^2 \cdot ( 1 -t ) P_2 + t ^3 P_3 \\
96
\frac{d}{dt}P(t) &=& - 3 (1-t)^2 P_0 + 3 \cdot \left( (1-t)^2 - 2t (1-t) \right) P_1\\
97
&& + 3 \left( 2t(1-t) - t^2\right) P_2 + 3 t^2 P_3 \\
98
&=& - 3 (1-t)^2 P_0 + 3 \left( -4t +3t^2 \right) P_1 + 3 \left( 2t - 3 t^2\right) P_2 + 3 t^2 P_3 \\
99
\frac{d^2}{dt^2}P(t) &=& 6 (1-t) P_0 + 3 \left( -4 +6t \right) P_1 + 3 \left( 2 - 6 t\right) P_2 + 6 t P_3 \\
100
&=& (6-6t) P_0 + \left( 18t - 12 \right) P_1 + \left( 6 - 18 t\right) P_2 + 6 t P_3 \\
101
&=& 6\left( (1-t) P_0 + \left( 3t - 2 \right) P_1 + \left( 1 - 3 t\right) P_2 + t P_3 \right) \\
102
\kappa &=& \frac{x'y'' -y'x''}{(x'^2+y'^2)^{3/2}} \\
103
x'y'' &=& 6 \left( -3(1-t)^3 x_0y_0 + (3t-2)(9t^2-12t)x_1y_1\right.
108
Zooming the canvas, the point exactly between the two fingers should stay between the two fingers. That point is $T$ in canvas space, and $T'$ in screen space. $T$ must remain stationary between two touches, in both screen and canvas space. The zoom center $Z$ is the point on which the screen is centered. It is $0,0$ in screen space.
110
$r = r - z$ is the offset of view center and pinch center in canvas space. In order for $t$ to remain stationary, $z_{c} = t - t\Delta f_z$. However, this doesn't account for the movement of $t'$ from one event to the next. $\Delta t' = t'_n - t'_{n-1}$, and $\Delta t = f_z \cdot \Delta t'$. Therefore, to account for parallel motion,
112
z_{c} &=& t - \Delta f_z \cdot r + \Delta t \\
113
z_{c} &=& t - \Delta f_z \cdot r + f_z \cdot (t'_n - t'_{n-1}) \\
116
The same procedure can also be written in terms of coordinate system transforms. $M$ is the current canvas transformation, accounting for the zoom factor and the zoom center.
117
$$M_n = Z_n S_n Z_n^{-1}$$
118
What is know is that $$ M_n c = M_{n+1} c $$ where $c$ is the center of the pinch.
121
c_n' &=& z_n + f_{n} (c-z_n) \\
122
c_{n+1}' &=& z_{n+1} + f_{n+1} (c-z_{n+1}) \\
123
c_{n+1}' - c_n' &=& \Delta t' \\
124
\Delta t' &=& z_{n+1} + f_{n+1} (c-z_{n+1}) - z_n - f_{n} (c-z_n) \\
125
\Delta t' &=& (1 - f_{n+1} ) z_{n+1} + f_{n+1} c- z_n - f_{n} (c-z_n) \\
126
z_{n+1} &=& \frac {\Delta t' - f_{n+1} c + z_n + f_{n} (c-z_n)}{1 - f_{n+1}} \\
127
z_{n+1} &=& \frac {\Delta t' - f_{n+1} c + (1-f_n)z_n + f_{n} c}{1 - f_{n+1}} \\
128
z_{n+1} &=& \frac {\Delta t' + (f_n - f_{n+1}) c + (1-f_n)z_n}{1 - f_{n+1}} \\
129
z_{n+1} &=& \frac {\Delta t' + (f_n - s f_{n}) c + (1-f_n)z_n}{1 - s f_{n}} \\
130
z_{n+1} &=& \frac {\Delta t' + (1 - s) f_{n} c + (1-f_n)z_n}{1 - s f_{n}} \\
136
%\bibliographystyle{plaindin}
137
%\bibliography{simtools}