10
Btech Mech 6 th SEM Major Assignment Volume Visualization in 3-D Vikas Mishra K10947 Btech Mech 6 th Sem

K10947 Vikas ct

Embed Size (px)

Citation preview

Page 1: K10947 Vikas ct

Btech Mech 6th SEM Major Assignment

Volume Visualization in 3-D

Vikas MishraK10947

Btech Mech 6th Sem

Page 2: K10947 Vikas ct

*It is a high-level language for numerical computation, visualization and application development.

*It also provides an interactive environment for iterative exploration, design and problem solving.

•It provides vast library of mathematical functions for linear algebra, statistics, Fourier analysis, filtering, optimization, numerical integration and solving ordinary differential equations.

*It provides built-in graphics for visualizing data and tools for creating custom plots. *MATLAB's programming interface gives development tools for improving code quality, maintainability, and maximizing performance.

*It provides tools for building applications with custom graphical interfaces.

*It provides functions for integrating MATLAB based algorithms with external applications and languages such as C, Java, .NET and Microsoft Excel.

MATLAB

Page 3: K10947 Vikas ct

•Plotting in 3D and 3D data visualization is where Matlab’s power really becomes apparent!•Matlab defines a number of different kinds of 3D plots but you will probably find 3 or 4 to be the most useful:

•x,y,z 3D line plot: plot3( )•mesh plot: mesh( )•surface plot: surf( )•contour plot: contour( )•combo surface/mesh with contour: surfc( )

•The surface plotting can also be applied to create realistic 3D objects by defining and plotting their exterior surfaces!

Page 4: K10947 Vikas ct

•It is often desirable to plot functions of the form: z=f(x,y)•for each (x,y), we can compute a value for z•this defines a surface in 3D space

•If we can define (x,y) at regular intervals, Matlab provides powerful ways to plot the resulting function as a mesh or surface in 3D

•The (x,y) values stored in arrays will define a grid of mesh points through which the surface will be created.

Page 5: K10947 Vikas ct

•3D plotting introduces several key concepts:

•Meshes versus Surfaces

•Hidden line removal

•Pedestals and contours

•Color maps and pseudo-coloring

•Viewpoints and camera control (advanced!)

•Shading and lighting (advanced)

Page 6: K10947 Vikas ct

x = xlim;Y = ylim;Cm = brighten(jet(length(map)),-.5);FigureColormap(cm)Contourslice(D,[ ] , [] , image_num)axis ijxlim(x)ylim(y)daspect([1 , 1 , 1])figurecolormap(cm)contourslice(D , [ ] , [ ] , [1 , 12 , 19 ,27],8);view(3);axis tightfigurecolourmap(map)Ds = smooth3(D);hiso = patch(isosurface(Ds , 5),…

Page 7: K10947 Vikas ct

% Create a grid of x and y data y = -10:0.5:10; x = -10:0.5:10; [X, Y] = meshgrid(x, y); % Create the function values for Z = f(X,Y) Z = sin(sqrt(X.^2+Y.^2)) ./ sqrt(X.^2+Y.^2); % Create a surface contour plor using the surfc function figure surfc(X, Y, Z) % Adjust the view angle view(-38, 18)

% Add title and axis labels title('Normal Response') xlabel('x') ylabel('y') zlabel('z')

Page 8: K10947 Vikas ct
Page 9: K10947 Vikas ct

•Uses of 3-D plots in MATLAB •Well MATLAB is widely used as a computational tool in science and engineering encompassing the fields of physics, chemistry, math and all engineering streams. It is used in a range of applications including: • signal processing and Communications • image and video Processing • control systems • test and measurement • computational finance • computational biology

Page 10: K10947 Vikas ct

Thank You