|
請matlab 高手幫幫忙. 小弟我有個 take home final , 3/18 due. 是要用 matlab 編寫 program 的, 但是我對 matlab 軟件是一竅不通. 請幫幫小弟, 有沒有 matlab code 可以提供 或者教教 小弟如何編寫以下的第 3 及第 4 題 的 matlab code.
Q3. Write computer programsto perform the following fourtasks. Perform two examples for each task.Submit your programs with their associated inputs and outputs.
a. Hermite curve design
Inputs: Hermite geometric coefficient matrix
Outputs: i) a brief program description, ii) your input data, iii) 100 numerical data points of the resultant Hermite curve and the values of the end tangent vectors, and iv) a computer plot that shows the pc curve, the two end positions, and the two end tangent vectors including both component values and direction arrowhead
b. Bezier curve design
Inputs: n and Bezier control points, for n = 3 (You may set n as a constant in your program.)
Outputs: i) a brief program description, ii) your input data, iii) 100 numerical data points of the resultant Bezier curve, and iv) a computer plot that shows the Bezier curve and the connected control polygon
c. NURBS curve design
Inputs: n, NURBS control points, weights, and type (open or closed), for k = 4 (You must set n as a variable in your program.)
Outputs: i) a brief program description, ii) your input data, iii)100 numerical data points of the resultant NURBS curve, and iv) a computer plot that shows the NURBS curve and the connected control polygon. (one example for open curve and one for closed curve)
d. NURBS surface design
Inputs: m, n, NURBS control points, weights, and type (open or closed), for (You may set both m and n as constant in your program)
Outputs: i) a brief program description, ii) your input data, iii) 100 numerical data points of the resultant NURBS surface, and iv) a computer plot that shows the NURBS surface and the connected NURBS control polyhedron. (one example for partially closed surface and one for closed surface)
Q4. Write a computer program to fit the five points p0=(1, 3, 4), p1=(2, 1, 7), p2=(4, -2, 6), p3=(-1, 0, 3), and p4=(-2, -3, 2) by a 4-segment composite parametric cubic curve with C2 continuity and plot the results for the following three cases:
1. normalized parameter u ( ) for all segments with boundary conditions ,
2. un-normalized parameter t (time in seconds), and t0 = 0, t1 = 2, t2 = 4, t3 = 7, t4 = 15, with initial conditions , and
感激萬分! |
|