Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a good integer only line rasterization algorithm?

I've been working on building a simple 3d graphic engine and I'm trying to find a good integer based line rasterization algorithm. ( I'm not trying to re-invent the wheel, I'm trying to get a deeper understanding of wheels).

Are there any line rasterizing algorithms that don't rely on any floating point math?

Thanks.

like image 839
Jason Hernandez Avatar asked Feb 28 '23 21:02

Jason Hernandez


1 Answers

Bresenham's line algorithm is integer only.

like image 181
cletus Avatar answered Mar 02 '23 09:03

cletus