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