Professional Documents
Culture Documents
Aug. 1, 2019
* Quantities in bold face represents a vector
1. Parameters of an ellipse
a. Find the centre, the length of semi-major and semi-minor axis and the
orientation of an ellipse given two conjugate diameters, as shown in Fig.1
b. Use the following vectors as the end points of the conjugate diameters
2 6 5 1
𝑷𝟏 = [ ] ; 𝑷𝟐 = [ ] ; 𝑷𝟑 = [ ] ; 𝑷𝟒 = [ ]
1 1 6 4
c. Verify the parameters obtained using Solidworks software.
Yw
P3 Xw
P5
L2
θ2 θ3
θ1 P2
L1
Pc
P4
P1
X
Figure 1
Z
2. Write a MATLAB code to draw a circle and ellipse using recursive algorithm. Use
the following equation for the same.
For circle:
𝑥𝑛 = 𝑥𝑐 + 𝑅 cos 𝑢𝑛
𝑦𝑛 = 𝑦𝑐 + 𝑅 sin 𝑢𝑛
For ellipse:
𝑥𝑛 = 𝑥𝑐 + 𝐴 cos 𝑢𝑛
𝑦𝑛 = 𝑦𝑐 + 𝐵 sin 𝑢𝑛 0 ≤ 𝑢 ≤ 2𝜋