// This is only Octant 1, for the rest of 7 Octants, look through the code
begin
plot (x1, y1) ;
for (i= x1 to x2 by step of 1) {
if (i== x1 ) {
pi=2Δy−Δx ;
} else {
if ( pi<0 ) {
pi=pi+2Δy ;
} else {
pi=pi+2Δy−2Δx;
y1 ++ ;
}
x1 ++ ;
plot (x1, y1) ;
}
}
end
-
Notifications
You must be signed in to change notification settings - Fork 0
johnchen77w/Bresenham-Integer-Line-Drawing-Algorithm
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
implement Bresenham's integer line drawing algorithm correctly, for lines of all slopes
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published