| author | Puneeth Chaganti <punchagan@fossee.in> |
| Mon, 12 Oct 2009 16:46:47 +0530 | |
| changeset 104 | 896f96b9de3b |
| parent 97 | 555237dbce44 |
| 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 |
|
|
97
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
100 |
\author[FOSSEE Team] {FOSSEE}
|
| 22 | 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}
|
|
97
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
103 |
\date[]{11, October 2009}
|
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
104 |
%\date[] % (optional) |
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
105 |
|
| 22 | 106 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
107 |
||
108 |
%\pgfdeclareimage[height=0.75cm]{iitblogo}{iitblogo}
|
|
109 |
%\logo{\pgfuseimage{iitblogo}}
|
|
110 |
||
111 |
\AtBeginSection[] |
|
112 |
{
|
|
113 |
\begin{frame}<beamer>
|
|
|
97
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
114 |
\frametitle{Outline}
|
| 22 | 115 |
\tableofcontents[currentsection,currentsubsection] |
116 |
\end{frame}
|
|
117 |
} |
|
118 |
||
119 |
%% Delete this, if you do not want the table of contents to pop up at |
|
120 |
%% the beginning of each subsection: |
|
121 |
\AtBeginSubsection[] |
|
122 |
{
|
|
123 |
\begin{frame}<beamer>
|
|
124 |
\frametitle{Outline}
|
|
125 |
\tableofcontents[currentsection,currentsubsection] |
|
126 |
\end{frame}
|
|
127 |
} |
|
128 |
||
129 |
\AtBeginSection[] |
|
130 |
{
|
|
131 |
\begin{frame}<beamer>
|
|
132 |
\frametitle{Outline}
|
|
133 |
\tableofcontents[currentsection,currentsubsection] |
|
134 |
\end{frame}
|
|
135 |
} |
|
136 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
137 |
% DOCUMENT STARTS |
|
138 |
\begin{document}
|
|
139 |
||
140 |
\begin{frame}
|
|
141 |
\maketitle |
|
142 |
\end{frame}
|
|
143 |
||
144 |
\begin{frame}
|
|
145 |
\frametitle{Outline}
|
|
146 |
\tableofcontents |
|
147 |
% You might wish to add the option [pausesections] |
|
148 |
\end{frame}
|
|
149 |
||
150 |
\section{3D Data Visualization}
|
|
151 |
||
152 |
\begin{frame}
|
|
153 |
\frametitle{What is visualization?}
|
|
154 |
\Large |
|
155 |
\begin{center}
|
|
156 |
Visual representation of data |
|
157 |
\end{center}
|
|
158 |
\end{frame}
|
|
159 |
||
160 |
\begin{frame}
|
|
161 |
\frametitle{3D visualization}
|
|
162 |
\Large |
|
163 |
\begin{center}
|
|
164 |
Harder but important |
|
165 |
\end{center}
|
|
166 |
\end{frame}
|
|
167 |
||
168 |
\begin{frame}
|
|
169 |
\frametitle{Is this Graphics?}
|
|
170 |
\Large |
|
171 |
\begin{center}
|
|
172 |
Visualization is about data! |
|
173 |
\end{center}
|
|
174 |
\end{frame}
|
|
175 |
||
176 |
\begin{frame}
|
|
177 |
\frametitle{Examples: trajectory in space}
|
|
178 |
\Large |
|
179 |
\begin{center}
|
|
180 |
\pgfimage[width=2.5in]{MEDIA/m2/mlab/plot3d_ex}
|
|
181 |
\end{center}
|
|
182 |
\end{frame}
|
|
183 |
||
184 |
\begin{frame}
|
|
185 |
\frametitle{Examples: Fire in a room}
|
|
186 |
\Large |
|
187 |
\begin{center}
|
|
188 |
Demo of data |
|
189 |
\end{center}
|
|
190 |
\inctime{10}
|
|
191 |
\end{frame}
|
|
192 |
||
|
72
1c1d6aaa2be3
Added first cut of Day2 handout; Minor edits to sessions 2 and 3.
Puneeth Chaganti <punchagan@fossee.in>
parents:
61
diff
changeset
|
193 |
\section{Tools at your disposal}
|
| 22 | 194 |
|
|
76
b24c2560f626
Added links.tex, compilation of various links.
Shantanu <shantanu@fossee.in>
parents:
72
diff
changeset
|
195 |
\subsection{Mayavi2}
|
|
61
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
196 |
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
197 |
\begin{frame}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
198 |
\frametitle{Introduction to Mayavi}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
199 |
\begin{itemize}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
200 |
\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
|
201 |
\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
|
202 |
\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
|
203 |
\item Embedding visualizations in applications |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
204 |
\item Customization |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
205 |
\end{itemize}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
206 |
\pause |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
207 |
\begin{block}{The Goal}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
208 |
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
|
209 |
\end{block}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
210 |
\end{frame}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
211 |
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
212 |
\begin{frame}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
213 |
{Overview of features}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
214 |
\vspace*{-0.3in}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
215 |
\begin{center}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
216 |
\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
|
217 |
\end{center}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
218 |
\end{frame}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
219 |
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
220 |
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
221 |
\begin{frame}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
222 |
\frametitle{Mayavi in applications}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
223 |
\vspace*{-0.3in}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
224 |
\begin{center}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
225 |
\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
|
226 |
\end{center}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
227 |
\end{frame}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
228 |
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
229 |
\begin{frame}
|
|
96
a749db24e73b
Added Dialogs Slide; More edits to Day2 slides.
Puneeth Chaganti <punchagan@fossee.in>
parents:
76
diff
changeset
|
230 |
\frametitle{Live in your dialogs}
|
|
a749db24e73b
Added Dialogs Slide; More edits to Day2 slides.
Puneeth Chaganti <punchagan@fossee.in>
parents:
76
diff
changeset
|
231 |
\vspace*{0.1in}
|
|
a749db24e73b
Added Dialogs Slide; More edits to Day2 slides.
Puneeth Chaganti <punchagan@fossee.in>
parents:
76
diff
changeset
|
232 |
\begin{center}
|
|
a749db24e73b
Added Dialogs Slide; More edits to Day2 slides.
Puneeth Chaganti <punchagan@fossee.in>
parents:
76
diff
changeset
|
233 |
\hspace*{-0.2in}\pgfimage[width=2.5in]{MEDIA/m2/mlab_tui}
|
|
a749db24e73b
Added Dialogs Slide; More edits to Day2 slides.
Puneeth Chaganti <punchagan@fossee.in>
parents:
76
diff
changeset
|
234 |
\end{center}
|
|
a749db24e73b
Added Dialogs Slide; More edits to Day2 slides.
Puneeth Chaganti <punchagan@fossee.in>
parents:
76
diff
changeset
|
235 |
\end{frame}
|
|
a749db24e73b
Added Dialogs Slide; More edits to Day2 slides.
Puneeth Chaganti <punchagan@fossee.in>
parents:
76
diff
changeset
|
236 |
|
|
a749db24e73b
Added Dialogs Slide; More edits to Day2 slides.
Puneeth Chaganti <punchagan@fossee.in>
parents:
76
diff
changeset
|
237 |
\begin{frame}
|
|
61
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
238 |
{Exploring the documentation}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
239 |
\begin{center}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
240 |
\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
|
241 |
\end{center}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
242 |
\end{frame}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
243 |
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
244 |
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
245 |
\begin{frame}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
246 |
\frametitle{Summary}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
247 |
\begin{itemize}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
248 |
\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
|
249 |
\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
|
250 |
\item BSD license |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
251 |
\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
|
252 |
\item Highly scriptable |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
253 |
\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
|
254 |
\item Envisage Plugins |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
255 |
\item Debian/Ubuntu/Fedora |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
256 |
\item \alert{Pythonic}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
257 |
\end{itemize}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
258 |
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
259 |
\inctime{10}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
260 |
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
261 |
\end{frame}
|
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
262 |
|
| 22 | 263 |
\subsection{mlab}
|
264 |
||
|
23
14c817585247
Added Exercise for testing in Session3.
Shantanu <shantanu@fossee.in>
parents:
22
diff
changeset
|
265 |
\begin{frame}
|
| 22 | 266 |
{Overview}
|
267 |
\Large |
|
268 |
\begin{itemize}
|
|
269 |
\item Simple |
|
270 |
\item Convenient |
|
271 |
\item Full-featured |
|
272 |
\end{itemize}
|
|
273 |
\end{frame}
|
|
274 |
||
275 |
\begin{frame}[fragile]
|
|
276 |
||
277 |
\frametitle{Getting started}
|
|
278 |
\myemph{\Large Vanilla:}
|
|
279 |
\begin{lstlisting}[language=bash]
|
|
280 |
$ ipython -wthread |
|
281 |
\end{lstlisting}
|
|
282 |
\myemph{\Large with Pylab:}
|
|
283 |
\begin{lstlisting}[language=bash]
|
|
284 |
$ ipython -pylab -wthread |
|
285 |
\end{lstlisting}
|
|
286 |
\end{frame}
|
|
287 |
||
288 |
\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
|
289 |
\frametitle{Using mlab}
|
| 22 | 290 |
|
291 |
\begin{lstlisting}
|
|
292 |
>>> from enthought.mayavi import mlab |
|
293 |
\end{lstlisting}
|
|
294 |
||
295 |
\vspace*{0.5in}
|
|
296 |
||
|
72
1c1d6aaa2be3
Added first cut of Day2 handout; Minor edits to sessions 2 and 3.
Puneeth Chaganti <punchagan@fossee.in>
parents:
61
diff
changeset
|
297 |
\myemph{\Large Try these}
|
| 22 | 298 |
|
299 |
\vspace*{0.25in}
|
|
300 |
||
301 |
\begin{lstlisting}
|
|
302 |
>>> mlab.test_<TAB> |
|
303 |
>>> mlab.test_contour3d() |
|
304 |
>>> mlab.test_contour3d?? |
|
305 |
\end{lstlisting}
|
|
306 |
\end{frame}
|
|
307 |
||
|
23
14c817585247
Added Exercise for testing in Session3.
Shantanu <shantanu@fossee.in>
parents:
22
diff
changeset
|
308 |
\begin{frame}
|
| 22 | 309 |
{Exploring the view}
|
310 |
\begin{columns}
|
|
311 |
\column{0.6\textwidth}
|
|
312 |
\pgfimage[width=3in]{MEDIA/m2/contour3d}
|
|
313 |
\column{0.4\textwidth}
|
|
314 |
\begin{itemize}
|
|
315 |
\item Mouse |
|
316 |
\item Keyboard |
|
317 |
\item Toolbar |
|
|
61
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
318 |
\item Mayavi icon\pgfimage[width=0.2in]{MEDIA/m2/m2_icon}
|
| 22 | 319 |
\end{itemize}
|
320 |
\end{columns}
|
|
321 |
\end{frame}
|
|
322 |
||
323 |
\begin{frame}[fragile]
|
|
324 |
\frametitle{\mlab\ plotting functions}
|
|
325 |
\begin{columns}
|
|
326 |
\column{0.25\textwidth}
|
|
327 |
\myemph{\Large 0D data}
|
|
328 |
\column{0.5\textwidth}
|
|
329 |
\pgfimage[width=2in]{MEDIA/m2/mlab/points3d_ex}
|
|
330 |
\end{columns}
|
|
331 |
||
332 |
\begin{lstlisting}
|
|
333 |
>>> from numpy import * |
|
334 |
>>> t = linspace(0, 2*pi, 50) |
|
335 |
>>> u = cos(t)*pi |
|
336 |
>>> x, y, z = sin(u), cos(u), sin(t) |
|
337 |
\end{lstlisting}
|
|
338 |
\emphbar{\PythonCode{>>> mlab.points3d(x, y, z)}}
|
|
339 |
\end{frame}
|
|
340 |
||
341 |
\begin{frame}
|
|
342 |
\begin{columns}
|
|
343 |
\column{0.25\textwidth}
|
|
344 |
\myemph{\Large 1D data}
|
|
345 |
\column{0.5\textwidth}
|
|
346 |
\pgfimage[width=2.5in]{MEDIA/m2/mlab/plot3d_ex}
|
|
347 |
\end{columns}
|
|
348 |
\emphbar{\PythonCode{>>> mlab.plot3d(x, y, z, t)}}
|
|
349 |
||
350 |
Plots lines between the points |
|
351 |
||
352 |
\end{frame}
|
|
353 |
||
354 |
\begin{frame}[fragile]
|
|
355 |
\begin{columns}
|
|
356 |
\column{0.25\textwidth}
|
|
357 |
\myemph{\Large 2D data}
|
|
358 |
\column{0.5\textwidth}
|
|
359 |
\pgfimage[width=2in]{MEDIA/m2/mlab/surf_ex}
|
|
360 |
\end{columns}
|
|
361 |
\begin{lstlisting}
|
|
362 |
>>> x = mgrid[-3:3:100j,-3:3:100j] |
|
363 |
>>> z = sin(x*x + y*y) |
|
364 |
\end{lstlisting}
|
|
365 |
||
366 |
\emphbar{\PythonCode{>>> mlab.surf(x, y, z)}}
|
|
367 |
||
368 |
\alert{Assumes the points are rectilinear}
|
|
369 |
||
370 |
\end{frame}
|
|
371 |
||
372 |
\begin{frame}[fragile]
|
|
373 |
\myemph{\Large 2D data: \texttt{mlab.mesh}}
|
|
374 |
\vspace*{0.25in}
|
|
375 |
||
376 |
\emphbar{\PythonCode{>>> mlab.mesh(x, y, z)}}
|
|
377 |
||
378 |
\alert{Points needn't be regular}
|
|
379 |
||
380 |
\vspace*{0.25in}
|
|
381 |
\begin{lstlisting}
|
|
382 |
>>> phi, theta = numpy.mgrid[0:pi:20j, |
|
383 |
... 0:2*pi:20j] |
|
384 |
>>> x = sin(phi)*cos(theta) |
|
385 |
>>> y = sin(phi)*sin(theta) |
|
386 |
>>> z = cos(phi) |
|
387 |
>>> 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
|
388 |
... representation= |
|
fc495fd7e84e
Added tda.tex for day2 and compiled handout for day1.
Shantanu <shantanu@fossee.in>
parents:
57
diff
changeset
|
389 |
... 'wireframe') |
| 22 | 390 |
\end{lstlisting}
|
391 |
||
392 |
\end{frame}
|
|
393 |
||
394 |
\begin{frame}[fragile]
|
|
395 |
||
396 |
\begin{columns}
|
|
397 |
\column{0.25\textwidth}
|
|
398 |
\myemph{\Large 3D data}
|
|
399 |
\column{0.5\textwidth}
|
|
400 |
\pgfimage[width=1.5in]{MEDIA/m2/mlab/contour3d}\\
|
|
401 |
\end{columns}
|
|
402 |
\begin{lstlisting}
|
|
403 |
>>> x, y, z = ogrid[-5:5:64j, |
|
404 |
... -5:5:64j, |
|
405 |
... -5:5:64j] |
|
406 |
>>> mlab.contour3d(x*x*0.5 + y*y + |
|
407 |
z*z*2) |
|
408 |
\end{lstlisting}
|
|
409 |
\end{frame}
|
|
410 |
||
411 |
\begin{frame}[fragile]
|
|
412 |
||
413 |
\myemph{\Large 3D vector data: \PythonCode{mlab.quiver3d}}
|
|
414 |
\vspace*{0.25in}
|
|
415 |
||
416 |
\pgfimage[width=2in]{MEDIA/m2/mlab/quiver3d_ex}\\
|
|
417 |
||
418 |
\begin{lstlisting}
|
|
419 |
>>> mlab.test_quiver3d() |
|
420 |
\end{lstlisting}
|
|
421 |
||
422 |
\emphbar{\PythonCode{obj = mlab.quiver3d(x, y, z, u, v, w)}}
|
|
423 |
\inctime{20}
|
|
424 |
\end{frame}
|
|
425 |
||
426 |
\begin{frame}
|
|
427 |
{Getting hands dirty!}
|
|
428 |
||
429 |
\begin{block}{Motivational problem}
|
|
430 |
Atmospheric data of temperature over the surface of the earth. |
|
431 |
Let temperature ($T$) vary linearly with height ($z$): |
|
432 |
\begin{center}
|
|
433 |
$T = 288.15 - 6.5z$ |
|
434 |
\end{center}
|
|
435 |
\end{block}
|
|
436 |
\end{frame}
|
|
437 |
||
438 |
\begin{frame}[fragile]
|
|
439 |
\frametitle{Simple solution}
|
|
440 |
||
441 |
\begin{lstlisting}
|
|
442 |
lat = linspace(-89, 89, 37) |
|
443 |
lon = linspace(0, 360, 37) |
|
444 |
z = linspace(0, 100, 11) |
|
445 |
\end{lstlisting}
|
|
446 |
\pause |
|
447 |
\begin{lstlisting}
|
|
448 |
x, y, z = mgrid[0:360:37j,-89:89:37j, |
|
449 |
0:100:11j] |
|
450 |
t = 288.15 - 6.5*z |
|
451 |
mlab.contour3d(x, y, z, t) |
|
452 |
mlab.outline() |
|
453 |
mlab.colorbar() |
|
454 |
\end{lstlisting}
|
|
455 |
\end{frame}
|
|
456 |
||
457 |
\begin{frame}[fragile]
|
|
458 |
\frametitle{Exercise: Lorenz equation}
|
|
459 |
\begin{columns}
|
|
460 |
\column{0.25\textwidth}
|
|
461 |
\begin{eqnarray*}
|
|
462 |
\frac{d x}{dt} &=& s (y-x)\\
|
|
463 |
\frac{d y}{d t} &=& rx -y -xz\\
|
|
464 |
\frac{d z}{d t} &=& xy - bz\\
|
|
465 |
\end{eqnarray*}
|
|
466 |
\column{0.25\textwidth}
|
|
467 |
Let $s=10,$ |
|
468 |
$r=28,$ |
|
469 |
$b=8./3.$ |
|
470 |
\end{columns}
|
|
471 |
\structure{\Large Region of interest}
|
|
472 |
\begin{lstlisting}
|
|
473 |
x, y, z = mgrid[-50:50:20j,-50:50:20j, |
|
474 |
-10:60:20j] |
|
475 |
\end{lstlisting}
|
|
476 |
\inctime{20}
|
|
|
97
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
477 |
|
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
478 |
\end{frame}
|
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
479 |
\begin{frame}[fragile]
|
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
480 |
\frametitle{Solution}
|
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
481 |
\begin{lstlisting}
|
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
482 |
def lorenz(x,y,z,s=10.,r=28.,b=8./3.): |
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
483 |
u = s*(y-x) |
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
484 |
v = r*x-y-x*z |
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
485 |
w = x*y-b*z |
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
486 |
return u,v,w |
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
487 |
x,y,z = mgrid [-50:50:20j,-50:50:20j, |
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
488 |
-10:60:20j ] |
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
489 |
u,v,w = lorenz( x , y , z ) |
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
490 |
# Your plot here |
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
491 |
# |
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
492 |
mlab.show() |
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
493 |
|
|
555237dbce44
Changing authors, etc. Changes at BPRIM.
Puneeth Chaganti <punchagan@fossee.in>
parents:
96
diff
changeset
|
494 |
\end{lstlisting}
|
| 22 | 495 |
\end{frame}
|
|
57
73462010a2fe
Changed theme and other changes session-3.
Shantanu <shantanu@fossee.in>
parents:
56
diff
changeset
|
496 |
|
| 22 | 497 |
\end{document}
|
498 |