day2/session3.tex
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--
Added exercise session day1.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
154
66b117b7edc7 Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
     1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
294
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
     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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
     4
% Author: Prabhu Ramachandran <prabhu at aero.iitb.ac.in>
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
     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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
     8
\documentclass[compress,14pt]{beamer}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
     9
% \documentclass[handout]{beamer}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    10
% \usepackage{pgfpages}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    11
% \pgfpagesuselayout{4 on 1}[a4paper,border, shrink=5mm,landscape]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    12
\usepackage{tikz}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    13
\newcommand{\hyperlinkmovie}{}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    14
%\usepackage{movie15}
154
66b117b7edc7 Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
    15
294
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    16
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    17
% Note that in presentation mode 
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    18
% \paperwidth  364.19536pt
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    19
% \paperheight 273.14662pt
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    20
% h/w = 0.888
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    21
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    26
  %\usetheme{Boadilla}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    32
% To remove navigation symbols
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    33
\setbeamertemplate{navigation symbols}{}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    34
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    58
% My Macros
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    66
%{\centerline{\fcolorbox{gray!50} {blue!10}{
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    67
%\begin{minipage}{0.9\linewidth}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    68
%    {#1} 
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    69
%\end{minipage}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    70
%    }}}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    71
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    72
\newcommand{\myemph}[1]{\structure{\emph{#1}}}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    73
\newcommand{\PythonCode}[1]{\lstinline{#1}}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    74
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    75
\newcommand{\tvtk}{\texttt{tvtk}}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    76
\newcommand{\mlab}{\texttt{mlab}}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    82
\newcommand\BackgroundPicture[1]{%
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    83
  \setbeamertemplate{background}{%
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    84
      \parbox[c][\paperheight]{\paperwidth}{%
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    85
      \vfill \hfill
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    86
 \hfill \vfill
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    87
}}}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    88
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    89
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    90
% Configuring the theme
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    91
%\setbeamercolor{normal text}{fg=white}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    92
%\setbeamercolor{background canvas}{bg=black}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
    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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   103
\date[] {8 November, 2009\\Day 2, Session 5}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   107
%\pgfdeclareimage[height=0.75cm]{iitblogo}{iitblogo}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   110
\AtBeginSection[]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   111
{
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   112
  \begin{frame}<beamer>
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   113
    \frametitle{Outline}      
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   114
    \tableofcontents[currentsection,currentsubsection]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   115
  \end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   151
\begin{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   152
    \frametitle{What is visualization?}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   153
    \Large
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   154
    \begin{center}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   155
    Visual representation of data
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   160
%% \begin{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   161
%%     \frametitle{Is this new?}    
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   162
%%     \begin{center}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   163
%%     We have moved from:
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   164
%%     \end{center}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   165
%%     \begin{columns}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   166
%%     \column{}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   167
%%     \hspace*{-1in}    
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   168
%%     \includegraphics[width=1.75in,height=1.75in, interpolate=true]{data/3832}      
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   169
%%     \column{}\hspace*{-0.25in}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   170
%%     To
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   171
%%     \column{}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   172
%%     \hspace*{-1in}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   173
%%     \includegraphics[width=1.75in, height=1.75in, interpolate=true]{data/torus}  
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   174
%%     \end{columns}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   175
%% \end{frame}
288
c4e25269a86c Reorganized slides.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 263
diff changeset
   176
294
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   177
\begin{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   178
    \frametitle{3D visualization}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   179
    \Large
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   180
    \begin{center}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   181
        Harder but important
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   186
    \frametitle{Is this Graphics?}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   187
    \Large
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   188
    \begin{center}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   189
        Visualization is about data!
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   193
\begin{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   194
    \frametitle{Examples: trajectory in space}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   195
    \Large
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   196
    \begin{center}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   197
        \pgfimage[width=2.5in]{MEDIA/m2/mlab/plot3d_ex}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   201
\begin{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   202
    \frametitle{Examples: Fire in a room}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   203
    \Large
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   204
    \begin{center}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   205
        Demo of data
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   206
    \end{center}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   210
\section{Tools available}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   211
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   212
\subsection{mlab}
171
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 154
diff changeset
   213
294
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   214
\begin{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   215
    {Overview}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   216
    \Large
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   217
    \begin{itemize}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   218
        \item Simple
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   219
        \item Convenient
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   225
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   226
    \frametitle{Getting started}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   227
    \myemph{\Large Vanilla:}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   228
    \begin{lstlisting}[language=bash]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   229
        $ ipython -wthread
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   230
    \end{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   231
    \myemph{\Large with Pylab:}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   232
    \begin{lstlisting}[language=bash]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   233
        $ ipython -pylab -wthread
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   234
    \end{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   235
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   236
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   237
\begin{frame}[fragile]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   238
    \frametitle{Using mlab}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   239
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   240
    \begin{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   241
In []:from enthought.mayavi import mlab
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   242
    \end{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   243
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   244
    \vspace*{0.5in}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   245
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   246
    \myemph{\Large Try these}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   247
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   248
    \vspace*{0.25in}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   249
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   250
    \begin{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   251
In []: mlab.test_<TAB>
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   252
In []: mlab.test_contour3d()
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   253
In []: mlab.test_contour3d??
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   254
    \end{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   255
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   256
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   257
\begin{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   258
    {Exploring the view}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   259
    \begin{columns}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   260
        \column{0.6\textwidth}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   261
    \pgfimage[width=3in]{MEDIA/m2/contour3d}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   262
        \column{0.4\textwidth}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   263
        \begin{itemize}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   264
            \item Mouse
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   265
            \item Keyboard
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   266
            \item Toolbar
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   267
            \item Mayavi icon\pgfimage[width=0.2in]{MEDIA/m2/m2_icon}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   268
        \end{itemize}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   269
    \end{columns}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   270
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   271
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   272
\begin{frame}[fragile]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   273
  \frametitle{Clearing the plot area}  
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   274
  \PythonCode{In []: mlab.clf()}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   275
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   276
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   277
\begin{frame}[fragile]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   278
    \frametitle{\mlab\ plotting functions}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   279
    \begin{columns}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   280
        \column{0.25\textwidth}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   281
        \myemph{\Large 0D data}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   282
        \column{0.5\textwidth}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   283
    \pgfimage[width=2in]{MEDIA/m2/mlab/points3d_ex}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   284
    \end{columns}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   285
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   286
    \begin{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   287
In []: t = linspace(0, 2*pi, 50)
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   288
In []: u = cos(t) * pi
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   289
In []: x, y, z = sin(u), cos(u), sin(t)
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   290
    \end{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   291
    \emphbar{\PythonCode{In []: mlab.points3d(x, y, z)}}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   292
\end{frame}
171
29c0c504750c Added some changes suggested during the review.
Shantanu <shantanu@fossee.in>
parents: 154
diff changeset
   293
294
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   294
\begin{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   295
  \begin{columns}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   296
        \column{0.25\textwidth}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   297
        \myemph{\Large 1D data}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   298
        \column{0.5\textwidth}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   299
        \pgfimage[width=2.5in]{MEDIA/m2/mlab/plot3d_ex}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   300
  \end{columns}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   301
  \PythonCode{In []: mlab.clf()}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   302
  \emphbar{\PythonCode{In []: mlab.plot3d(x, y, z, t)}}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   303
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   304
    Plots lines between the points
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   305
    
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   306
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   307
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   308
\begin{frame}[fragile]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   309
    \begin{columns}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   310
        \column{0.25\textwidth}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   311
        \myemph{\Large 2D data}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   312
        \column{0.5\textwidth}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   313
        \pgfimage[width=2in]{MEDIA/m2/mlab/surf_ex}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   314
    \end{columns}            
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   315
    \begin{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   316
In []: x, y = mgrid[-3:3:100j,-3:3:100j]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   317
In []: z = sin(x*x + y*y)
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   318
    \end{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   319
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   320
    \emphbar{\PythonCode{In []: mlab.surf(x, y, z)}}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   321
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   322
    \alert{Assumes the points are rectilinear}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   323
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   324
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   325
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   326
\begin{frame}[fragile]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   327
  \frametitle{mgrid}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   328
  \begin{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   329
In []: mgrid[0:3,0:3]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   330
Out[]: 
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   331
array([[[0, 0, 0],
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   332
        [1, 1, 1],
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   333
        [2, 2, 2]],
263
8a4a1e5aec85 Changes made for Goa workshop .
Shantanu <shantanu@fossee.in>
parents: 256
diff changeset
   334
294
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   335
       [[0, 1, 2],
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   336
        [0, 1, 2],
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   337
        [0, 1, 2]]])
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   338
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   339
In []: mgrid[-1:1:5j]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   340
Out[]: array([-1., -0.5,  0.,  0.5,  1.])
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   341
\end{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   342
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   343
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   344
\begin{frame}[fragile]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   345
  \frametitle{Example}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   346
  \begin{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   347
In []: x, y = mgrid[-1:1:5j, -1:1:5j]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   348
In []: z = x*x + y*y
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   349
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   350
In []: z
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   351
Out[]: 
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   352
array([[ 2.  , 1.25, 1.  , 1.25, 2.  ],
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   353
       [ 1.25, 0.5 , 0.25, 0.5 , 1.25],
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   354
       [ 1.  , 0.25, 0.  , 0.25, 1.  ],
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   355
       [ 1.25, 0.5 , 0.25, 0.5 , 1.25],
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   356
       [ 2.  , 1.25, 1.  , 1.25, 2.  ]])
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   357
\end{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   358
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   359
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   360
\begin{frame}[fragile]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   361
    \myemph{\Large 2D data: \texttt{mlab.mesh}}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   362
    \vspace*{0.25in}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   363
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   364
    \emphbar{\PythonCode{In []: mlab.mesh(x, y, z)}}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   365
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   366
    \alert{Points needn't be regular}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   367
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   368
    \vspace*{0.25in}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   369
\begin{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   370
In []: phi, theta = mgrid[0:pi:20j, 
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   371
...                         0:2*pi:20j]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   372
In []: x = sin(phi)*cos(theta)
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   373
In []: y = sin(phi)*sin(theta)
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   374
In []: z = cos(phi)
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   375
In []: mlab.mesh(x, y, z, 
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   376
...           representation=
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   377
...           'wireframe')
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   378
\end{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   384
  \begin{columns}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   385
        \column{0.25\textwidth}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   386
        \myemph{\Large 3D data}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   387
        \column{0.5\textwidth}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   388
        \pgfimage[width=1.5in]{MEDIA/m2/mlab/contour3d}\\        
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   389
    \end{columns}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   390
\begin{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   391
In []: x, y, z = mgrid[-5:5:64j, 
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   392
...                -5:5:64j, 
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   393
...                -5:5:64j]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   394
In []: mlab.contour3d(x*x*0.5 + y*y + 
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   395
                   z*z*2)
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   400
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   401
    \myemph{\Large 3D vector data: \PythonCode{mlab.quiver3d}}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   402
    \vspace*{0.25in}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   403
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   404
    \pgfimage[width=2in]{MEDIA/m2/mlab/quiver3d_ex}\\
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   405
    
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   406
\begin{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   407
In []: mlab.test_quiver3d()
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   408
\end{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   409
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   410
\emphbar{\PythonCode{obj = mlab.quiver3d(x, y, z, u, v, w)}}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   411
\inctime{20}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   412
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   413
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   414
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   415
\subsection{Mayavi2}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   416
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   417
\begin{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   418
  \frametitle{Introduction to Mayavi}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   419
  \begin{itemize}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   420
  \item Most scientists not interested in details of visualization
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   421
  \item Visualization of data files with a nice UI
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   422
  \item Interactive visualization of data (think Matlab)
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   423
  \item Embedding visualizations in applications
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   424
  \item Customization
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   425
  \end{itemize}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   426
  \pause
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   427
  \begin{block}{The Goal}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   428
      Provide a \alert{flexible} library/app for all of these needs!
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   429
  \end{block}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   430
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   431
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   432
\begin{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   433
    {Overview of features}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   434
      \vspace*{-0.3in}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   435
  \begin{center}    
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   436
    \hspace*{-0.2in}\pgfimage[width=5in]{MEDIA/m2/m2_app3_3}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   437
  \end{center}    
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   438
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   439
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   440
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   441
\begin{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   442
    \frametitle{Mayavi in applications}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   443
      \vspace*{-0.3in}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   444
  \begin{center}    
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   445
    \hspace*{-0.2in}\pgfimage[width=4.5in]{MEDIA/m2/m2_envisage}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   446
  \end{center}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   447
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   448
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   449
\begin{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   450
    \frametitle{Live in your dialogs}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   451
      \vspace*{0.1in}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   452
  \begin{center}    
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   453
    \hspace*{-0.2in}\pgfimage[width=2.5in]{MEDIA/m2/mlab_tui}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   454
  \end{center}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   455
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   456
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   457
\begin{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   458
    {Exploring the documentation}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   459
    \begin{center}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   460
    \pgfimage[width=4in]{MEDIA/m2/m2_ug_doc}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   461
    \end{center}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   462
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   463
154
66b117b7edc7 Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   464
294
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   465
\begin{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   466
  \frametitle{Summary}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   467
      \begin{itemize}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   468
          \item \url{http://code.enthought.com/projects/mayavi}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   469
          \item Uses VTK (\url{www.vtk.org})
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   470
          \item BSD license
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   471
          \item Linux, win32 and Mac OS X
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   472
          \item Highly scriptable
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   473
          \item Embed in Traits UIs (wxPython and PyQt4)
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   474
          \item Envisage Plugins
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   475
          \item Debian/Ubuntu/Fedora
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   476
          \item \alert{Pythonic}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   477
      \end{itemize}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   478
    
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   479
      \inctime{10}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   480
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   481
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   482
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   483
\begin{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   484
    {Getting hands dirty!}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   485
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   486
        \begin{block}{Motivational problem}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   487
        Atmospheric data of temperature over the surface of the earth.
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   488
        Let temperature ($T$) vary linearly with height ($z$):
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   489
        \begin{center}            
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   490
        $T = 288.15 - 6.5z$
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   491
        \end{center}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   492
        \end{block}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   493
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   494
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   495
\begin{frame}[fragile]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   496
    \frametitle{Simple solution}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   497
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   498
    \begin{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   499
lat = linspace(-89, 89, 37)
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   500
lon = linspace(0, 360, 37)
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   501
z = linspace(0, 100, 11)
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   502
    \end{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   503
\pause
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   504
    \begin{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   505
x, y, z = mgrid[0:360:37j,-89:89:37j,
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   506
                0:100:11j]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   507
t = 288.15 - 6.5*z
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   508
mlab.contour3d(x, y, z, t)
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   509
mlab.outline()
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   510
mlab.colorbar()
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   511
    \end{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   512
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   513
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   514
\begin{frame}[fragile]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   515
    \frametitle{Exercise: Lorenz equation}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   516
    \begin{columns}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   517
        \column{0.25\textwidth}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   518
        \begin{eqnarray*}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   519
        \frac{d x}{dt} &=& s (y-x)\\
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   520
        \frac{d y}{d t} &=& rx -y -xz\\
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   521
        \frac{d z}{d t} &=& xy - bz\\
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   522
        \end{eqnarray*}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   523
        \column{0.25\textwidth}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   524
        Let $s=10,$
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   525
        $r=28,$ 
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   526
        $b=8./3.$
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   527
    \end{columns}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   528
    \structure{\Large Region of interest}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   529
  \begin{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   530
x, y, z = mgrid[-50:50:20j,-50:50:20j,
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   531
                -10:60:20j]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   532
  \end{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   533
\inctime{20}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   534
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   535
\end{frame}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   536
\begin{frame}[fragile]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   537
    \frametitle{Solution}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   538
  \begin{lstlisting}
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   539
def lorenz(x,y,z,s=10.,r=28.,b=8./3.):
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   540
    u = s*(y-x)
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   541
    v = r*x-y-x*z
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   542
    w = x*y-b*z
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   543
    return u,v,w
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   544
x,y,z = mgrid [-50:50:20j,-50:50:20j,
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   545
                    -10:60:20j ]
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   546
u,v,w = lorenz( x , y , z )
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   547
# Your plot here
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   548
#
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   549
mlab.show()
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   557
  \item Need of visualization.
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   558
  \item Using mlab to create 3 D plots.
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   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
f05b1c457120 Added exercise session day1.
Shantanu <shantanu@fossee.in>
parents: 288
diff changeset
   563
\end{document}
154
66b117b7edc7 Added slides for 3D data visualization session 3 day 2.
Shantanu <shantanu@fossee.in>
parents:
diff changeset
   564