List Headline Image
Updated by School of Beginners on Jan 27, 2022
Headline for Computer Graphics | Computer Drawing Algorithm with Examples and Code | Python | C++
 REPORT
8 items   1 followers   2 votes   140 views

Computer Graphics | Computer Drawing Algorithm with Examples and Code | Python | C++

Computer graphics is a branch of computer science that investigates ways for creating and modifying visual images digitally. Although the phrase is most commonly associated with three-dimensional computer graphics, it also includes two-dimensional graphics and image processing.

Source: https://schoolofbeginners.blogspot.com/search/label/Computer%20Graphics

Midpoint circle drawing algorithm | Code in C++ and Python

In the previous post, we discuss Bresenham's circle drawing algorithm. Another incremental circle drawing algorithm, quite similar to Bresenham's technique, will be presented in this post. It uses the following function to check the spatial connection between an arbitrary point (x, y) and a circle of radius r centered at the origin. For the basics of a circle drawing algorithm, we have to know the general equation set of a circle.

Scan line polygon filling algorithm with example

In computer graphics, a scan line algorithm is a process of filling regions of a polygon that are geometrically defined by the coordinates of vertices of this polygon graph. This algorithm is specially used for the region filling just like the boundary-fill and flood-fill algorithm. The specialty of this algorithm is that it scan lines at a time rather than scan a pixel. This property makes it faster than others.

Bresenham's circle drawing algorithm | Code in C++ and Python

It's also preferable to execute the computations required to identify the scan-converted points using only integer addition, subtraction, and multiplication by powers of two, as with the construction of a straight line. These objectives can be satisfied due to Bresenham's circle drawing algorithm. Advantages and Disadvantages of Bresenham's circle drawing algorithm. Bresenham's circle drawing algorithm using C++

Flood Fill Algorithm in Computer graphics with example and Pseudocode

This method starts with a seed (first pixel) within the boundary like the Boundary fill algorithm. It determines whether the pixel has the region's original color. If the answer is positive, the pixel is filled with a specific color, and each of the pixel's neighbors is used as a new seed in a recursive call. If the answer is negative, the call is returned to the caller. The similarity between Flood fill and Boundary fill algorithm.

Boundary fill algorithm in Computer graphics and Pseudo-code in C language

The boundary fill algorithm is a recursive process that starts with a seed pixel inside the region. The program determines if this pixel is a boundary pixel or if it has previously been filled. If the answer is no, it fills the pixel and calls itself recursively, utilizing every nearby pixel as a new seed. If the response is affirmative, the algorithm returns to the caller.

DDA Algorithm in Computer Graphics with Examples

The DDA algorithm is an incremental scan conversion process. This type of approach is described by doing calculations at every step utilizing the results from the leading step. Because it calculates points on the line without using floating-point multiplication, the digital differential analyzer approach is faster than using the line equation directly.

Bresenham's Line Algorithm in Computer Graphics with Example Steps by Steps

Bresenham's line algorithm is a high-efficiency incremental approach for scanning lines. It generates mathematically correct results by utilizing only integer addition, subtraction, and multiplication by 2. Moreover, it is possible to accomplish this with a simple arithmetic shift operation. This faster algorithm is developed by Bresenham in the 19th century.

Website at https://schoolofbeginners.blogspot.com/2022/01/midpoint-ellipse-drawing-algorithm-in.html

The midpoint ellipse algorithm is one of the algorithms to draw the ellipse algorithm only using addition, subtraction, and multiplication operator. This algorithm is the modified version of Bresenham's circle algorithm. The midpoint ellipse algorithm uses the 4-connected path algorithm instead of the 8-connected path algorithm.