author | Shantanu <shantanu@fossee.in> |
Tue, 10 Nov 2009 12:21:29 +0530 | |
changeset 294 | f05b1c457120 |
parent 288 | c4e25269a86c |
child 298 | df494695e061 |
permissions | -rw-r--r-- |
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
1 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
294 | 2 |
% Tutorial slides on Python. |
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
3 |
% |
294 | 4 |
% Author: Prabhu Ramachandran <prabhu at aero.iitb.ac.in> |
5 |
% Copyright (c) 2005-2009, Prabhu Ramachandran |
|
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
6 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
7 |
|
294 | 8 |
\documentclass[compress,14pt]{beamer} |
9 |
% \documentclass[handout]{beamer} |
|
10 |
% \usepackage{pgfpages} |
|
11 |
% \pgfpagesuselayout{4 on 1}[a4paper,border, shrink=5mm,landscape] |
|
12 |
\usepackage{tikz} |
|
13 |
\newcommand{\hyperlinkmovie}{} |
|
14 |
%\usepackage{movie15} |
|
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
15 |
|
294 | 16 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
17 |
% Note that in presentation mode |
|
18 |
% \paperwidth 364.19536pt |
|
19 |
% \paperheight 273.14662pt |
|
20 |
% h/w = 0.888 |
|
21 |
||
22 |
||
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
23 |
\mode<presentation> |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
24 |
{ |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
25 |
\usetheme{Warsaw} |
294 | 26 |
%\usetheme{Boadilla} |
27 |
%\usetheme{default} |
|
239
8953675dc056
Added slide numbers.
Puneeth Chaganti <punchagan@fossee.in>
parents:
220
diff
changeset
|
28 |
\useoutertheme{infolines} |
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
29 |
\setbeamercovered{transparent} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
30 |
} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
31 |
|
294 | 32 |
% To remove navigation symbols |
33 |
\setbeamertemplate{navigation symbols}{} |
|
34 |
||
35 |
\usepackage{amsmath} |
|
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
36 |
\usepackage[english]{babel} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
37 |
\usepackage[latin1]{inputenc} |
294 | 38 |
\usepackage{times} |
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
39 |
\usepackage[T1]{fontenc} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
40 |
|
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
41 |
% Taken from Fernando's slides. |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
42 |
\usepackage{ae,aecompl} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
43 |
\usepackage{mathpazo,courier,euler} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
44 |
\usepackage[scaled=.95]{helvet} |
294 | 45 |
\usepackage{pgf} |
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
46 |
|
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
47 |
\definecolor{darkgreen}{rgb}{0,0.5,0} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
48 |
|
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
49 |
\usepackage{listings} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
50 |
\lstset{language=Python, |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
51 |
basicstyle=\ttfamily\bfseries, |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
52 |
commentstyle=\color{red}\itshape, |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
53 |
stringstyle=\color{darkgreen}, |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
54 |
showstringspaces=false, |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
55 |
keywordstyle=\color{blue}\bfseries} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
56 |
|
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
57 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
294 | 58 |
% My Macros |
59 |
\setbeamercolor{postit}{bg=yellow,fg=black} |
|
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
60 |
\setbeamercolor{emphbar}{bg=blue!20, fg=black} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
61 |
\newcommand{\emphbar}[1] |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
62 |
{\begin{beamercolorbox}[rounded=true]{emphbar} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
63 |
{#1} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
64 |
\end{beamercolorbox} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
65 |
} |
294 | 66 |
%{\centerline{\fcolorbox{gray!50} {blue!10}{ |
67 |
%\begin{minipage}{0.9\linewidth} |
|
68 |
% {#1} |
|
69 |
%\end{minipage} |
|
70 |
% }}} |
|
71 |
||
72 |
\newcommand{\myemph}[1]{\structure{\emph{#1}}} |
|
73 |
\newcommand{\PythonCode}[1]{\lstinline{#1}} |
|
74 |
||
75 |
\newcommand{\tvtk}{\texttt{tvtk}} |
|
76 |
\newcommand{\mlab}{\texttt{mlab}} |
|
77 |
||
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
78 |
\newcounter{time} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
79 |
\setcounter{time}{0} |
294 | 80 |
\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\vspace*{0.1in}\tiny \thetime\ m}} |
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
81 |
|
294 | 82 |
\newcommand\BackgroundPicture[1]{% |
83 |
\setbeamertemplate{background}{% |
|
84 |
\parbox[c][\paperheight]{\paperwidth}{% |
|
85 |
\vfill \hfill |
|
86 |
\hfill \vfill |
|
87 |
}}} |
|
88 |
||
89 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
90 |
% Configuring the theme |
|
91 |
%\setbeamercolor{normal text}{fg=white} |
|
92 |
%\setbeamercolor{background canvas}{bg=black} |
|
93 |
||
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
94 |
|
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
95 |
|
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
96 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
97 |
% Title page |
294 | 98 |
\title[3D Plotting]{3D data Visualization} |
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
99 |
|
294 | 100 |
\author[FOSSEE] {FOSSEE} |
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
101 |
|
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
102 |
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay} |
294 | 103 |
\date[] {8 November, 2009\\Day 2, Session 5} |
104 |
||
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
105 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
106 |
|
294 | 107 |
%\pgfdeclareimage[height=0.75cm]{iitblogo}{iitblogo} |
108 |
%\logo{\pgfuseimage{iitblogo}} |
|
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
109 |
|
294 | 110 |
\AtBeginSection[] |
111 |
{ |
|
112 |
\begin{frame}<beamer> |
|
113 |
\frametitle{Outline} |
|
114 |
\tableofcontents[currentsection,currentsubsection] |
|
115 |
\end{frame} |
|
116 |
} |
|
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
117 |
|
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
118 |
%% Delete this, if you do not want the table of contents to pop up at |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
119 |
%% the beginning of each subsection: |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
120 |
\AtBeginSubsection[] |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
121 |
{ |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
122 |
\begin{frame}<beamer> |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
123 |
\frametitle{Outline} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
124 |
\tableofcontents[currentsection,currentsubsection] |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
125 |
\end{frame} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
126 |
} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
127 |
|
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
128 |
\AtBeginSection[] |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
129 |
{ |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
130 |
\begin{frame}<beamer> |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
131 |
\frametitle{Outline} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
132 |
\tableofcontents[currentsection,currentsubsection] |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
133 |
\end{frame} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
134 |
} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
135 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
136 |
% DOCUMENT STARTS |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
137 |
\begin{document} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
138 |
|
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
139 |
\begin{frame} |
294 | 140 |
\maketitle |
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
141 |
\end{frame} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
142 |
|
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
143 |
\begin{frame} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
144 |
\frametitle{Outline} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
145 |
\tableofcontents |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
146 |
% You might wish to add the option [pausesections] |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
147 |
\end{frame} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
148 |
|
294 | 149 |
\section{3D Data Visualization} |
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
150 |
|
294 | 151 |
\begin{frame} |
152 |
\frametitle{What is visualization?} |
|
153 |
\Large |
|
154 |
\begin{center} |
|
155 |
Visual representation of data |
|
156 |
\end{center} |
|
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
157 |
\end{frame} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
158 |
|
171
29c0c504750c
Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents:
154
diff
changeset
|
159 |
|
294 | 160 |
%% \begin{frame} |
161 |
%% \frametitle{Is this new?} |
|
162 |
%% \begin{center} |
|
163 |
%% We have moved from: |
|
164 |
%% \end{center} |
|
165 |
%% \begin{columns} |
|
166 |
%% \column{} |
|
167 |
%% \hspace*{-1in} |
|
168 |
%% \includegraphics[width=1.75in,height=1.75in, interpolate=true]{data/3832} |
|
169 |
%% \column{}\hspace*{-0.25in} |
|
170 |
%% To |
|
171 |
%% \column{} |
|
172 |
%% \hspace*{-1in} |
|
173 |
%% \includegraphics[width=1.75in, height=1.75in, interpolate=true]{data/torus} |
|
174 |
%% \end{columns} |
|
175 |
%% \end{frame} |
|
288
c4e25269a86c
Reorganized slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
263
diff
changeset
|
176 |
|
294 | 177 |
\begin{frame} |
178 |
\frametitle{3D visualization} |
|
179 |
\Large |
|
180 |
\begin{center} |
|
181 |
Harder but important |
|
182 |
\end{center} |
|
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
183 |
\end{frame} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
184 |
|
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
185 |
\begin{frame} |
294 | 186 |
\frametitle{Is this Graphics?} |
187 |
\Large |
|
188 |
\begin{center} |
|
189 |
Visualization is about data! |
|
190 |
\end{center} |
|
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
191 |
\end{frame} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
192 |
|
294 | 193 |
\begin{frame} |
194 |
\frametitle{Examples: trajectory in space} |
|
195 |
\Large |
|
196 |
\begin{center} |
|
197 |
\pgfimage[width=2.5in]{MEDIA/m2/mlab/plot3d_ex} |
|
198 |
\end{center} |
|
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
199 |
\end{frame} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
200 |
|
294 | 201 |
\begin{frame} |
202 |
\frametitle{Examples: Fire in a room} |
|
203 |
\Large |
|
204 |
\begin{center} |
|
205 |
Demo of data |
|
206 |
\end{center} |
|
207 |
\inctime{10} |
|
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
208 |
\end{frame} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
209 |
|
294 | 210 |
\section{Tools available} |
211 |
||
212 |
\subsection{mlab} |
|
171
29c0c504750c
Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents:
154
diff
changeset
|
213 |
|
294 | 214 |
\begin{frame} |
215 |
{Overview} |
|
216 |
\Large |
|
217 |
\begin{itemize} |
|
218 |
\item Simple |
|
219 |
\item Convenient |
|
220 |
\item Full-featured |
|
171
29c0c504750c
Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents:
154
diff
changeset
|
221 |
\end{itemize} |
29c0c504750c
Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents:
154
diff
changeset
|
222 |
\end{frame} |
29c0c504750c
Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents:
154
diff
changeset
|
223 |
|
29c0c504750c
Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents:
154
diff
changeset
|
224 |
\begin{frame}[fragile] |
294 | 225 |
|
226 |
\frametitle{Getting started} |
|
227 |
\myemph{\Large Vanilla:} |
|
228 |
\begin{lstlisting}[language=bash] |
|
229 |
$ ipython -wthread |
|
230 |
\end{lstlisting} |
|
231 |
\myemph{\Large with Pylab:} |
|
232 |
\begin{lstlisting}[language=bash] |
|
233 |
$ ipython -pylab -wthread |
|
234 |
\end{lstlisting} |
|
235 |
\end{frame} |
|
236 |
||
237 |
\begin{frame}[fragile] |
|
238 |
\frametitle{Using mlab} |
|
239 |
||
240 |
\begin{lstlisting} |
|
241 |
In []:from enthought.mayavi import mlab |
|
242 |
\end{lstlisting} |
|
243 |
||
244 |
\vspace*{0.5in} |
|
245 |
||
246 |
\myemph{\Large Try these} |
|
247 |
||
248 |
\vspace*{0.25in} |
|
249 |
||
250 |
\begin{lstlisting} |
|
251 |
In []: mlab.test_<TAB> |
|
252 |
In []: mlab.test_contour3d() |
|
253 |
In []: mlab.test_contour3d?? |
|
254 |
\end{lstlisting} |
|
255 |
\end{frame} |
|
256 |
||
257 |
\begin{frame} |
|
258 |
{Exploring the view} |
|
259 |
\begin{columns} |
|
260 |
\column{0.6\textwidth} |
|
261 |
\pgfimage[width=3in]{MEDIA/m2/contour3d} |
|
262 |
\column{0.4\textwidth} |
|
263 |
\begin{itemize} |
|
264 |
\item Mouse |
|
265 |
\item Keyboard |
|
266 |
\item Toolbar |
|
267 |
\item Mayavi icon\pgfimage[width=0.2in]{MEDIA/m2/m2_icon} |
|
268 |
\end{itemize} |
|
269 |
\end{columns} |
|
270 |
\end{frame} |
|
271 |
||
272 |
\begin{frame}[fragile] |
|
273 |
\frametitle{Clearing the plot area} |
|
274 |
\PythonCode{In []: mlab.clf()} |
|
275 |
\end{frame} |
|
276 |
||
277 |
\begin{frame}[fragile] |
|
278 |
\frametitle{\mlab\ plotting functions} |
|
279 |
\begin{columns} |
|
280 |
\column{0.25\textwidth} |
|
281 |
\myemph{\Large 0D data} |
|
282 |
\column{0.5\textwidth} |
|
283 |
\pgfimage[width=2in]{MEDIA/m2/mlab/points3d_ex} |
|
284 |
\end{columns} |
|
285 |
||
286 |
\begin{lstlisting} |
|
287 |
In []: t = linspace(0, 2*pi, 50) |
|
288 |
In []: u = cos(t) * pi |
|
289 |
In []: x, y, z = sin(u), cos(u), sin(t) |
|
290 |
\end{lstlisting} |
|
291 |
\emphbar{\PythonCode{In []: mlab.points3d(x, y, z)}} |
|
292 |
\end{frame} |
|
171
29c0c504750c
Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents:
154
diff
changeset
|
293 |
|
294 | 294 |
\begin{frame} |
295 |
\begin{columns} |
|
296 |
\column{0.25\textwidth} |
|
297 |
\myemph{\Large 1D data} |
|
298 |
\column{0.5\textwidth} |
|
299 |
\pgfimage[width=2.5in]{MEDIA/m2/mlab/plot3d_ex} |
|
300 |
\end{columns} |
|
301 |
\PythonCode{In []: mlab.clf()} |
|
302 |
\emphbar{\PythonCode{In []: mlab.plot3d(x, y, z, t)}} |
|
303 |
||
304 |
Plots lines between the points |
|
305 |
||
306 |
\end{frame} |
|
307 |
||
308 |
\begin{frame}[fragile] |
|
309 |
\begin{columns} |
|
310 |
\column{0.25\textwidth} |
|
311 |
\myemph{\Large 2D data} |
|
312 |
\column{0.5\textwidth} |
|
313 |
\pgfimage[width=2in]{MEDIA/m2/mlab/surf_ex} |
|
314 |
\end{columns} |
|
315 |
\begin{lstlisting} |
|
316 |
In []: x, y = mgrid[-3:3:100j,-3:3:100j] |
|
317 |
In []: z = sin(x*x + y*y) |
|
318 |
\end{lstlisting} |
|
319 |
||
320 |
\emphbar{\PythonCode{In []: mlab.surf(x, y, z)}} |
|
321 |
||
322 |
\alert{Assumes the points are rectilinear} |
|
323 |
||
324 |
\end{frame} |
|
325 |
||
326 |
\begin{frame}[fragile] |
|
327 |
\frametitle{mgrid} |
|
328 |
\begin{lstlisting} |
|
329 |
In []: mgrid[0:3,0:3] |
|
330 |
Out[]: |
|
331 |
array([[[0, 0, 0], |
|
332 |
[1, 1, 1], |
|
333 |
[2, 2, 2]], |
|
263
8a4a1e5aec85
Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents:
256
diff
changeset
|
334 |
|
294 | 335 |
[[0, 1, 2], |
336 |
[0, 1, 2], |
|
337 |
[0, 1, 2]]]) |
|
338 |
||
339 |
In []: mgrid[-1:1:5j] |
|
340 |
Out[]: array([-1., -0.5, 0., 0.5, 1.]) |
|
341 |
\end{lstlisting} |
|
342 |
\end{frame} |
|
343 |
||
344 |
\begin{frame}[fragile] |
|
345 |
\frametitle{Example} |
|
346 |
\begin{lstlisting} |
|
347 |
In []: x, y = mgrid[-1:1:5j, -1:1:5j] |
|
348 |
In []: z = x*x + y*y |
|
349 |
||
350 |
In []: z |
|
351 |
Out[]: |
|
352 |
array([[ 2. , 1.25, 1. , 1.25, 2. ], |
|
353 |
[ 1.25, 0.5 , 0.25, 0.5 , 1.25], |
|
354 |
[ 1. , 0.25, 0. , 0.25, 1. ], |
|
355 |
[ 1.25, 0.5 , 0.25, 0.5 , 1.25], |
|
356 |
[ 2. , 1.25, 1. , 1.25, 2. ]]) |
|
357 |
\end{lstlisting} |
|
358 |
\end{frame} |
|
359 |
||
360 |
\begin{frame}[fragile] |
|
361 |
\myemph{\Large 2D data: \texttt{mlab.mesh}} |
|
362 |
\vspace*{0.25in} |
|
363 |
||
364 |
\emphbar{\PythonCode{In []: mlab.mesh(x, y, z)}} |
|
365 |
||
366 |
\alert{Points needn't be regular} |
|
367 |
||
368 |
\vspace*{0.25in} |
|
369 |
\begin{lstlisting} |
|
370 |
In []: phi, theta = mgrid[0:pi:20j, |
|
371 |
... 0:2*pi:20j] |
|
372 |
In []: x = sin(phi)*cos(theta) |
|
373 |
In []: y = sin(phi)*sin(theta) |
|
374 |
In []: z = cos(phi) |
|
375 |
In []: mlab.mesh(x, y, z, |
|
376 |
... representation= |
|
377 |
... 'wireframe') |
|
378 |
\end{lstlisting} |
|
379 |
||
171
29c0c504750c
Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents:
154
diff
changeset
|
380 |
\end{frame} |
29c0c504750c
Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents:
154
diff
changeset
|
381 |
|
29c0c504750c
Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents:
154
diff
changeset
|
382 |
\begin{frame}[fragile] |
29c0c504750c
Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents:
154
diff
changeset
|
383 |
|
294 | 384 |
\begin{columns} |
385 |
\column{0.25\textwidth} |
|
386 |
\myemph{\Large 3D data} |
|
387 |
\column{0.5\textwidth} |
|
388 |
\pgfimage[width=1.5in]{MEDIA/m2/mlab/contour3d}\\ |
|
389 |
\end{columns} |
|
390 |
\begin{lstlisting} |
|
391 |
In []: x, y, z = mgrid[-5:5:64j, |
|
392 |
... -5:5:64j, |
|
393 |
... -5:5:64j] |
|
394 |
In []: mlab.contour3d(x*x*0.5 + y*y + |
|
395 |
z*z*2) |
|
396 |
\end{lstlisting} |
|
171
29c0c504750c
Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents:
154
diff
changeset
|
397 |
\end{frame} |
29c0c504750c
Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents:
154
diff
changeset
|
398 |
|
29c0c504750c
Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents:
154
diff
changeset
|
399 |
\begin{frame}[fragile] |
294 | 400 |
|
401 |
\myemph{\Large 3D vector data: \PythonCode{mlab.quiver3d}} |
|
402 |
\vspace*{0.25in} |
|
403 |
||
404 |
\pgfimage[width=2in]{MEDIA/m2/mlab/quiver3d_ex}\\ |
|
405 |
||
406 |
\begin{lstlisting} |
|
407 |
In []: mlab.test_quiver3d() |
|
408 |
\end{lstlisting} |
|
409 |
||
410 |
\emphbar{\PythonCode{obj = mlab.quiver3d(x, y, z, u, v, w)}} |
|
411 |
\inctime{20} |
|
412 |
\end{frame} |
|
413 |
||
414 |
||
415 |
\subsection{Mayavi2} |
|
416 |
||
417 |
\begin{frame} |
|
418 |
\frametitle{Introduction to Mayavi} |
|
419 |
\begin{itemize} |
|
420 |
\item Most scientists not interested in details of visualization |
|
421 |
\item Visualization of data files with a nice UI |
|
422 |
\item Interactive visualization of data (think Matlab) |
|
423 |
\item Embedding visualizations in applications |
|
424 |
\item Customization |
|
425 |
\end{itemize} |
|
426 |
\pause |
|
427 |
\begin{block}{The Goal} |
|
428 |
Provide a \alert{flexible} library/app for all of these needs! |
|
429 |
\end{block} |
|
430 |
\end{frame} |
|
431 |
||
432 |
\begin{frame} |
|
433 |
{Overview of features} |
|
434 |
\vspace*{-0.3in} |
|
435 |
\begin{center} |
|
436 |
\hspace*{-0.2in}\pgfimage[width=5in]{MEDIA/m2/m2_app3_3} |
|
437 |
\end{center} |
|
438 |
\end{frame} |
|
439 |
||
440 |
||
441 |
\begin{frame} |
|
442 |
\frametitle{Mayavi in applications} |
|
443 |
\vspace*{-0.3in} |
|
444 |
\begin{center} |
|
445 |
\hspace*{-0.2in}\pgfimage[width=4.5in]{MEDIA/m2/m2_envisage} |
|
446 |
\end{center} |
|
447 |
\end{frame} |
|
448 |
||
449 |
\begin{frame} |
|
450 |
\frametitle{Live in your dialogs} |
|
451 |
\vspace*{0.1in} |
|
452 |
\begin{center} |
|
453 |
\hspace*{-0.2in}\pgfimage[width=2.5in]{MEDIA/m2/mlab_tui} |
|
454 |
\end{center} |
|
455 |
\end{frame} |
|
456 |
||
457 |
\begin{frame} |
|
458 |
{Exploring the documentation} |
|
459 |
\begin{center} |
|
460 |
\pgfimage[width=4in]{MEDIA/m2/m2_ug_doc} |
|
461 |
\end{center} |
|
462 |
\end{frame} |
|
463 |
||
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
464 |
|
294 | 465 |
\begin{frame} |
466 |
\frametitle{Summary} |
|
467 |
\begin{itemize} |
|
468 |
\item \url{http://code.enthought.com/projects/mayavi} |
|
469 |
\item Uses VTK (\url{www.vtk.org}) |
|
470 |
\item BSD license |
|
471 |
\item Linux, win32 and Mac OS X |
|
472 |
\item Highly scriptable |
|
473 |
\item Embed in Traits UIs (wxPython and PyQt4) |
|
474 |
\item Envisage Plugins |
|
475 |
\item Debian/Ubuntu/Fedora |
|
476 |
\item \alert{Pythonic} |
|
477 |
\end{itemize} |
|
478 |
||
479 |
\inctime{10} |
|
480 |
||
481 |
\end{frame} |
|
482 |
||
483 |
\begin{frame} |
|
484 |
{Getting hands dirty!} |
|
485 |
||
486 |
\begin{block}{Motivational problem} |
|
487 |
Atmospheric data of temperature over the surface of the earth. |
|
488 |
Let temperature ($T$) vary linearly with height ($z$): |
|
489 |
\begin{center} |
|
490 |
$T = 288.15 - 6.5z$ |
|
491 |
\end{center} |
|
492 |
\end{block} |
|
493 |
\end{frame} |
|
494 |
||
495 |
\begin{frame}[fragile] |
|
496 |
\frametitle{Simple solution} |
|
497 |
||
498 |
\begin{lstlisting} |
|
499 |
lat = linspace(-89, 89, 37) |
|
500 |
lon = linspace(0, 360, 37) |
|
501 |
z = linspace(0, 100, 11) |
|
502 |
\end{lstlisting} |
|
503 |
\pause |
|
504 |
\begin{lstlisting} |
|
505 |
x, y, z = mgrid[0:360:37j,-89:89:37j, |
|
506 |
0:100:11j] |
|
507 |
t = 288.15 - 6.5*z |
|
508 |
mlab.contour3d(x, y, z, t) |
|
509 |
mlab.outline() |
|
510 |
mlab.colorbar() |
|
511 |
\end{lstlisting} |
|
512 |
\end{frame} |
|
513 |
||
514 |
\begin{frame}[fragile] |
|
515 |
\frametitle{Exercise: Lorenz equation} |
|
516 |
\begin{columns} |
|
517 |
\column{0.25\textwidth} |
|
518 |
\begin{eqnarray*} |
|
519 |
\frac{d x}{dt} &=& s (y-x)\\ |
|
520 |
\frac{d y}{d t} &=& rx -y -xz\\ |
|
521 |
\frac{d z}{d t} &=& xy - bz\\ |
|
522 |
\end{eqnarray*} |
|
523 |
\column{0.25\textwidth} |
|
524 |
Let $s=10,$ |
|
525 |
$r=28,$ |
|
526 |
$b=8./3.$ |
|
527 |
\end{columns} |
|
528 |
\structure{\Large Region of interest} |
|
529 |
\begin{lstlisting} |
|
530 |
x, y, z = mgrid[-50:50:20j,-50:50:20j, |
|
531 |
-10:60:20j] |
|
532 |
\end{lstlisting} |
|
533 |
\inctime{20} |
|
534 |
||
535 |
\end{frame} |
|
536 |
\begin{frame}[fragile] |
|
537 |
\frametitle{Solution} |
|
538 |
\begin{lstlisting} |
|
539 |
def lorenz(x,y,z,s=10.,r=28.,b=8./3.): |
|
540 |
u = s*(y-x) |
|
541 |
v = r*x-y-x*z |
|
542 |
w = x*y-b*z |
|
543 |
return u,v,w |
|
544 |
x,y,z = mgrid [-50:50:20j,-50:50:20j, |
|
545 |
-10:60:20j ] |
|
546 |
u,v,w = lorenz( x , y , z ) |
|
547 |
# Your plot here |
|
548 |
# |
|
549 |
mlab.show() |
|
550 |
||
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
551 |
\end{lstlisting} |
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
552 |
\end{frame} |
219
f6725f6bee41
Session 4, Debugging and Testing.
Shantanu <shantanu@fossee.in>
parents:
215
diff
changeset
|
553 |
|
f6725f6bee41
Session 4, Debugging and Testing.
Shantanu <shantanu@fossee.in>
parents:
215
diff
changeset
|
554 |
\begin{frame} |
294 | 555 |
\frametitle{We have covered:} |
220
15306dad3b81
Corrections to day1 Session1, day2 Session 3 and 4.
Shantanu <shantanu@fossee.in>
parents:
219
diff
changeset
|
556 |
\begin{itemize} |
294 | 557 |
\item Need of visualization. |
558 |
\item Using mlab to create 3 D plots. |
|
559 |
\item Mayavi Toolkit. |
|
220
15306dad3b81
Corrections to day1 Session1, day2 Session 3 and 4.
Shantanu <shantanu@fossee.in>
parents:
219
diff
changeset
|
560 |
\end{itemize} |
219
f6725f6bee41
Session 4, Debugging and Testing.
Shantanu <shantanu@fossee.in>
parents:
215
diff
changeset
|
561 |
\end{frame} |
220
15306dad3b81
Corrections to day1 Session1, day2 Session 3 and 4.
Shantanu <shantanu@fossee.in>
parents:
219
diff
changeset
|
562 |
|
294 | 563 |
\end{document} |
154
66b117b7edc7
Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff
changeset
|
564 |