# Travers_ENGR112 Lab10 Surfaces.docx - Week 10 ENGR 112 In...

• 12
• 100% (6) 6 out of 6 people found this document helpful

This preview shows page 1 - 4 out of 12 pages.

Week 10 ENGR 112 In lab exercise Name: Kristen Travers Lab Time: T 12-2pm People Worked With: N/A Websites Used: mathworks.com Time spent on zyBooks (hrs): 0 Time spent on lab (hrs): 1 Submission Instructions Turn all work in to Lab 10 on Gradescope (PDF) and Canvas (.zip file), even if it is not complete yet. If you are not finished, complete the assignment outside of lab and re-submit to Lab 10 on Gradescope and Canvas. All labs are typically due at the same time on Monday every week, but check Canvas if in doubt. Learning objectives: Making and plotting surfaces Plotting in 3D New MATLAB commands These are highlighted in bold in the instructions below. surf( xs, ys, zs, ‘FaceColor’, [0.5, 0.5, 0.5], ‘EdgeColor’, ‘none’) Make a surface. FaceColor and EdgeColor are optional. Color is red, green, blue from 0 to 1 camlight left; lighting phong; - add light and nice shading alpha(0.2); - make the surface transparent. Parameter is 0-1 from less to more transparent sign(x) – returns 1 if x is positive, -1 if x is negative, 0 if x is zero
Week 10 ENGR 112 In lab exercise Lab Problems Files to download to your Lab 10 Folder DataFiles.zip unzip them to get srfX.txt etc Getting Started Anything for experimentation goes here with bullet points Do this o [X, Y, Z] = sphere(); o surf( X,Y,Z ); o axis equal Look at picture than do o [X, Y, Z] = cylinder(); o surf(X,Y,Z); o axis equal o Then do o [X, Y, Z] = cylinder( [1 0.2 1] ); o surf(X,Y,Z) o axis equal o And look at picture Make sure you can read in the data files from DataFiles.zip o X = dlmread( ‘srfX.txt’) same for Y and Z o surf(X,Y,Z) o axis equal o
Week 10 ENGR 112 In lab exercise Problem 1 Make a surface of revolution and plot/draw it Deliverables: 1. Script that does the surface creation and plotting 2. Figure showing the profile curve and the surface Step by Step Instructions : Create a function for the profile curve. If you don’t want to the surface to “pinch” in the