Given a radius of a circle, draw the circle without using floating point arithmetic.
Following program uses a simple concept. Let the radius of the circle be r. Consider a square of size (2r+1)*(2r+1) around the circle to be drawn. Now walk through every point inside the square. For every every point (x,y), if (x, y) lies inside the circle (or x^2+ y^2 < r^2), then print it, otherwise print space.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Draw circle in C graphics
- Draw an Ellipse rotating over a Circle in C++ graphics
- Mid-Point Circle Drawing Algorithm
- Neighbors of a point on a circle using Bresenham's algorithm
- Draw ellipse in C graphics
- Draw a line in C++ graphics
- Draw Rectangle in C graphics
- Draw a moving car using computer graphics programming in C
- Draw a smiley face using Graphics in C language
- Draw a triangle in C++ graphics
- Draw an ellipse divided by straight line into two colored part in C++ Graphics
- Program for class interval arithmetic mean
- Number of ways to remove elements to maximize arithmetic mean
- Minimum elements inserted in a sorted array to form an Arithmetic progression
- Bresenham’s circle drawing algorithm
- Lucky alive person in a circle | Set - 2
- Minimum Enclosing Circle | Set 1
- Minimum enclosing circle | Set 2 - Welzl's algorithm
- Mid-Point Line Generation Algorithm
- Point Clipping Algorithm in Computer Graphics