Figure X 0:0.1:1 y X. Exp (2) Plot (X, Y) : p1 (U) (1-U) P P P

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

2 Explain the concepts about interpolation and approximation 6.

List the MatLab codes for drawing the curve


of parameter polynoimial curve &surface 100 represented with the function: y = 5x2 + 6x + 3.
*Curve interpolation Given a number of data points 𝑥 = 𝑙𝑖𝑛𝑠𝑝𝑎𝑐𝑒 (0,2,20)
pi(i = 0 ,1 ,... , n) by sequence, which are 𝑦 = 5 ∗ 𝑥. ^2 + 6 ∗ 𝑥 + 3
determined by the designer or obatined through 𝑎𝑥𝑖𝑠 ([0, 10, 0, 10,0,10])
measurment, construct a curve passing through all ℎ𝑜𝑙𝑑 𝑜𝑛
these points one by one. The resulting curve is ℎ𝑛𝑑𝑙 = 𝑝𝑙𝑜𝑡(𝑥, 𝑦)
named interpolation curve 𝑠𝑒𝑡(ℎ𝑛𝑑𝑙, ′𝑀𝑎𝑟𝑘𝑒𝑟′, ′𝑥′)
*Curve approximation Given a number of data 15 List the mat lab program codes to show the curve y =
points pi(i = 0 ,1 ,... , n) by sequence, construct a x2 at range 0≤ x ≤1. 50
curve so that it comes closest to them in some Figure;
degeree. The resulting curve is named x=0:0.1:1;
approximation curve y=x.* exp (2);
*Similarly, these concepts can be extended to the plot (x,y);
surface, then we have the concepts of surface 24. Given a curve function p(u) = [5u2, u4], solve the following
interpolation and surface approximation. vectors at u=0 and u=1 respectively : (15 points) position vectors
1. What are the requirements of shape mathematics p(0) , p(1) tangential vectors p'(0) , p'(1) unit direction vectors
description? d'(0) , d'(1)Answer :
Uniqueness, the shape determined by limited (1)𝒑(0) = [0 0], 𝒑(1) = [5 1]
information should be unique. Geometric (2)𝒑′(0) = [0, 0], 𝒑′(1) = [10,4]
invariability, mathematical representation and its (3)𝒅′(0) = [1,0], 𝒅′(1) = [1,0]
shape does not change with the coordinate 14. List the 2 order Bezier curve function defined by given
system. Easy to be bounded. The unity, can 3 control vertexes b0 = [2 4], b1 = [3 5], b2 = [7 9]?
uniformly expresses various shape and processes, Calculate the point and the derivative vector at u = 0.2
and adapt to various situation, such as plane and using the explicit method, the recursive method and the
space curve, infinite slope ratio. Easy to be drawing method/ geometric method?
smoothly connected Easy to control the shapes, 𝑃(𝑢) = (1 − 𝑢)2 𝑏0 + 2𝑢(1 − 𝑢)𝑏1 + 𝑢2 𝑏2
not only the global control ability, but also the local = (1 − 0.2)2 𝑏0 + 2(0.2)(1 − 0.2)𝑏1 + 0.22 𝑏2
control ability. = 0.64𝑏0 + 0.32𝑏1 + 0.04𝑏2
3. Given two points p0 = [3 5 2], p1 = [7 6 4], list the linear = 0.64[2 4] + 0.32[3 5] + 0.04[7 9]
interpolation straight line function and a general form straight = [1.28 2.56] + [0.96 1.6] + [0.28 0.36]
line between them? Calculate the point at u = 0.2 on them?
Calculate the tangential vector at u = 0.2 on them? 𝑃(0.2) = [2.52 4.52]
𝑝1 (𝑢) = (1 − 𝑢) 𝑝0 + 𝑢𝑝1 𝒑′ (0.2) = 2(1 − 𝑢)(−1)[2 4] + (2 − 4𝑢)𝑏1 + 2𝑢𝑏2
= [3.2 3.2]
= (1 − 𝑢) [3 5 2] + 𝑢 [7 6 4], 0 ≤ 𝑢 ≤ 1
𝑝2 (𝑢) = (1 − 𝑢3 ) 𝑝0 + 𝑢3 𝑝1
= (1 − 𝑢3 ) [3 5 2] + 𝑢3 [7 6 4], 0 ≤ 𝑢 ≤ 1
𝑝1 (0.2) = 0.8 [3 5 2] + 0.2[7 6 4]
= [3.8 5.2 2.4]
𝑝2 (0.2) = 0.992[3 5 2] + 0.008[7 6 4]
= [3.032 5.008 6.008]
𝑝1′ (0.2) = − [3 5 2] + [7 6 4] = [4 1 2]
𝑝2′ (0.2) = −3 × 0.04 × [3 5 2] + 3 × 0.04]
× [7 6 4] = [0.48 0.12 0.24 ] Geometric Method Drawing method
4. A point p = [10 8] first translated by a displacement vector T 8. List the NC program for the part shown in the following figure.
= [3 6], then rotated with the origin point [0 0] by the angle a =
30°, calculate its new coordinates p′? A point p = [10 8] first
692 X-10 Y-10 LF
rotated with the origin point by the angle a = 30°, then N01 G90 G17 G00 X10 Y10 LF
translated with a displacement vector T = [3 6], calculate its N02 G01 X30 F100 LF
new coordinates p′?
N03 G03 X40 Y20 I0 J-10 LF
𝟏) 𝒑1 = 𝒑 + 𝑻 = [10 8] + [3 6]
N04 G02 X30 Y30 I0 J-10 LF
= [13 14] N05 G01 X10 Y20 LF
𝒑′ = [𝑥1 × cos(𝑎) − 𝑦1 × sin(𝑎), 𝑥 × sin(𝑎) N06 Y10 LF
+ 𝑦 × cos(𝑎)] N07 G00 X-10 Y-10 M02 LF
= [4.2583 18.6244] 11. Given a curve function p(θ) = [acos θ a sin θ b θ],
2) 𝒑1 = [𝑥 × cos(𝑎) − 𝑦 × sin(𝑎) , 𝑥 × sin(𝑎) calculate its arc length with respect to 0 ≤ θ ≤2π .
+ 𝑦 × cos(𝑎)] 𝑃(𝜃) = [𝑎𝑐𝑜𝑠𝜃 𝑎𝑠𝑖𝑛𝜃 𝑏𝜃]
= [4.6603 11.9282] 𝑃 ′ (𝜃) = [−𝑎𝑠𝑖𝑛𝜃 𝑎𝑐𝑜𝑠𝜃 𝑏]𝑑𝜃
2𝜋
𝒑′ = 𝒑1 + 𝑻 = [7.6603 17.9282] 𝑆(𝜃) = ∫ [𝑃 ′ (𝜃)] 𝑑𝜃
5. Given a double linear interpolation surface function: 100 0
2𝜋
= ∫ √[𝑠(𝑥)]2 + [𝑠(𝑦)]2 + [𝑠(𝑧)]2 𝑑𝜃
0
where p00=[5 2 4], p01=[4 4 3], p10=[3 4 2], p11=[6 8 6], calculate 2𝜋
the position vector p(0.2,0.2), the partial derivative vectors pu
(0.2,0.2) and pv (0.2,0.2), the normal vector n(0.2,0.2) on it with
= ∫ √𝑎2 𝑠𝑖𝑛2 𝜃 + 𝑎2 𝑐𝑜𝑠 2 𝜃 + 𝑏2 𝑑𝜃
the u and v values, u=0.2, v=0.2. 0
2𝜋
5 4 1 − 0.2 = ∫ √𝑎2 + 𝑏2 𝑑𝜃
𝑥(0.2,0.2) = [1 − 0.2,0.2] [ ][ ] = 4.567
3 6 0.2 0
Same procedure we get 𝑦(0.2,0.2) = 2.887 and 𝑆(𝜃) = √𝑎2 + 𝑏2 2𝜋
𝑧(0.2,0.2) = 3.6
So, 𝒑 (0.2,0.2) = [4.56 2.88 3.6] 𝑆 = √𝑎2 + 𝑏2 2𝜋
13. Given a cylinder screw curve function ρ (θ) = [a cos θ a sin θ b
𝒑𝒖 (0.2,0.2) = [−1.2 2.4 − 1] θ] (0≤θ≤2π), calculate its arc length s and transform it into the
𝒑𝒗 (0.2,0.2) = [−0.2 2.4 0] function of of parameter s and special parametric vector function?
100
𝑛 (0.2,0.2) = [2.4 0.2 − 2.4] Parameter 𝑠:
20. Given the following two functions, identify
if it’s a line or not?(10 points) s  2 a 2  b 2
p1(u) = (1-u)p0 + u p1 This is the line as it is      bs 
ps   a cos
s s
 a sin  
2   2 2 
Lincor Equation and p2(u) = (1-u) 3p0 + u3 p1   a b   a b  a 2  b 2 
2

This is the not a line as it is Polynomial Equation Special parametric vector function:
𝑆 = 2𝜋 (𝑎2 + 𝑏2 )1/2
𝑃 (𝜃) = 𝑎 𝑐𝑜𝑠 𝜃[1 0 0] + 𝑎 𝑠𝑖𝑛 𝜃[0 1 0] + 𝑏 𝜃[0 0 1]
10. Illustrate the advantages of NC machining? 23. List the 2 order Bezier curve function defined by given 3
High machining precision Unaffected by the control vertexes?
shapes of work-piece. Hence, errors deriving from p(t )  (1  t ) 2 b0  2t (1  t )b0  t 2 b1 ,0  t  1
manipulator’s experience is avoided, and the 25.List the MatLab codes for drawing a line passing two points
consistency among parts in the same group is p0 = [x0 y0 z0], p1 = [x1 y1 z1].
ensured, leading to the ensurance of the produce u=linspace(0,1,20)
quality. x=(1-u)*x0+u*x1
High efficiency Many operations, such as y=(1-u)*y0+u*y1
drawing lines, repeatedly assemblies and z=(1-u)*z0+u*z1
locations, and detections are avoided significantly, axis([0, 10, 0, 10,0,10])
text(1,2,4,'p0')
hence the producing efficiency is enhanced.
text(9,6,8,'p1')
High automation except manually install of the
hold on
rough body, entire machining process is hndl = plot3(x,y,z)
automatically carried out, resulting in reducing of set(hndl,'Marker','x')
the labor intensity, and improvements of working 26.Given a curve function p(u) = [2u2 u u3+5], answer
condition. the following questions:
Short preparation period Due to the digital (1) transform it into the special parameter vector function.
controlling mode, time consuming deriving form (2) transform it into the full standard base representation.
large amounts of special fixtures, templates, and Ans. p(u) = 2u2[1 0 0] + u[0 1 0] + (u3+5)[0 0 1]
p(u) = 2u2[1 0 0] + u[0 1 0] + (u3+5)[0 0 1] + (-2u2-u- u3-4)[0
standard sample parts can be saved
0 0]
Easy building of communication network 18. Given the interpolation conditions shows in the following
because numerical information is used to express pictures, list the Fugerson surface function interpolating them.
the process information of the NC machine, the
information can be easy to communicate with CAD
system, and the system integrating of CAD and
CAM can be established.

16. Explain the meaning of Geometric invariability?


Analytic equations and parametric function have
geometric invariability or not respectively? (10 points)
A shape (curve or surface) is determined by limit
information (points or derivative vectors).If the
relative positions between these information’s are
fixed, then the shape defined by them should be Ans:
fixed too, and it should not be changed with the
coordination system.
Explicit and implicit equations have not the
geometric invariability. Parametric curves and
surfaces sometimes have the geometric
invariability, but not always.
21. What’s the endpoint geometric property of a 19. List the special parameters vector function with
Bezier curve? basic expression of curve and surface in CAGD?
The start point of a Bezier curve is just the first
control vertex polygon, the end point of a Bezier
curve is the last vertex 0≤u≤1
22. What are Research object and Core question of
CAGD?
Research object: Mathematics expression of
geometric shape of manufacture products (
0≤u≤1, 0≤v≤1
Analytic surface, freeform surface ). 19. List the special parameters vector function with
Core question: To research mathematics basic expression of curve and surface in CAGD?
description method of geometric shape witch can
be easily indicated by computer and satisfied
requirements such as shape expression and 0≤u≤1
geometry design,.
9. Given two vectors p1 = [6 3 4], p2 = [8 4 6], calculate
dot product and cross product of them?
𝑝1 · 𝑝2 = 6 × 8 + 3 × 4 + 4 × 6 = 84
𝑝1 × 𝑝2 = 12𝑖 + 32𝑗 + 24𝑘 – 24𝑘 – 16𝑖 – 36𝑗 0≤u≤1, 0≤v≤1
= [2 – 4 0]
19. Given a vector x = [3 2 4], calculate its length and
direction? (10 points)
Answer:
𝑥
𝐿 = √𝑥 2 + 𝑦 2 +𝑧 2 , 𝜃𝑥 = 𝑐𝑎𝑠 −1 2 2 2 ;
√𝑥 +𝑦 +𝑧
𝑦
𝜃𝑦 = 𝑐𝑎𝑠 −1 ;
√𝑥 2 + 𝑦 2 +𝑧 2
−1
𝑧
𝜃𝑧 = 𝑐𝑎𝑠 ;
√𝑥 2 + 𝑦 2 +𝑧 2

Length = 5.3852 Direction = [0.5571 0.3714 0.7428]


17. Given 2 points p0 = [3 5], p1 = [7 6], and their
derivative vectors p =[1 2], p =[3 -1] construct a
0 1

Fergesion parametric cubic curve which interpolate


them? Calculate the point at u = 0.2 on it?

p(0.2) = [3.4480 5.3920]

You might also like