written 5.6 years ago by |
x=rcosθ
y=rsinθ
where 0≤θ≤2π........................(1)
If uniformly spaced points lie on the periphery of the circle, then δθ=consatnt (increament in angle)
∴ (1) can be expressed as:-
xi+1=rcos(θi+δθ)
yi+1=rsin(θi+δθ)
∴xi+1=rcosθicosδθ−rsinθisinδθ
∴yi+1=rsinθicosδθ+rcosθisinδθ
Simplifying:
xi+1=xicosδθ−yisinδθ
yi+1=xisinδθ−yicosδθ
A not origin circle is obtained by considering a single origin centered unit circle(generation); then scaling and translation.
E.g. Generate a circle of radius 2 with centre located at (2,2).
Solution
- Generate an origin centered circle (unit radius)
- Scale by factor of 2
- Translate by (2,2) units
Assuming 8 number of points on the circle equally spaced.
(Note: Normally, a much larger number of points is required for display, depends on the radius of circle.)
∴δθ=2πc8=πc4=45o
Starting with point 1;
x1=rcosθ1=1cos0=1
y1=rsinθ1=1sin0=0
∴ Using parametric equations;
we get the x and y values of the other points also.
∴x2=x1cosδθ−y1sinδθ
∴y2=x1sinδθ+y1cosδθ
Here; sinδθ=cosδθ(∵θ=45)
=1√2
∴x2=1√2
y2=1√2
Hence; the results for the unit circle can be translated as:-
i | xi | yi |
---|---|---|
1 | 1 | 0 |
2 | 1√2 | 1√2 |
3 | 0 | 1 |
4 | −1√2 | 1√2 |
5 | -1 | 0 |
6 | 1√2 | −1√2 |
7 | 0 | -1 |
8 | 1√2 | −1√2 |
Q. Generate a circle of radius 4 width center located at (2, 2)
Sr. No. | θ | x=xc+rcosθ | y=yc+rsinθ |
---|---|---|---|
1 | 0o | 6 | 2 |
2 | 45o | 4.8284 | 4.8284 |
3 | 90o | 2 | 6 |
4 | 135o | -0.828 | 4.8284 |
5 | 180o | -2 | 2 |
6 | 225o | -0.828 | -0.828 |
7 | 270o | 2 | -2 |
8 | 315o | 4.8284 | -0.828 |
9 | 360o | 6 | 2 |
Q. Generate a circle (0 to 90o ) of radius 4 width center located at (2, 2) in incremental co-ordinate.
Sr No | θ | xi | yi | x=xc+rcosθ | y=yc+rsinθ |
---|---|---|---|---|---|
1 | 0o | - | - | 6 | 2 |
2 | 30o | 6 | 2 | 5.464 | 4 |
1 | 60o | 5.464 | 4 | 3.999 | 5.464 |
1 | 90o | 4 | 5.464 | 2 | 6 |