Professional Documents
Culture Documents
Graphical
Representation
2
Prof. Abdel-Nasser Zayed , CAD/CAM , 1271
3.1 Straight Line
xi = xo + i ∆x
yi = yo + i ∆y
where i = 1, 2, 3, / , n
xn − x o yn − y o
∆x = ∆y =
n n
5
Prof. Abdel-Nasser Zayed , CAD/CAM , 1271
(xL , yR)
●
●
(xR , yL)
6
Prof. Abdel-Nasser Zayed , CAD/CAM , 1271
3.3 Triangle
Any triangle is represented by its three vertices A(xA , yA), B(xB , yB),
C(xC , yC). By knowing the coordinates of the three vertices, CAD
software represents the triangle as three straight lines.
7
Prof. Abdel-Nasser Zayed , CAD/CAM , 1271
3.4 Circle
A circle is represented by its center O(xo , yo) and its radius “R”. To
plot a circle in CAD software, the coordinates of Pi(xi , yi) should be
calculated from θi = 0o to θi = 360o, as
xi = xo + R cos θi
yi = yo + R sin θi
8
Prof. Abdel-Nasser Zayed , CAD/CAM , 1271
3.5 Ellipse
An ellipse is defined by its center O(xo , yo) , its major “a” and its
minor “b”. To plot an ellipse in CAD, the coordinates of Pi(xi , yi) are
calculated as yi is a function of xi for all values of “x” from (xo – a) to
(xo + a) :
2
2 b 2
yi = y o ± b − 2 ( xi − x o )
a
9
Prof. Abdel-Nasser Zayed , CAD/CAM , 1271
3.6 Regular Polygons
A polygon is a geometric shape of N sides. The polygon is called
regular polygon when all sides are equal. In CAD, a regular polygon is
represented by its number of sides “N”, its center O(xo , yo), and the
radius of its exterior circle “R”.
10
Prof. Abdel-Nasser Zayed , CAD/CAM , 1271
N=4 N=5 N=6
11
Prof. Abdel-Nasser Zayed , CAD/CAM , 1271
Example:
It is required to plot a hexagon (regular polygon of N = 6) where its center
O is at (100, 100) and its exterior circle of radius R = 50. Calculate the
coordinates of its vertices.
Solution:
360o 360o
For N = 6, then θ = = = 60o
N 6
For R = 50 and (xo , yo) = (100, 100), then
the 1st vertex is at (x1 , y1) where
x1 = xo + R = 100 + 50 = 150
Vertex “1”
y1 = yo = 100 (150, 100)
The 2nd vertex
x2 = xo + [(x1 – xo) cos 60o – (y1 – yo) sin 60o]
= 100 + [(150 – 100) cos 60o – (100 – 100) sin 60o]
= 125 Vertex “2”
(125, 143.3)
y2 = yo + [(xo – x1) sin 60o + (y1 – yo) cos 60o]
= 100 + [(150 – 100) sin 60o + (100 – 100) cos 60o]
= 143.3 12
Prof. Abdel-Nasser Zayed , CAD/CAM , 1271
The 3rd vertex
x3 = xo + [(x2 – xo) cos 60o – (y2 – yo) sin 60o]
= 100 + [(125 – 100) cos 60o – (143.3 – 100) sin 60o]
= 100 + [12.5 – 37.5]
= 75
13
Prof. Abdel-Nasser Zayed , CAD/CAM , 1271
The 5th vertex
x5 = xo + [(x4 – xo) cos 60o – (y4 – yo) sin 60o]
= 100 + [(50 – 100) cos 60o – (100 – 100) sin 60o]
= 100 + [ –50 cos 60o]
= 75
14
Prof. Abdel-Nasser Zayed , CAD/CAM , 1271
15
Prof. Abdel-Nasser Zayed , CAD/CAM , 1271
END OF
CHAPTER 3