Question: Digital differential analyzer (DDA) algorithm is used to construct lines. Equation of a line is y=mx+b Where m is slope of line and b is

Digital differential analyzer (DDA) algorithm is used to construct lines.

Equation of a line is y=mx+b

Where m is slope of line and b is the y intercept of line

Here the begining of line is denoted as x0,y0 and other end as x1,y1

slope = (y1-y0)/(x1-x0) = m

if slope of line = 1

then both x and y increments with similar units ie; 1

if slope of line >1

then y will be incrementing by 1 , x will be incrementing by 1/m.

if slope of line<1

then x will be incrementing by 1 , y will be by m*1 ie; m.

And by using the terms draw a line incrementally using OpenGL library in c++

i need -code in c++ with OpenGL librery i work on visual studio 2019

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!