author | Puneeth Chaganti <punchagan@fossee.in> |
Fri, 09 Oct 2009 12:55:34 +0530 | |
changeset 84 | 338b85a9c864 |
parent 76 | b24c2560f626 |
child 96 | a749db24e73b |
permissions | -rw-r--r-- |
46
63704b5650f1
Changed the copyright and Institute for all the sessions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
1 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
63704b5650f1
Changed the copyright and Institute for all the sessions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
2 |
% Tutorial slides on Python. |
63704b5650f1
Changed the copyright and Institute for all the sessions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
3 |
% |
63704b5650f1
Changed the copyright and Institute for all the sessions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
4 |
% Author: Prabhu Ramachandran <prabhu at aero.iitb.ac.in> |
63704b5650f1
Changed the copyright and Institute for all the sessions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
5 |
% Copyright (c) 2005-2009, Prabhu Ramachandran |
63704b5650f1
Changed the copyright and Institute for all the sessions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
6 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
22 | 7 |
|
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} |
|
15 |
||
16 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
17 |
% Note that in presentation mode |
|
18 |
% \paperwidth 364.19536pt |
|
19 |
% \paperheight 273.14662pt |
|
20 |
% h/w = 0.888 |
|
21 |
||
22 |
||
23 |
\mode<presentation> |
|
24 |
{ |
|
56
7a8cb7b07ebb
Added testing examples in session-3.
Shantanu <shantanu@fossee.in>
parents:
46
diff
changeset
|
25 |
\usetheme{Warsaw} |
22 | 26 |
%\usetheme{Boadilla} |
27 |
%\usetheme{default} |
|
28 |
\useoutertheme{split} |
|
29 |
\setbeamercovered{transparent} |
|
30 |
} |
|
31 |
||
32 |
% To remove navigation symbols |
|
33 |
\setbeamertemplate{navigation symbols}{} |
|
34 |
||
35 |
\usepackage{amsmath} |
|
36 |
\usepackage[english]{babel} |
|
37 |
\usepackage[latin1]{inputenc} |
|
38 |
\usepackage{times} |
|
39 |
\usepackage[T1]{fontenc} |
|
40 |
||
41 |
% Taken from Fernando's slides. |
|
42 |
\usepackage{ae,aecompl} |
|
43 |
\usepackage{mathpazo,courier,euler} |
|
44 |
\usepackage[scaled=.95]{helvet} |
|
45 |
\usepackage{pgf} |
|
46 |
||
47 |
\definecolor{darkgreen}{rgb}{0,0.5,0} |
|
48 |
||
49 |
\usepackage{listings} |
|
50 |
\lstset{language=Python, |
|
23
14c817585247
Added Exercise for testing in Session3.
Shantanu <shantanu@fossee.in>
parents:
22
diff
changeset
|
51 |
basicstyle=\ttfamily\bfseries, |
14c817585247
Added Exercise for testing in Session3.
Shantanu <shantanu@fossee.in>
parents:
22
diff
changeset
|
52 |
commentstyle=\color{red}\itshape, |
22 | 53 |
stringstyle=\color{darkgreen}, |
54 |
showstringspaces=false, |
|
55 |
keywordstyle=\color{blue}\bfseries} |
|
56 |
||
57 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
58 |
% My Macros |
|
59 |
\setbeamercolor{postit}{bg=yellow,fg=black} |
|
60 |
\setbeamercolor{emphbar}{bg=blue!20, fg=black} |
|
61 |
\newcommand{\emphbar}[1] |
|
62 |
{\begin{beamercolorbox}[rounded=true]{emphbar} |
|
63 |
{#1} |
|
64 |
\end{beamercolorbox} |
|
65 |
} |
|
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 |
||
78 |
\newcounter{time} |
|
79 |
\setcounter{time}{0} |
|
80 |
\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\vspace*{0.1in}\tiny \thetime\ m}} |
|
81 |
||
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 |
||
94 |
||
95 |
||
96 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
97 |
% Title page |
|
61
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
98 |
\title[]{3D data Visualization} |
22 | 99 |
|
100 |
\author[FOSSEE Team] {Asokan Pichai\\Prabhu Ramachandran} |
|
101 |
||
46
63704b5650f1
Changed the copyright and Institute for all the sessions.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
23
diff
changeset
|
102 |
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay} |
22 | 103 |
\date[] {11, October 2009} |
104 |
\date[] % (optional) |
|
105 |
} |
|
106 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
107 |
||
108 |
%\pgfdeclareimage[height=0.75cm]{iitblogo}{iitblogo} |
|
109 |
%\logo{\pgfuseimage{iitblogo}} |
|
110 |
||
111 |
\AtBeginSection[] |
|
112 |
{ |
|
113 |
\begin{frame}<beamer> |
|
114 |
\frametitle{Outline} |
|
115 |
\Large |
|
116 |
\tableofcontents[currentsection,currentsubsection] |
|
117 |
\end{frame} |
|
118 |
} |
|
119 |
||
120 |
%% Delete this, if you do not want the table of contents to pop up at |
|
121 |
%% the beginning of each subsection: |
|
122 |
\AtBeginSubsection[] |
|
123 |
{ |
|
124 |
\begin{frame}<beamer> |
|
125 |
\frametitle{Outline} |
|
126 |
\tableofcontents[currentsection,currentsubsection] |
|
127 |
\end{frame} |
|
128 |
} |
|
129 |
||
130 |
\AtBeginSection[] |
|
131 |
{ |
|
132 |
\begin{frame}<beamer> |
|
133 |
\frametitle{Outline} |
|
134 |
\tableofcontents[currentsection,currentsubsection] |
|
135 |
\end{frame} |
|
136 |
} |
|
137 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
138 |
% DOCUMENT STARTS |
|
139 |
\begin{document} |
|
140 |
||
141 |
\begin{frame} |
|
142 |
\maketitle |
|
143 |
\end{frame} |
|
144 |
||
145 |
\begin{frame} |
|
146 |
\frametitle{Outline} |
|
147 |
\Large |
|
148 |
\tableofcontents |
|
149 |
% You might wish to add the option [pausesections] |
|
150 |
\end{frame} |
|
151 |
||
152 |
\section{3D Data Visualization} |
|
153 |
||
154 |
\begin{frame} |
|
155 |
\frametitle{What is visualization?} |
|
156 |
\Large |
|
157 |
\begin{center} |
|
158 |
Visual representation of data |
|
159 |
\end{center} |
|
160 |
\end{frame} |
|
161 |
||
162 |
\begin{frame} |
|
163 |
\frametitle{3D visualization} |
|
164 |
\Large |
|
165 |
\begin{center} |
|
166 |
Harder but important |
|
167 |
\end{center} |
|
168 |
\end{frame} |
|
169 |
||
170 |
\begin{frame} |
|
171 |
\frametitle{Is this Graphics?} |
|
172 |
\Large |
|
173 |
\begin{center} |
|
174 |
Visualization is about data! |
|
175 |
\end{center} |
|
176 |
\end{frame} |
|
177 |
||
178 |
\begin{frame} |
|
179 |
\frametitle{Examples: trajectory in space} |
|
180 |
\Large |
|
181 |
\begin{center} |
|
182 |
\pgfimage[width=2.5in]{MEDIA/m2/mlab/plot3d_ex} |
|
183 |
\end{center} |
|
184 |
\end{frame} |
|
185 |
||
186 |
\begin{frame} |
|
187 |
\frametitle{Examples: Fire in a room} |
|
188 |
\Large |
|
189 |
\begin{center} |
|
190 |
Demo of data |
|
191 |
\end{center} |
|
192 |
\inctime{10} |
|
193 |
\end{frame} |
|
194 |
||
72
1c1d6aaa2be3
Added first cut of Day2 handout; Minor edits to sessions 2 and 3.
Puneeth Chaganti <punchagan@fossee.in>
parents:
61
diff
changeset
|
195 |
\section{Tools at your disposal} |
22 | 196 |
|
76
b24c2560f626
Added links.tex, compilation of various links.
Shantanu <shantanu@fossee.in>
parents:
72
diff
changeset
|
197 |
\subsection{Mayavi2} |
61
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
198 |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
199 |
\begin{frame} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
200 |
\frametitle{Introduction to Mayavi} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
201 |
\begin{itemize} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
202 |
\item Most scientists not interested in details of visualization |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
203 |
\item Visualization of data files with a nice UI |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
204 |
\item Interactive visualization of data (think Matlab) |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
205 |
\item Embedding visualizations in applications |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
206 |
\item Customization |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
207 |
\end{itemize} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
208 |
\pause |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
209 |
\begin{block}{The Goal} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
210 |
Provide a \alert{flexible} library/app for every one of these needs! |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
211 |
\end{block} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
212 |
\end{frame} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
213 |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
214 |
\begin{frame} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
215 |
{Overview of features} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
216 |
\vspace*{-0.3in} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
217 |
\begin{center} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
218 |
\hspace*{-0.2in}\pgfimage[width=5in]{MEDIA/m2/m2_app3_3} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
219 |
\end{center} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
220 |
\end{frame} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
221 |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
222 |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
223 |
\begin{frame} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
224 |
\frametitle{Mayavi in applications} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
225 |
\vspace*{-0.3in} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
226 |
\begin{center} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
227 |
\hspace*{-0.2in}\pgfimage[width=4.5in]{MEDIA/m2/m2_envisage} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
228 |
\end{center} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
229 |
\end{frame} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
230 |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
231 |
\begin{frame} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
232 |
{Exploring the documentation} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
233 |
\begin{center} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
234 |
\pgfimage[width=4in]{MEDIA/m2/m2_ug_doc} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
235 |
\end{center} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
236 |
\end{frame} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
237 |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
238 |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
239 |
\begin{frame} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
240 |
\frametitle{Summary} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
241 |
\begin{itemize} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
242 |
\item \url{http://code.enthought.com/projects/mayavi} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
243 |
\item Uses VTK (\url{www.vtk.org}) |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
244 |
\item BSD license |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
245 |
\item Linux, win32 and Mac OS X |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
246 |
\item Highly scriptable |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
247 |
\item Embed in Traits UIs (wxPython and PyQt4) |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
248 |
\item Envisage Plugins |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
249 |
\item Debian/Ubuntu/Fedora |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
250 |
\item \alert{Pythonic} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
251 |
\end{itemize} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
252 |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
253 |
\inctime{10} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
254 |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
255 |
\end{frame} |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
256 |
|
22 | 257 |
\subsection{mlab} |
258 |
||
23
14c817585247
Added Exercise for testing in Session3.
Shantanu <shantanu@fossee.in>
parents:
22
diff
changeset
|
259 |
\begin{frame} |
22 | 260 |
{Overview} |
261 |
\Large |
|
262 |
\begin{itemize} |
|
263 |
\item Simple |
|
264 |
\item Convenient |
|
265 |
\item Full-featured |
|
266 |
\end{itemize} |
|
267 |
\end{frame} |
|
268 |
||
269 |
\begin{frame}[fragile] |
|
270 |
||
271 |
\frametitle{Getting started} |
|
272 |
\myemph{\Large Vanilla:} |
|
273 |
\begin{lstlisting}[language=bash] |
|
274 |
$ ipython -wthread |
|
275 |
\end{lstlisting} |
|
276 |
\myemph{\Large with Pylab:} |
|
277 |
\begin{lstlisting}[language=bash] |
|
278 |
$ ipython -pylab -wthread |
|
279 |
\end{lstlisting} |
|
280 |
\end{frame} |
|
281 |
||
282 |
\begin{frame}[fragile] |
|
72
1c1d6aaa2be3
Added first cut of Day2 handout; Minor edits to sessions 2 and 3.
Puneeth Chaganti <punchagan@fossee.in>
parents:
61
diff
changeset
|
283 |
\frametitle{Using mlab} |
22 | 284 |
|
285 |
\begin{lstlisting} |
|
286 |
>>> from enthought.mayavi import mlab |
|
287 |
\end{lstlisting} |
|
288 |
||
289 |
\vspace*{0.5in} |
|
290 |
||
72
1c1d6aaa2be3
Added first cut of Day2 handout; Minor edits to sessions 2 and 3.
Puneeth Chaganti <punchagan@fossee.in>
parents:
61
diff
changeset
|
291 |
\myemph{\Large Try these} |
22 | 292 |
|
293 |
\vspace*{0.25in} |
|
294 |
||
295 |
\begin{lstlisting} |
|
296 |
>>> mlab.test_<TAB> |
|
297 |
>>> mlab.test_contour3d() |
|
298 |
>>> mlab.test_contour3d?? |
|
299 |
\end{lstlisting} |
|
300 |
\end{frame} |
|
301 |
||
23
14c817585247
Added Exercise for testing in Session3.
Shantanu <shantanu@fossee.in>
parents:
22
diff
changeset
|
302 |
\begin{frame} |
22 | 303 |
{Exploring the view} |
304 |
\begin{columns} |
|
305 |
\column{0.6\textwidth} |
|
306 |
\pgfimage[width=3in]{MEDIA/m2/contour3d} |
|
307 |
\column{0.4\textwidth} |
|
308 |
\begin{itemize} |
|
309 |
\item Mouse |
|
310 |
\item Keyboard |
|
311 |
\item Toolbar |
|
61
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
312 |
\item Mayavi icon\pgfimage[width=0.2in]{MEDIA/m2/m2_icon} |
22 | 313 |
\end{itemize} |
314 |
\end{columns} |
|
315 |
\end{frame} |
|
316 |
||
317 |
\begin{frame}[fragile] |
|
318 |
\frametitle{\mlab\ plotting functions} |
|
319 |
\begin{columns} |
|
320 |
\column{0.25\textwidth} |
|
321 |
\myemph{\Large 0D data} |
|
322 |
\column{0.5\textwidth} |
|
323 |
\pgfimage[width=2in]{MEDIA/m2/mlab/points3d_ex} |
|
324 |
\end{columns} |
|
325 |
||
326 |
\begin{lstlisting} |
|
327 |
>>> from numpy import * |
|
328 |
>>> t = linspace(0, 2*pi, 50) |
|
329 |
>>> u = cos(t)*pi |
|
330 |
>>> x, y, z = sin(u), cos(u), sin(t) |
|
331 |
\end{lstlisting} |
|
332 |
\emphbar{\PythonCode{>>> mlab.points3d(x, y, z)}} |
|
333 |
\end{frame} |
|
334 |
||
335 |
\begin{frame} |
|
336 |
\begin{columns} |
|
337 |
\column{0.25\textwidth} |
|
338 |
\myemph{\Large 1D data} |
|
339 |
\column{0.5\textwidth} |
|
340 |
\pgfimage[width=2.5in]{MEDIA/m2/mlab/plot3d_ex} |
|
341 |
\end{columns} |
|
342 |
\emphbar{\PythonCode{>>> mlab.plot3d(x, y, z, t)}} |
|
343 |
||
344 |
Plots lines between the points |
|
345 |
||
346 |
\end{frame} |
|
347 |
||
348 |
\begin{frame}[fragile] |
|
349 |
\begin{columns} |
|
350 |
\column{0.25\textwidth} |
|
351 |
\myemph{\Large 2D data} |
|
352 |
\column{0.5\textwidth} |
|
353 |
\pgfimage[width=2in]{MEDIA/m2/mlab/surf_ex} |
|
354 |
\end{columns} |
|
355 |
\begin{lstlisting} |
|
356 |
>>> x = mgrid[-3:3:100j,-3:3:100j] |
|
357 |
>>> z = sin(x*x + y*y) |
|
358 |
\end{lstlisting} |
|
359 |
||
360 |
\emphbar{\PythonCode{>>> mlab.surf(x, y, z)}} |
|
361 |
||
362 |
\alert{Assumes the points are rectilinear} |
|
363 |
||
364 |
\end{frame} |
|
365 |
||
366 |
\begin{frame}[fragile] |
|
367 |
\myemph{\Large 2D data: \texttt{mlab.mesh}} |
|
368 |
\vspace*{0.25in} |
|
369 |
||
370 |
\emphbar{\PythonCode{>>> mlab.mesh(x, y, z)}} |
|
371 |
||
372 |
\alert{Points needn't be regular} |
|
373 |
||
374 |
\vspace*{0.25in} |
|
375 |
\begin{lstlisting} |
|
376 |
>>> phi, theta = numpy.mgrid[0:pi:20j, |
|
377 |
... 0:2*pi:20j] |
|
378 |
>>> x = sin(phi)*cos(theta) |
|
379 |
>>> y = sin(phi)*sin(theta) |
|
380 |
>>> z = cos(phi) |
|
381 |
>>> mlab.mesh(x, y, z, |
|
61
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
382 |
... representation= |
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
383 |
... 'wireframe') |
22 | 384 |
\end{lstlisting} |
385 |
||
386 |
\end{frame} |
|
387 |
||
388 |
\begin{frame}[fragile] |
|
389 |
||
390 |
\begin{columns} |
|
391 |
\column{0.25\textwidth} |
|
392 |
\myemph{\Large 3D data} |
|
393 |
\column{0.5\textwidth} |
|
394 |
\pgfimage[width=1.5in]{MEDIA/m2/mlab/contour3d}\\ |
|
395 |
\end{columns} |
|
396 |
\begin{lstlisting} |
|
397 |
>>> x, y, z = ogrid[-5:5:64j, |
|
398 |
... -5:5:64j, |
|
399 |
... -5:5:64j] |
|
400 |
>>> mlab.contour3d(x*x*0.5 + y*y + |
|
401 |
z*z*2) |
|
402 |
\end{lstlisting} |
|
403 |
\end{frame} |
|
404 |
||
405 |
\begin{frame}[fragile] |
|
406 |
||
407 |
\myemph{\Large 3D vector data: \PythonCode{mlab.quiver3d}} |
|
408 |
\vspace*{0.25in} |
|
409 |
||
410 |
\pgfimage[width=2in]{MEDIA/m2/mlab/quiver3d_ex}\\ |
|
411 |
||
412 |
\begin{lstlisting} |
|
413 |
>>> mlab.test_quiver3d() |
|
414 |
\end{lstlisting} |
|
415 |
||
416 |
\emphbar{\PythonCode{obj = mlab.quiver3d(x, y, z, u, v, w)}} |
|
417 |
\inctime{20} |
|
418 |
\end{frame} |
|
419 |
||
420 |
\begin{frame} |
|
421 |
{Getting hands dirty!} |
|
422 |
||
423 |
\begin{block}{Motivational problem} |
|
424 |
Atmospheric data of temperature over the surface of the earth. |
|
425 |
Let temperature ($T$) vary linearly with height ($z$): |
|
426 |
\begin{center} |
|
427 |
$T = 288.15 - 6.5z$ |
|
428 |
\end{center} |
|
429 |
\end{block} |
|
430 |
\end{frame} |
|
431 |
||
432 |
\begin{frame}[fragile] |
|
433 |
\frametitle{Simple solution} |
|
434 |
||
435 |
\begin{lstlisting} |
|
436 |
lat = linspace(-89, 89, 37) |
|
437 |
lon = linspace(0, 360, 37) |
|
438 |
z = linspace(0, 100, 11) |
|
439 |
\end{lstlisting} |
|
440 |
\pause |
|
441 |
\begin{lstlisting} |
|
442 |
x, y, z = mgrid[0:360:37j,-89:89:37j, |
|
443 |
0:100:11j] |
|
444 |
t = 288.15 - 6.5*z |
|
445 |
mlab.contour3d(x, y, z, t) |
|
446 |
mlab.outline() |
|
447 |
mlab.colorbar() |
|
448 |
\end{lstlisting} |
|
449 |
\end{frame} |
|
450 |
||
451 |
\begin{frame}[fragile] |
|
452 |
\frametitle{Exercise: Lorenz equation} |
|
453 |
\begin{columns} |
|
454 |
\column{0.25\textwidth} |
|
455 |
\begin{eqnarray*} |
|
456 |
\frac{d x}{dt} &=& s (y-x)\\ |
|
457 |
\frac{d y}{d t} &=& rx -y -xz\\ |
|
458 |
\frac{d z}{d t} &=& xy - bz\\ |
|
459 |
\end{eqnarray*} |
|
460 |
\column{0.25\textwidth} |
|
461 |
Let $s=10,$ |
|
462 |
$r=28,$ |
|
463 |
$b=8./3.$ |
|
464 |
\end{columns} |
|
465 |
\structure{\Large Region of interest} |
|
466 |
\begin{lstlisting} |
|
467 |
x, y, z = mgrid[-50:50:20j,-50:50:20j, |
|
468 |
-10:60:20j] |
|
469 |
\end{lstlisting} |
|
470 |
\inctime{20} |
|
471 |
\end{frame} |
|
57
73462010a2fe
Changed theme and other changes session-3.
Shantanu <shantanu@fossee.in>
parents:
56
diff
changeset
|
472 |
|
22 | 473 |
\end{document} |
474 |