# What is scan line method?

## What is scan line method?

Scanline rendering (also scan line rendering and scan-line rendering) is an algorithm for visible surface determination, in 3D computer graphics, that works on a row-by-row basis rather than a polygon-by-polygon or pixel-by-pixel basis.

### What is scan line filling algorithm?

Scanline Polygon filling Algorithm Scanline filling is basically filling up of polygons using horizontal lines or scanlines. The purpose of the SLPF algorithm is to fill (color) the interior pixels of a polygon given only the vertices of the figure.

**What is scan conversion of line?**

A straight line may be defined by two endpoints & an equation. In fig the two endpoints are described by (x1,y1) and (x2,y2). The equation of the line is used to determine the x, y coordinates of all the points that lie between these two endpoints.

**What are two types of scan conversion?**

We can perform scan conversion by using two methods.

- Analog Method.
- Digital Method.

## How many tables are used in scan line method?

In scan line algorithm we create two tables, first one is known as polygon table which is different for each and every polygon and the other one is known as edge table.

### How is it different from scan line method of visible surface detection?

It is an image-space method to identify visible surface. This method has a depth information for only single scan-line. In order to require one scan-line of depth values, we must group and process all polygons intersecting a given scan-line at the same time before processing the next scan-line.

**What is scan line polygon fill algorithm explain the algorithm with the help of an example?**

Scan Line Algorithm Step 1 − Find out the Ymin and Ymax from the given polygon. Step 2 − ScanLine intersects with each edge of the polygon from Ymin to Ymax. Name each intersection point of the polygon. As per the figure shown above, they are named as p0, p1, p2, p3.

**What are the advantages of scan line polygon fill algorithm?**

Advantage of scan-line fill: It does fill in the same order as rendering, and so can be pipelined. Scan Line Fill: What happens at edge end-point? Edge endpoint is duplicated. In other words, when a scan line intersects an edge endpoint, it intersects two edges.

## What is scan conversion of a point?

Scan-Converting a point involves illuminating the pixel that contains the point. as shown in fig would both be represented by pixel (2, 1). In general, a point p (x, y) is represented by the integer part of x & the integer part of y that is pixels [(INT (x), INT (y).

### What is direct method of line drawing?

Method-1 : Direct Method : We find the slope of the line by using both the points, and we put the slope in the line equation y = mx + b. Then we find the value of b by putting x and y equal to 0. After this, we have a relation between x and y. Now we increase the value of x and find the corresponding value of y.

**Which algorithm is used for scan converting a line?**

Method-2 : DDA (Digital Differential Analyzer) Algorithm : The incremental technique is used in this algorithm. It means that we can find the next coordinates by using past coordinates as a guide. In this method, the difference of pixel point is analyzed and according to the analysis, the line can be drawn.

**What is the advantage of scan conversion?**

Advantage of developing algorithms for scan conversion Algorithms can generate graphics objects at a faster rate. Using algorithms memory can be used efficiently. Algorithms can develop a higher level of graphical objects.