12.010 Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room 54-820A, Chris Hill, Room 54-1511,

Slides:



Advertisements
Similar presentations
Introduction to Graphing Using MATLAB. Line Graphs  Useful for graphing functions  Useful for displaying data trends over time  Useful for showing.
Advertisements

Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Chapter 11 Above: Principal contraction rates calculated from GPS velocities. Visualized using MATLAB.
ES 314 Lecture 2 Sep 1 Summary of lecture 1: course overview intro to matlab sections of Chapters 2 and 3.
Visualisation of head.txt. Data capture Data for the head figure was captured by a laser scanner. The object is mounted on a turntable, and illuminated.
Introduction to Matlab:
Interpolation, color, & light. Outline Announcements –HW II--due today, 5PM –HW III on the web later today HW I: Issues Structured vs. Unstructured Meshes.
Fall 2006AE6382 Design Computing1 Three Dimensional Plotting Learning Objectives –Understand the anatomy of a 3D plot –Basics of constructing plots in.
Matlab for Visualization Ray Gasser IS&T Scientific Visualization Tutorial – Spring 2010.
Introduction to Volume Visualization Mengxia Zhu Fall 2007.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Adv. Computer Graphics CS6500, Spring 2003.
Modern Navigation Thomas Herring
3D Concepts Coordinate Systems Coordinates specify points in space 3D coords commonly use X, Y, & Z A vertex is a 'corner' of an object Different coordinate.
 1999 BG Mobasseri1 8/29/2015 MATLAB GRAPHICS - PART II ADVANCED PLOTTING June 4, ‘99.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
Visualization using Matlab April 10, 2007 Rachael Brady CSEM Matlab Workshop.
Volumetric Visualization. Outline Announcements –PS III due Friday –Last day for self-motivated assignment Belated CookiePresentation What is VV? Slices.
Plotting – 3-Dimensional. 3D Plots versus 2D Plots 3-dimensional plots, in contrast to 2-dimensional ones, has a third axis (often called the z-axis).
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Part 6: Graphics Output Primitives (4) 1.  Another useful construct,besides points, straight line segments, and curves for describing components of a.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
Marching Cubes: A High Resolution 3D Surface Construction Algorithm William E. Lorenson Harvey E. Cline General Electric Company Corporate Research and.
MA/CS 3751 Fall 2002 Lecture 24. MA/CS 3752 ginput ginput is a Matlab function which takes one argument input: number of points to select in the image.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room , Chris Hill, Room ,
CDS 301 Spring, 2013 CH3: MATLAB 3-D Visualization February 07, TBD Jie Zhang Copyright ©
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers Chapter 5B Model.
Computer graphics & visualization. IntuitiveVersatileFast.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room , Chris Hill, Room ,
Outline Announcements –HW II due Friday –HW III option Interpolation Colormaps.
Introduction MATLAB stands for MATrix LABoratory.  Basics  Matrix Manipulations  MATLAB Programming  Graphics  Image types  Image Processing  Useful.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
A L I MAM M OHAMMAD B IN S AUD I SLAMIC U NIVERSITY C OLLEGE OF S CIENCES D EPARTMENT OF M ATHEMATICS MATLAB 251 : MATH SOFTWARE Introduction to MATLAB.
Introduction to MATLAB Session 5 Simopekka Vänskä, THL 2010.
2D Routines in 3D. Outline Announcements –HW II--due Friday. 5PM HW1 & Cookie Grids & Meshes Representing f(x,y) Lines & Surfaces in 3D Survey.
Course Introduction to virtual engineering Óbuda University John von Neumann Faculty of Informatics Institute of Applied Mathematics Lecture and laboratory.
Chapter 6 – Pictorial Sketching
Vertices, Edges and Faces By Jordan Diamond. Vertices In geometry, a vertices is a special kind of point which describes the corners or intersections.
Numerical Analysis 3D Plots. A numerical method is a technique for computing a numerical approximation of the solution to a mathematical problem.
Recap Plots with More than one Line Plots of Complex Arrays Line, Color and Mark Style Axis Scaling and Annotating Plots Subplots Polar Plots Logarithmic.
Material obtained from Summer workshop in Guildford County, July, 2014 Unit 6.
Volumetric Visualization. Outline Announcements –PS III due today –contest entries by tomorrow –PS IV online today--GUI vs. VV –Demos on Friday What is.
Principles of the Global Positioning System Lecture 02 Prof. Thomas Herring Room A;
CHAPTER 5 CONTOURING. 5.3 CONTOURING Fig 5.7. Relationship between color banding and contouring Contour line (isoline): the same scalar value, or isovalue.
11/5/2002 (c) University of Wisconsin, CS 559 Last Time Local Shading –Diffuse term –Specular term –All together –OpenGL brief overview.
1 Lecture 5 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
EGR 115 Introduction to Computing for Engineers Complex Numbers & 3D Plots – Part 2 Friday 07 Nov 2014 EGR 115 Introduction to Computing for Engineers.
GRAPHICS AND VISUALISATION WITH MATLAB UNIVERSITY OF SHEFFIELD CiCS DEPARTMENT Deniz Savas & Mike Griffiths May 2015.
CDS 301 Fall, 2008 From Graphics to Visualization Chap. 2 Sep. 3, 2009 Jie Zhang Copyright ©
MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 5.1 Simple Plot of Time.
CDS 301 Fall, 2008 Domain-Modeling Techniques Chap. 8 November 04, 2008 Jie Zhang Copyright ©
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room , Chris Hill, Room ,
More Matlab Graphics and GUI Graphics subplots some useful commands 3D graphics GUI GUI controls The callback property Other essential properties.
67 x 89 = ? 67 x
EEE 242 Computer Tools for Electrical Engineering
Lecture 17 More Plotting Chapter 12 Matrices. Outline from Chapter D Plotting 11.4 Surface Plots 11.5 Interacting with Plotted Data.
Session III Plotting in MATLAB Rajeev Madazhy Dept of Mechanical Engineering LSU MATLAB Tutorials.
CS112 Scientific Computation Department of Computer Science Wellesley College Kodak moments 3-D Visualization and Color.
CS112 Scientific Computation Department of Computer Science Wellesley College Kodak moments 3-D Visualization and Color.
Advanced Plotting Techniques Chapter 11 Above: Principal contraction rates calculated from GPS velocities. Visualized using MATLAB.
Reading and Writing Image Files
Photorealistic Rendering vs. Interactive 3D Graphics
3D-Graphs A 3D surface is defined as: z = f(x, y)
Lecture 25.
Basic Rendering Techniques
Ch3 Graphics Overview of Plotting Editing Plots
Chapter 14 Shading Models.
Domain-Modeling Techniques
Visualization CSE 694L Roger Crawfis The Ohio State University.
Chapter 14 Shading Models.
Presentation transcript:

Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room , Web page 11/18/ Lec 18

11/18/ Lec 182 Overview Today Examine image and 3-D graphics in Matlab

11/18/ Lec 183 Simple 3-D graphics Simple line and scatter plots use plot3 which takes 3 vectors as arguments and plots them much like 2-D plot. t = linspace(0,10*pi); figure(1); clf; plot3(sin(t),cos(t),t)

11/18/ Lec 184 Mesh plots [X,Y,Z] = peaks(30); % 30x30 version of Gaussians mesh(X,Y,Z) xlabel('X-axis'), ylabel('Y-axis'), zlabel('Z-axis') colorbar;daspect([ ]); title('Lec 19.2: Mesh Plot of Peaks')

11/18/ Lec 185 Transparency control [X,Y,Z]=sphere(12); subplot(1,2,1) mesh(X,Y,Z), title('Lec 3a: Opaque') hidden on axis square off subplot(1,2,2) mesh(X,Y,Z), title('Lec 3b: Transparent') hidden off axis square off

11/18/ Lec 186 Mesh with contour meshc(X,Y,Z) % mesh plot with underlying contour plot

11/18/ Lec 187 Surface plots Surface plots are like mesh except that the surface is filled The appearance of these plots depends on the method of shading and how they are light. The commands here are: –surf -- surface plot shading flat has flat facetted look shading interp interpolates the surface and looks smoother –surfc -- surface plot with contours (like meshc) –surfl -- surface with lighting –surfnorm -- surface with normal plotted Following figures give example of these commands using the peaks(30) data set. We can look at these plots in Matlab and change colormap and view angles

11/18/ Lec 188 Standard surf Generated using surf[X,Y,Z]

11/18/ Lec 189 Surf with shading flat The command shading flat added

11/18/ Lec 1810 Surf with shading interp Command shading interp used

11/18/ Lec 1811 Surfl used Command surfl is surface with lighting; here the colormap is changed to pink to enhance effect

11/18/ Lec 1812 Surfnorm to add normals Generated on a 15 grid to keep down clutter.

11/18/ Lec 1813 Working with irregular data Previous figures were generated using a regular grid of X and Y values from which Z values can be computed. Routine griddata takes irregularly spaced x y data with associated z values and fits a surface to a regularly specified grid of values. Mesh surf etc can be used to plot results Routines trimesh and trisurf form Delanunay triangles to irregular data and plot based on these facetted surfaces.

Griddata example 11/18/ Lec 1814

Trisurf example 11/18/ Lec 1815

Vertical view of each figure 11/18/ Lec 1816

11/18/ Lec 1817 Inside 3-D objects Matlab has methods for visualization of 3-D volumes These are figure generated to display some quantity which is a function of X Y and Z coordinates. Examples would be temperature is a 3-D body Functions slice and contourslice are used to see inside the body. Slice can be along coordinate planes or a surface shape can be specified. Isosurface renders the shape of the volume at a particular value. (Equivalent to a 3-D contour map with just one contour shown).

11/18/ Lec 1818 Slice along coordinate axes slice(X,Y,Z,V,[0 3],[5 15],[-3 5]) x cut 0 & 3; y cut 5 & 15, z cut -3 & 5

11/18/ Lec 1819 Slice with contours added contourslice(X,Y,Z,V,3,[5 15],[])

11/18/ Lec 1820 Oscillating sinusoidal surface

11/18/ Lec 1821 Isosurface viewing Previous cut at level 2 using isosurface

11/18/ Lec 1822 Example with outer volume filled Added called to isocaps

11/18/ Lec 1823 Examples using Matlab flow function

11/18/ Lec 1824 Matlab flow example This example needs to be viewed in 3-D in Matlab. Here color map shows fine structure.

11/18/ Lec 1825 Making AVI Movies hf = figure('Position',[ ]); set(fig,'DoubleBuffer','on'); set(gca,'Visible','off','Position',[ ],'NextPlot','replace'); mov = avifile('YibalTotalANC.avi','FPS',1); for n = 2:35 f = sprintf('TotalANC%3.3d.jpg',n); Im = imread(f,'JPG'); hi = image(Im); Fr = getframe; mov = addframe(mov,Fr); end

11/18/ Lec 1826 Viewing real data Example of reading a geo-tiff file and displaying it on a Northing/Easting grid Main feature here is using imfinfo to retrieve information about the contents of an image file and then imread to read the image data Imagesc used to display image with coordinates: imagesc([UTMR(1:2)],[UTMR(3:4)], Def)

11/18/ Lec 1827 Figure generated imagesc

11/18/ Lec 1828 Summary Matlab has many 3-D view methods and functions available There are many options to many of these and sometime experimentation is needed to find out what works best. Demo example in Matlab can yield good ideas on how to solve specific problems.