CS112 Scientific Computation Department of Computer Science Wellesley College Kodak moments 3-D Visualization and Color.

Slides:



Advertisements
Similar presentations
MATLAB – A Computational Methods By Rohit Khokher Department of Computer Science, Sharda University, Greater Noida, India MATLAB – A Computational Methods.
Advertisements

Lecture 5.
Introduction to M ATLAB 2 Graphics Ian Brooks Institute for Climate & Atmospheric Science School of Earth & Environment
Overview  About ETS: our students, our tools.  What’s New with TI-Npsire CAS?  Different Objects in the Same 2D Plot Window.  Why is Parametric 3D.
Chapter 14 Landsat 7 image of the retreating Malaspina Glacier, Alaska.
Chapter 11 Above: Principal contraction rates calculated from GPS velocities. Visualized using MATLAB.
1. Overview 2. plot in 2D 3. Plot in 3D 4. Other possible charts 5. Engineers: label your plots! 6. Plots & Polynomial Plotting 11.
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.
Raster Data. The Raster Data Model The Raster Data Model is used to model spatial phenomena that vary continuously over a surface and that do not have.
[FX,FY,FZ,...] = GRADIENT(F,...) [FX,FY,FZ,…] is numerical gradient of matrix F Distance between grid points in X,Y,Z,… direction FX corresponds to dF/dx,
 1999 BG Mobasseri1 8/29/2015 MATLAB GRAPHICS - PART II ADVANCED PLOTTING June 4, ‘99.
Visualization using Matlab April 10, 2007 Rachael Brady CSEM Matlab Workshop.
6.094 Introduction to programming in MATLAB
CMPS 1371 Introduction to Computing for Engineers PLOTTING.
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).
Textbook: Chapter 11 Part : 3D-Plotting CSE 1010.
3D Surface Inspector 3D Surface Inspector 1. Choose your Method of Image Acquisition. Manual acquisition captures a Z-stack within 3DSI Auto Acq.
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.
COMP 116: Introduction to Scientific Programming Lecture 5: Plotting, Scripts and publishing.
CS112 Scientific Computation Department of Computer Science Wellesley College Hodgepodge “Clumsy mixture of ingredients…”
MATLAB for Engineers, by Holly Moore. ISBN © 2007 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
CS112 Scientific Computation Department of Computer Science Wellesley College Numb3rs Number and image types.
CS112 Scientific Computation Department of Computer Science Wellesley College Building your own Functions.
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.
Barak Shenhav Early Evolution Course 11 Feb 2001 MATLAB Visualization, Functions & Debugging.
Introduction to MATLAB Session 5 Simopekka Vänskä, THL 2010.
Rotation matrices 1 Constructing rotation matricesEigenvectors and eigenvalues 0 x y.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
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.
1. Overview 2. plot in 2D 3. Plot in 3D 4. Other possible charts 5. Engineers: label your plots! 6. Plots & Polynomial Plotting 11.
Scientific Visualization Using MATLAB - Fall 2012
CS112 Scientific Computation Department of Computer Science Wellesley College Loops Iteration with for loops.
CS112 Scientific Computation Department of Computer Science Wellesley College Tables More matrix fun.
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.
EXAMPLE 1 Graph a system of two inequalities Graph the system of inequalities. y > –2x – 5 Inequality 1 y < x + 3 Inequality 2.
Jeff Howbert Introduction to Machine Learning Winter Machine Learning MATLAB Essentials.
CS112 Scientific Computation Department of Computer Science Wellesley College Building your own Functions.
Exam 3 Review Questions. Q1: Rasterize the line (2, -1) to (4, -6) (hint: Bresenham)
More Matlab Graphics and GUI Graphics subplots some useful commands 3D graphics GUI GUI controls The callback property Other essential properties.
CS100A, Fall 1998, Lecture 191 CS100A, Fall 1998 Lecture 19, Thursday Nov 05 Matlab Concepts: Matlab arrays Matlab subscripting Matlab plotting.
CS100A, Fall 1998, Lecture 201 CS100A, Fall 1998 Lecture 20, Tuesday Nov 10 More Matlab Concepts: plotting (cont.) 2-D arrays Control structures: while,
Computer Graphics Lecture 30 Mathematics of Lighting and Shading - IV Taqdees A. Siddiqi
Photonic Systems Laboratory School of EE, Seoul National University Photonic Systems Lab School of EECS, S.N.U. Introduction to Electromagnetism.
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.
Advanced Plotting Techniques Chapter 11 Above: Principal contraction rates calculated from GPS velocities. Visualized using MATLAB.
Reading and Writing Image Files
John Federici NJIT Physics Department
Tips for Shading Your Terrain
ENEE222 Elements of Discrete Signal Analysis Lab 11 1.
Plotting Chapter 5.
3D-Graphs A 3D surface is defined as: z = f(x, y)
Topographic Maps may also use color do show different altitudes.
Ch3 Graphics Overview of Plotting Editing Plots
Lecture 25: Exploring data
Geological Map.
Introduction to MATLAB Plotting LAB 3
Color Visualization in Matlab
CSCI N317 Computation for Scientific Applications Unit 1 – 5 MATLAB
Environmental Science
Yang-Ming University, Taipei, Taiwan
Geological Map.
Presentation transcript:

CS112 Scientific Computation Department of Computer Science Wellesley College Kodak moments 3-D Visualization and Color

Color images D line and scatter plots Create plots of 3-D curves and points using plot3(x, y, z, …)scatter3(x, y, z, …) >> angles = linspace(0, 6*pi, 100); >> plot3(cos(angles), sin(angles), angles, 'g-*', 'Linewidth', 2); >> scatter3(rand(1,100), rand(1,100), rand(1,100), 40, 'm', 'filled');

Color images21-3 Graph a 3-D function of two variables Suppose we want to graph the function z = x 2 + y 2 -4 ≤ x,y ≤ +4 We can get there in three steps: >> [x y] = meshgrid(-4:0.2:4); >> z = x.^2 + y.^2; >> mesh(x, y, z);

Color images21-4 Use meshgrid to create 2-D coordinates meshgrid creates 2-D matrices of coordinates, given an input vector that specifies the values for each coordinate >> [x y] = meshgrid(-4:2:4); >> z = x.^2 + y.^2; >> mesh(x, y, z); x = y = z =

Color images21-5 So, what can I do with my plot? Let’s begin with something a little more interesting: >> [x y z] = peaks(25); >> mesh(x, y, z, 'EdgeColor', 'k'); >> axis tight Display a surface, and add a colorbar: >> surf(x, y, z); >> colorbar

Color images21-6 Colormaps >> cmap = colormap cmap = steadily increase blue add in the green pure red at the end

Color images21-7 Named colormaps MATLAB has named colormaps that can be set with colormap colormap(hot) colormap(spring) View the colormaps by searching for colormap in Help facility

Color images21-8 Don’t like the colors? Make your own! >> purples = zeros(10,3); >> purples(:, 1) = linspace(0.1,1.0,10); >> purples(:, 3) = linspace(0.1,1.0,10); >> colormap(purples); What does the purples matrix look like? Exercise: make our own class colormap with a set of favorite colors chosen from the Slacker’s Guide to HTMLSlacker’s Guide to HTML

Color images21-9 Change your point of view Change the point from which your 3-D surface is viewed view(azimuth, elevation) default: view(-37.5, 30) >> view(-75, 45) >> rotate3d on % then adjust view with mouse

Color images21-10 Add shading… Create a shaded surface using built-in shading methods >> [x y z] = sphere(20); >> surf(x, y, z); >> colormap(gray) >> shading faceted >> shading flat>> shading interp

Color images21-11 Add a light source… >> [x y z] = peaks(25); >> surf(x, y, z); >> axis tight >> colormap(gray) >> shading interp >> light('Position', [0 -1 0]) >> lighting phong

Color images21-12 … and adjust the surface material Start the same as previous slide, then… >> colormap(copper) >> material dull >> material shiny

Color images21-13 Contour plots >> [x y z] = peaks(25); >> contour(x, y, z, 20, 'Linewidth', 2) like a topographical map

Color images21-14 Color images >> [x y z] = peaks(25); >> imagesc(z) >> colormap(gray)>> colormap(hot)