SlideShare une entreprise Scribd logo
1  sur  16
Unit 1
Basic of computer graphics
By: Medhavi Pandey
Outline
⮚Circle Generating Algorithms
▪ Mid Point Circle drawing algorithm.
▪ Numerical Practice
Mid –Point Circle Algorithm
• Given the center point and radius of circle, Mid Point Circle Drawing
Algorithm attempts to generate the points of one octant.
• The points for other octants are generated using the eight symmetry
property.
Mid –Point Circle Algorithm
• Procedure-
• Given-
• Centre point of Circle = (X0, Y0)
• Radius of Circle = R
• Step-01:
• Assign the starting point coordinates (X0, Y0) as-
• X0 = 0
• Y0 = R
Mid –Point Circle Algorithm
• Step-02:
• Calculate the value of initial decision parameter P0 as-
• P0 = 1 – R
• Step-03:
• Suppose the current point is (Xk, Yk) and the next point is (Xk+1, Yk+1).
• Find the next point of the first octant depending on the value of
decision parameter Pk.
• Follow the below two cases-
Algorithm
• Step1: input radius r, center (xc ,yc) and obtain the first point on the
circumference of a circle centered on an origin ( (x,y) =(0,r) )
• Put x =0, y =r
• Calculate initial value decision parameter as p=1-r
• Step2: Repeat steps while x ≤ y
Plot (x, y)
If (p<0)
Then set x=x+1
Y=y
P = P + 2x + 3
• Else
P = P + 2(x-y)+1
y =y - 1
x =x+1
• To find the points for other seven octants, follow the eight symmetry
property of circle.
Problem: Given the centre point coordinates (0, 0) and radius as 10,
generate all the points to form a circle.
• Solution: Given-
• Centre Coordinates of Circle (X0, Y0) = (0, 0)
• Radius of Circle = 10
• Step-01:
• Assign the starting point coordinates (X0, Y0) as-
• X0 = 0
• Y0 = R = 10
• Calculate the value of initial decision parameter P0 as-
• P0 = 1 – R
• P0 = 1 – 10
• P0 = -9
• As Pinitial < 0, so case-01 is satisfied.
• Thus,
• Xk+1 = Xk + 1 = 0 + 1 = 1
• Yk+1 = Yk = 10
• Pk+1 = Pk + 2 * Xk+1 + 3 = -9 + (2 x 1) + 1 = -6
Pk Pk+1 (Xk+1, Yk+1)
(0, 10)
-9 -6 (1, 10)
-6 -1 (2, 10)
-1 6 (3, 10)
6 -3 (4, 9)
-3 8 (5, 9)
8 5 (6, 8)
• Algorithm calculates all the points of octant-1 and terminates.
• Now, the points of octant-2 are obtained using the mirror effect by
swapping X and Y coordinates.
Octant-1 Points
Octant-2
Points
(0, 10) (8, 6)
(1, 10) (9, 5)
(2, 10) (9, 4)
(3, 10) (10, 3)
(4, 9) (10, 2)
(5, 9) (10, 1)
(6, 8) (10, 0)
Now, the points for rest of the part are generated by following the signs of other
quadrants. The other points can also be generated by calculating each octant separately.
Advantages of Mid Point Circle Drawing
Algorithm
• It is a powerful and efficient algorithm.
• The entire algorithm is based on the simple equation of circle X2 +
Y2 = R2.
• It is easy to implement from the programmer’s perspective.
• This algorithm is used to generate curves on raster displays.
Disadvantages of Mid Point Circle Drawing
Algorithm
• Accuracy of the generating points is an issue in this algorithm.
• The circle generated by this algorithm is not smooth.
• This algorithm is time consuming.
Difference Between Midpoint Circle
Algorithm And Bresenham's Circle
Algorithm
Midpoint Circle Algorithm Bresenham's Circle Algorithm
This algorithm is used to generate curves on raster
displays. It is quite Simple to implement.
Bresenham's circle algorithm is simply an optimized
version of the Midpoint circle algorithm. So, it needs
very less time and requires less memory consuming
Mid Point may still needs floating point. Although it
also avoids square root or trigonometric calculation by
adopting integer operation only.
It uses just integer arithmetics.
Accuracy of the generating points is an issue in this
algorithm.
Algorithm is accurate and efficient as it avoids using
round function or floating point calculations.
THANK YOU

Contenu connexe

Similaire à PPT_14.pptx

Computer_Graphics_circle_drawing_techniq.ppt
Computer_Graphics_circle_drawing_techniq.pptComputer_Graphics_circle_drawing_techniq.ppt
Computer_Graphics_circle_drawing_techniq.pptAliZaib71
 
Output primitives in Computer Graphics
Output primitives in Computer GraphicsOutput primitives in Computer Graphics
Output primitives in Computer GraphicsKamal Acharya
 
Graphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsGraphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsThirunavukarasu Mani
 
Graphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsGraphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsKetan Jani
 
Bressenham’s Midpoint Circle Drawing Algorithm
Bressenham’s Midpoint Circle Drawing AlgorithmBressenham’s Midpoint Circle Drawing Algorithm
Bressenham’s Midpoint Circle Drawing AlgorithmMrinmoy Dalal
 
Output Primitives in Computer Graphics and Multimedia
Output Primitives in Computer Graphics and MultimediaOutput Primitives in Computer Graphics and Multimedia
Output Primitives in Computer Graphics and Multimediasaranyan75
 
Computer Graphics and Multimedia Output primitives
Computer Graphics and Multimedia Output primitivesComputer Graphics and Multimedia Output primitives
Computer Graphics and Multimedia Output primitivessaranyan75
 
Chapter 3 - Part 1 [Autosaved].pptx
Chapter 3 - Part 1 [Autosaved].pptxChapter 3 - Part 1 [Autosaved].pptx
Chapter 3 - Part 1 [Autosaved].pptxKokebe2
 
"Fundamentals of Monocular SLAM," a Presentation from Cadence
"Fundamentals of Monocular SLAM," a Presentation from Cadence"Fundamentals of Monocular SLAM," a Presentation from Cadence
"Fundamentals of Monocular SLAM," a Presentation from CadenceEdge AI and Vision Alliance
 
Lab lecture 1 line_algo
Lab lecture 1 line_algoLab lecture 1 line_algo
Lab lecture 1 line_algosimpleok
 
Line drawing algorithm and antialiasing techniques
Line drawing algorithm and antialiasing techniquesLine drawing algorithm and antialiasing techniques
Line drawing algorithm and antialiasing techniquesAnkit Garg
 
Computer graphics lab report with code in cpp
Computer graphics lab report with code in cppComputer graphics lab report with code in cpp
Computer graphics lab report with code in cppAlamgir Hossain
 
DDA (Digital Differential Analyzer ) Line Drawing Algorithm.pptx
DDA (Digital Differential Analyzer ) Line Drawing Algorithm.pptxDDA (Digital Differential Analyzer ) Line Drawing Algorithm.pptx
DDA (Digital Differential Analyzer ) Line Drawing Algorithm.pptxhasibulhamim1
 
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdfCD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdfRajJain516913
 

Similaire à PPT_14.pptx (20)

Computer_Graphics_circle_drawing_techniq.ppt
Computer_Graphics_circle_drawing_techniq.pptComputer_Graphics_circle_drawing_techniq.ppt
Computer_Graphics_circle_drawing_techniq.ppt
 
Output primitives in Computer Graphics
Output primitives in Computer GraphicsOutput primitives in Computer Graphics
Output primitives in Computer Graphics
 
Graphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsGraphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygons
 
Graphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsGraphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygons
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Computer graphics 2
Computer graphics 2Computer graphics 2
Computer graphics 2
 
Bressenham’s Midpoint Circle Drawing Algorithm
Bressenham’s Midpoint Circle Drawing AlgorithmBressenham’s Midpoint Circle Drawing Algorithm
Bressenham’s Midpoint Circle Drawing Algorithm
 
Output Primitives in Computer Graphics and Multimedia
Output Primitives in Computer Graphics and MultimediaOutput Primitives in Computer Graphics and Multimedia
Output Primitives in Computer Graphics and Multimedia
 
Computer Graphics and Multimedia Output primitives
Computer Graphics and Multimedia Output primitivesComputer Graphics and Multimedia Output primitives
Computer Graphics and Multimedia Output primitives
 
Chapter 3 - Part 1 [Autosaved].pptx
Chapter 3 - Part 1 [Autosaved].pptxChapter 3 - Part 1 [Autosaved].pptx
Chapter 3 - Part 1 [Autosaved].pptx
 
Unit 3
Unit 3Unit 3
Unit 3
 
"Fundamentals of Monocular SLAM," a Presentation from Cadence
"Fundamentals of Monocular SLAM," a Presentation from Cadence"Fundamentals of Monocular SLAM," a Presentation from Cadence
"Fundamentals of Monocular SLAM," a Presentation from Cadence
 
Lec-4_Rendering-1.pdf
Lec-4_Rendering-1.pdfLec-4_Rendering-1.pdf
Lec-4_Rendering-1.pdf
 
Lab lecture 1 line_algo
Lab lecture 1 line_algoLab lecture 1 line_algo
Lab lecture 1 line_algo
 
Line drawing algorithm and antialiasing techniques
Line drawing algorithm and antialiasing techniquesLine drawing algorithm and antialiasing techniques
Line drawing algorithm and antialiasing techniques
 
dld 01-introduction
dld 01-introductiondld 01-introduction
dld 01-introduction
 
bresenham circles and polygons in computer graphics(Computer graphics tutorials)
bresenham circles and polygons in computer graphics(Computer graphics tutorials)bresenham circles and polygons in computer graphics(Computer graphics tutorials)
bresenham circles and polygons in computer graphics(Computer graphics tutorials)
 
Computer graphics lab report with code in cpp
Computer graphics lab report with code in cppComputer graphics lab report with code in cpp
Computer graphics lab report with code in cpp
 
DDA (Digital Differential Analyzer ) Line Drawing Algorithm.pptx
DDA (Digital Differential Analyzer ) Line Drawing Algorithm.pptxDDA (Digital Differential Analyzer ) Line Drawing Algorithm.pptx
DDA (Digital Differential Analyzer ) Line Drawing Algorithm.pptx
 
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdfCD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
 

Plus de SanandMishra

Plus de SanandMishra (6)

New_title.pptx
New_title.pptxNew_title.pptx
New_title.pptx
 
AI.pptx
AI.pptxAI.pptx
AI.pptx
 
Graphis_AI_Desiggn.pptx
Graphis_AI_Desiggn.pptxGraphis_AI_Desiggn.pptx
Graphis_AI_Desiggn.pptx
 
new ai techniques.pptx
new ai techniques.pptxnew ai techniques.pptx
new ai techniques.pptx
 
PPT_17.pptx
PPT_17.pptxPPT_17.pptx
PPT_17.pptx
 
PPT_1.pptx
PPT_1.pptxPPT_1.pptx
PPT_1.pptx
 

Dernier

💰Call Girl In Bangalore☎️63788-78445💰 Call Girl service in Bangalore☎️Bangalo...
💰Call Girl In Bangalore☎️63788-78445💰 Call Girl service in Bangalore☎️Bangalo...💰Call Girl In Bangalore☎️63788-78445💰 Call Girl service in Bangalore☎️Bangalo...
💰Call Girl In Bangalore☎️63788-78445💰 Call Girl service in Bangalore☎️Bangalo...gragneelam30
 
Call Girls Rishikesh Just Call 9667172968 Top Class Call Girl Service Available
Call Girls Rishikesh Just Call 9667172968 Top Class Call Girl Service AvailableCall Girls Rishikesh Just Call 9667172968 Top Class Call Girl Service Available
Call Girls Rishikesh Just Call 9667172968 Top Class Call Girl Service AvailableSteve Davis
 
Chennai ❣️ Call Girl 6378878445 Call Girls in Chennai Escort service book now
Chennai ❣️ Call Girl 6378878445 Call Girls in Chennai Escort service book nowChennai ❣️ Call Girl 6378878445 Call Girls in Chennai Escort service book now
Chennai ❣️ Call Girl 6378878445 Call Girls in Chennai Escort service book nowtanudubay92
 
Difference Between Skeletal Smooth and Cardiac Muscles
Difference Between Skeletal Smooth and Cardiac MusclesDifference Between Skeletal Smooth and Cardiac Muscles
Difference Between Skeletal Smooth and Cardiac MusclesMedicoseAcademics
 
💞 Safe And Secure Call Girls Coimbatore🧿 6378878445 🧿 High Class Coimbatore C...
💞 Safe And Secure Call Girls Coimbatore🧿 6378878445 🧿 High Class Coimbatore C...💞 Safe And Secure Call Girls Coimbatore🧿 6378878445 🧿 High Class Coimbatore C...
💞 Safe And Secure Call Girls Coimbatore🧿 6378878445 🧿 High Class Coimbatore C...dilbirsingh0889
 
Lucknow Call Girls Service { 9984666624 } ❤️VVIP ROCKY Call Girl in Lucknow U...
Lucknow Call Girls Service { 9984666624 } ❤️VVIP ROCKY Call Girl in Lucknow U...Lucknow Call Girls Service { 9984666624 } ❤️VVIP ROCKY Call Girl in Lucknow U...
Lucknow Call Girls Service { 9984666624 } ❤️VVIP ROCKY Call Girl in Lucknow U...Janvi Singh
 
Call Girls in Lucknow Just Call 👉👉 8875999948 Top Class Call Girl Service Ava...
Call Girls in Lucknow Just Call 👉👉 8875999948 Top Class Call Girl Service Ava...Call Girls in Lucknow Just Call 👉👉 8875999948 Top Class Call Girl Service Ava...
Call Girls in Lucknow Just Call 👉👉 8875999948 Top Class Call Girl Service Ava...Janvi Singh
 
Russian Call Girls In Pune 👉 Just CALL ME: 9352988975 ✅❤️💯low cost unlimited ...
Russian Call Girls In Pune 👉 Just CALL ME: 9352988975 ✅❤️💯low cost unlimited ...Russian Call Girls In Pune 👉 Just CALL ME: 9352988975 ✅❤️💯low cost unlimited ...
Russian Call Girls In Pune 👉 Just CALL ME: 9352988975 ✅❤️💯low cost unlimited ...chanderprakash5506
 
Call Girls Service Jaipur {9521753030 } ❤️VVIP BHAWNA Call Girl in Jaipur Raj...
Call Girls Service Jaipur {9521753030 } ❤️VVIP BHAWNA Call Girl in Jaipur Raj...Call Girls Service Jaipur {9521753030 } ❤️VVIP BHAWNA Call Girl in Jaipur Raj...
Call Girls Service Jaipur {9521753030 } ❤️VVIP BHAWNA Call Girl in Jaipur Raj...Janvi Singh
 
👉 Chennai Sexy Aunty’s WhatsApp Number 👉📞 7427069034 👉📞 Just📲 Call Ruhi Colle...
👉 Chennai Sexy Aunty’s WhatsApp Number 👉📞 7427069034 👉📞 Just📲 Call Ruhi Colle...👉 Chennai Sexy Aunty’s WhatsApp Number 👉📞 7427069034 👉📞 Just📲 Call Ruhi Colle...
👉 Chennai Sexy Aunty’s WhatsApp Number 👉📞 7427069034 👉📞 Just📲 Call Ruhi Colle...rajnisinghkjn
 
Bhawanipatna Call Girls 📞9332606886 Call Girls in Bhawanipatna Escorts servic...
Bhawanipatna Call Girls 📞9332606886 Call Girls in Bhawanipatna Escorts servic...Bhawanipatna Call Girls 📞9332606886 Call Girls in Bhawanipatna Escorts servic...
Bhawanipatna Call Girls 📞9332606886 Call Girls in Bhawanipatna Escorts servic...Dipal Arora
 
Call Girls Kathua Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Kathua Just Call 8250077686 Top Class Call Girl Service AvailableCall Girls Kathua Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Kathua Just Call 8250077686 Top Class Call Girl Service AvailableDipal Arora
 
Call Girl in Chennai | Whatsapp No 📞 7427069034 📞 VIP Escorts Service Availab...
Call Girl in Chennai | Whatsapp No 📞 7427069034 📞 VIP Escorts Service Availab...Call Girl in Chennai | Whatsapp No 📞 7427069034 📞 VIP Escorts Service Availab...
Call Girl in Chennai | Whatsapp No 📞 7427069034 📞 VIP Escorts Service Availab...amritaverma53
 
ANATOMY AND PHYSIOLOGY OF RESPIRATORY SYSTEM.pptx
ANATOMY AND PHYSIOLOGY OF RESPIRATORY SYSTEM.pptxANATOMY AND PHYSIOLOGY OF RESPIRATORY SYSTEM.pptx
ANATOMY AND PHYSIOLOGY OF RESPIRATORY SYSTEM.pptxSwetaba Besh
 
Cara Menggugurkan Kandungan Dengan Cepat Selesai Dalam 24 Jam Secara Alami Bu...
Cara Menggugurkan Kandungan Dengan Cepat Selesai Dalam 24 Jam Secara Alami Bu...Cara Menggugurkan Kandungan Dengan Cepat Selesai Dalam 24 Jam Secara Alami Bu...
Cara Menggugurkan Kandungan Dengan Cepat Selesai Dalam 24 Jam Secara Alami Bu...Cara Menggugurkan Kandungan 087776558899
 
Call 8250092165 Patna Call Girls ₹4.5k Cash Payment With Room Delivery
Call 8250092165 Patna Call Girls ₹4.5k Cash Payment With Room DeliveryCall 8250092165 Patna Call Girls ₹4.5k Cash Payment With Room Delivery
Call 8250092165 Patna Call Girls ₹4.5k Cash Payment With Room DeliveryJyoti singh
 
7 steps How to prevent Thalassemia : Dr Sharda Jain & Vandana Gupta
7 steps How to prevent Thalassemia : Dr Sharda Jain & Vandana Gupta7 steps How to prevent Thalassemia : Dr Sharda Jain & Vandana Gupta
7 steps How to prevent Thalassemia : Dr Sharda Jain & Vandana GuptaLifecare Centre
 
Cardiac Output, Venous Return, and Their Regulation
Cardiac Output, Venous Return, and Their RegulationCardiac Output, Venous Return, and Their Regulation
Cardiac Output, Venous Return, and Their RegulationMedicoseAcademics
 
Call Girls Wayanad Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Wayanad Just Call 8250077686 Top Class Call Girl Service AvailableCall Girls Wayanad Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Wayanad Just Call 8250077686 Top Class Call Girl Service AvailableDipal Arora
 
(RIYA)🎄Airhostess Call Girl Jaipur Call Now 8445551418 Premium Collection Of ...
(RIYA)🎄Airhostess Call Girl Jaipur Call Now 8445551418 Premium Collection Of ...(RIYA)🎄Airhostess Call Girl Jaipur Call Now 8445551418 Premium Collection Of ...
(RIYA)🎄Airhostess Call Girl Jaipur Call Now 8445551418 Premium Collection Of ...TanyaAhuja34
 

Dernier (20)

💰Call Girl In Bangalore☎️63788-78445💰 Call Girl service in Bangalore☎️Bangalo...
💰Call Girl In Bangalore☎️63788-78445💰 Call Girl service in Bangalore☎️Bangalo...💰Call Girl In Bangalore☎️63788-78445💰 Call Girl service in Bangalore☎️Bangalo...
💰Call Girl In Bangalore☎️63788-78445💰 Call Girl service in Bangalore☎️Bangalo...
 
Call Girls Rishikesh Just Call 9667172968 Top Class Call Girl Service Available
Call Girls Rishikesh Just Call 9667172968 Top Class Call Girl Service AvailableCall Girls Rishikesh Just Call 9667172968 Top Class Call Girl Service Available
Call Girls Rishikesh Just Call 9667172968 Top Class Call Girl Service Available
 
Chennai ❣️ Call Girl 6378878445 Call Girls in Chennai Escort service book now
Chennai ❣️ Call Girl 6378878445 Call Girls in Chennai Escort service book nowChennai ❣️ Call Girl 6378878445 Call Girls in Chennai Escort service book now
Chennai ❣️ Call Girl 6378878445 Call Girls in Chennai Escort service book now
 
Difference Between Skeletal Smooth and Cardiac Muscles
Difference Between Skeletal Smooth and Cardiac MusclesDifference Between Skeletal Smooth and Cardiac Muscles
Difference Between Skeletal Smooth and Cardiac Muscles
 
💞 Safe And Secure Call Girls Coimbatore🧿 6378878445 🧿 High Class Coimbatore C...
💞 Safe And Secure Call Girls Coimbatore🧿 6378878445 🧿 High Class Coimbatore C...💞 Safe And Secure Call Girls Coimbatore🧿 6378878445 🧿 High Class Coimbatore C...
💞 Safe And Secure Call Girls Coimbatore🧿 6378878445 🧿 High Class Coimbatore C...
 
Lucknow Call Girls Service { 9984666624 } ❤️VVIP ROCKY Call Girl in Lucknow U...
Lucknow Call Girls Service { 9984666624 } ❤️VVIP ROCKY Call Girl in Lucknow U...Lucknow Call Girls Service { 9984666624 } ❤️VVIP ROCKY Call Girl in Lucknow U...
Lucknow Call Girls Service { 9984666624 } ❤️VVIP ROCKY Call Girl in Lucknow U...
 
Call Girls in Lucknow Just Call 👉👉 8875999948 Top Class Call Girl Service Ava...
Call Girls in Lucknow Just Call 👉👉 8875999948 Top Class Call Girl Service Ava...Call Girls in Lucknow Just Call 👉👉 8875999948 Top Class Call Girl Service Ava...
Call Girls in Lucknow Just Call 👉👉 8875999948 Top Class Call Girl Service Ava...
 
Russian Call Girls In Pune 👉 Just CALL ME: 9352988975 ✅❤️💯low cost unlimited ...
Russian Call Girls In Pune 👉 Just CALL ME: 9352988975 ✅❤️💯low cost unlimited ...Russian Call Girls In Pune 👉 Just CALL ME: 9352988975 ✅❤️💯low cost unlimited ...
Russian Call Girls In Pune 👉 Just CALL ME: 9352988975 ✅❤️💯low cost unlimited ...
 
Call Girls Service Jaipur {9521753030 } ❤️VVIP BHAWNA Call Girl in Jaipur Raj...
Call Girls Service Jaipur {9521753030 } ❤️VVIP BHAWNA Call Girl in Jaipur Raj...Call Girls Service Jaipur {9521753030 } ❤️VVIP BHAWNA Call Girl in Jaipur Raj...
Call Girls Service Jaipur {9521753030 } ❤️VVIP BHAWNA Call Girl in Jaipur Raj...
 
👉 Chennai Sexy Aunty’s WhatsApp Number 👉📞 7427069034 👉📞 Just📲 Call Ruhi Colle...
👉 Chennai Sexy Aunty’s WhatsApp Number 👉📞 7427069034 👉📞 Just📲 Call Ruhi Colle...👉 Chennai Sexy Aunty’s WhatsApp Number 👉📞 7427069034 👉📞 Just📲 Call Ruhi Colle...
👉 Chennai Sexy Aunty’s WhatsApp Number 👉📞 7427069034 👉📞 Just📲 Call Ruhi Colle...
 
Bhawanipatna Call Girls 📞9332606886 Call Girls in Bhawanipatna Escorts servic...
Bhawanipatna Call Girls 📞9332606886 Call Girls in Bhawanipatna Escorts servic...Bhawanipatna Call Girls 📞9332606886 Call Girls in Bhawanipatna Escorts servic...
Bhawanipatna Call Girls 📞9332606886 Call Girls in Bhawanipatna Escorts servic...
 
Call Girls Kathua Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Kathua Just Call 8250077686 Top Class Call Girl Service AvailableCall Girls Kathua Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Kathua Just Call 8250077686 Top Class Call Girl Service Available
 
Call Girl in Chennai | Whatsapp No 📞 7427069034 📞 VIP Escorts Service Availab...
Call Girl in Chennai | Whatsapp No 📞 7427069034 📞 VIP Escorts Service Availab...Call Girl in Chennai | Whatsapp No 📞 7427069034 📞 VIP Escorts Service Availab...
Call Girl in Chennai | Whatsapp No 📞 7427069034 📞 VIP Escorts Service Availab...
 
ANATOMY AND PHYSIOLOGY OF RESPIRATORY SYSTEM.pptx
ANATOMY AND PHYSIOLOGY OF RESPIRATORY SYSTEM.pptxANATOMY AND PHYSIOLOGY OF RESPIRATORY SYSTEM.pptx
ANATOMY AND PHYSIOLOGY OF RESPIRATORY SYSTEM.pptx
 
Cara Menggugurkan Kandungan Dengan Cepat Selesai Dalam 24 Jam Secara Alami Bu...
Cara Menggugurkan Kandungan Dengan Cepat Selesai Dalam 24 Jam Secara Alami Bu...Cara Menggugurkan Kandungan Dengan Cepat Selesai Dalam 24 Jam Secara Alami Bu...
Cara Menggugurkan Kandungan Dengan Cepat Selesai Dalam 24 Jam Secara Alami Bu...
 
Call 8250092165 Patna Call Girls ₹4.5k Cash Payment With Room Delivery
Call 8250092165 Patna Call Girls ₹4.5k Cash Payment With Room DeliveryCall 8250092165 Patna Call Girls ₹4.5k Cash Payment With Room Delivery
Call 8250092165 Patna Call Girls ₹4.5k Cash Payment With Room Delivery
 
7 steps How to prevent Thalassemia : Dr Sharda Jain & Vandana Gupta
7 steps How to prevent Thalassemia : Dr Sharda Jain & Vandana Gupta7 steps How to prevent Thalassemia : Dr Sharda Jain & Vandana Gupta
7 steps How to prevent Thalassemia : Dr Sharda Jain & Vandana Gupta
 
Cardiac Output, Venous Return, and Their Regulation
Cardiac Output, Venous Return, and Their RegulationCardiac Output, Venous Return, and Their Regulation
Cardiac Output, Venous Return, and Their Regulation
 
Call Girls Wayanad Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Wayanad Just Call 8250077686 Top Class Call Girl Service AvailableCall Girls Wayanad Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Wayanad Just Call 8250077686 Top Class Call Girl Service Available
 
(RIYA)🎄Airhostess Call Girl Jaipur Call Now 8445551418 Premium Collection Of ...
(RIYA)🎄Airhostess Call Girl Jaipur Call Now 8445551418 Premium Collection Of ...(RIYA)🎄Airhostess Call Girl Jaipur Call Now 8445551418 Premium Collection Of ...
(RIYA)🎄Airhostess Call Girl Jaipur Call Now 8445551418 Premium Collection Of ...
 

PPT_14.pptx

  • 1. Unit 1 Basic of computer graphics By: Medhavi Pandey
  • 2. Outline ⮚Circle Generating Algorithms ▪ Mid Point Circle drawing algorithm. ▪ Numerical Practice
  • 3. Mid –Point Circle Algorithm • Given the center point and radius of circle, Mid Point Circle Drawing Algorithm attempts to generate the points of one octant. • The points for other octants are generated using the eight symmetry property.
  • 4. Mid –Point Circle Algorithm • Procedure- • Given- • Centre point of Circle = (X0, Y0) • Radius of Circle = R • Step-01: • Assign the starting point coordinates (X0, Y0) as- • X0 = 0 • Y0 = R
  • 5. Mid –Point Circle Algorithm • Step-02: • Calculate the value of initial decision parameter P0 as- • P0 = 1 – R • Step-03: • Suppose the current point is (Xk, Yk) and the next point is (Xk+1, Yk+1). • Find the next point of the first octant depending on the value of decision parameter Pk. • Follow the below two cases-
  • 6.
  • 7. Algorithm • Step1: input radius r, center (xc ,yc) and obtain the first point on the circumference of a circle centered on an origin ( (x,y) =(0,r) ) • Put x =0, y =r • Calculate initial value decision parameter as p=1-r • Step2: Repeat steps while x ≤ y Plot (x, y) If (p<0) Then set x=x+1 Y=y P = P + 2x + 3
  • 8. • Else P = P + 2(x-y)+1 y =y - 1 x =x+1 • To find the points for other seven octants, follow the eight symmetry property of circle.
  • 9. Problem: Given the centre point coordinates (0, 0) and radius as 10, generate all the points to form a circle. • Solution: Given- • Centre Coordinates of Circle (X0, Y0) = (0, 0) • Radius of Circle = 10 • Step-01: • Assign the starting point coordinates (X0, Y0) as- • X0 = 0 • Y0 = R = 10
  • 10. • Calculate the value of initial decision parameter P0 as- • P0 = 1 – R • P0 = 1 – 10 • P0 = -9 • As Pinitial < 0, so case-01 is satisfied. • Thus, • Xk+1 = Xk + 1 = 0 + 1 = 1 • Yk+1 = Yk = 10 • Pk+1 = Pk + 2 * Xk+1 + 3 = -9 + (2 x 1) + 1 = -6
  • 11. Pk Pk+1 (Xk+1, Yk+1) (0, 10) -9 -6 (1, 10) -6 -1 (2, 10) -1 6 (3, 10) 6 -3 (4, 9) -3 8 (5, 9) 8 5 (6, 8)
  • 12. • Algorithm calculates all the points of octant-1 and terminates. • Now, the points of octant-2 are obtained using the mirror effect by swapping X and Y coordinates. Octant-1 Points Octant-2 Points (0, 10) (8, 6) (1, 10) (9, 5) (2, 10) (9, 4) (3, 10) (10, 3) (4, 9) (10, 2) (5, 9) (10, 1) (6, 8) (10, 0) Now, the points for rest of the part are generated by following the signs of other quadrants. The other points can also be generated by calculating each octant separately.
  • 13. Advantages of Mid Point Circle Drawing Algorithm • It is a powerful and efficient algorithm. • The entire algorithm is based on the simple equation of circle X2 + Y2 = R2. • It is easy to implement from the programmer’s perspective. • This algorithm is used to generate curves on raster displays.
  • 14. Disadvantages of Mid Point Circle Drawing Algorithm • Accuracy of the generating points is an issue in this algorithm. • The circle generated by this algorithm is not smooth. • This algorithm is time consuming.
  • 15. Difference Between Midpoint Circle Algorithm And Bresenham's Circle Algorithm Midpoint Circle Algorithm Bresenham's Circle Algorithm This algorithm is used to generate curves on raster displays. It is quite Simple to implement. Bresenham's circle algorithm is simply an optimized version of the Midpoint circle algorithm. So, it needs very less time and requires less memory consuming Mid Point may still needs floating point. Although it also avoids square root or trigonometric calculation by adopting integer operation only. It uses just integer arithmetics. Accuracy of the generating points is an issue in this algorithm. Algorithm is accurate and efficient as it avoids using round function or floating point calculations.