Question: Problem 2: Answer using matlab please. Read in surface data and plot surfaces with a centerline. Deliverables: 1. Script to read in data and plot

Problem 2: Answer using matlab please.

Read in surface data and plot surfaces with a centerline.

Deliverables:

1. Script to read in data and plot it

a) Find the axis

b) Plot it, too

2. Plot of surfaces with centerline

Step by Step Instructions:

1. Read in the 3 surface files, srfX, srfY, and srfZ (Use 3 arbitrary arrays (80x50 2d arrays with the X, Y, and Z coordinates of the surface))

2. Plot these using surf

a) Set the color to be whatever you want (I used gray)

b) Turn the edges off (EdgeColor, none)

c) See above for turning on camera light and doing

3. Calculate the mid-line of the surface (i.e., the black line that runs down the middle)

a) This is the average of each circle of points

.....One point for each circle

b) A cylinder is a sheet of paper (the grid) wrapped around so the opposite edges touch

......Try this with a piece of paper make a telescope out of it

......Sketch a grid on the paper see how one row (or column) of the grid makes one circle?

c) Use mean to find the average of each circle

.....eg xC = mean( xs )

d) Use plot3 to plot the result

4. Now plot the surface AND the mid-line

a) Plot the mid-line first

b) Then plot the surface transparent

c) Then make the surface transparent using alpha(0.2)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!