{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

test02_spring08_3

test02_spring08_3 - points(10,15,20 and(25 78 90 The value...

This preview shows page 1. Sign up to view the full content.

% 4/19/11 % Test 2 Fall09 #3 % % 3D Line Plot: A 3D line segment between points p1 = (x1, y2, z3) and % p2 = (x2, y2, z2) is define by the following three equations % x = x1+ t(x2-x1) % y = y1+ t(y2-y1) % z = z1+ t(z2-z1) % where t is from 0 to 1. When t =0 you are at point 1 and when t = 1 you % are at point 2. Write a script that will plot the 3D line segment between
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % points (10,15,20) and (25, 78, 90). The value of t should go from 0 to 1, % with a spacing of 0.5. % t = 0:.5:1; p1 = [10 15 20]; p2 = [25 78 80]; y = p1(1) + t*(p2(1) - p1(1)); y = p1(2) + t*(p2(2) - p1(2)); z = p1(3) + t*(p2(3) - p1(3)); plot3(x,y,z)...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online