Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,34 @@
|
|||
(lx0, ly0, lx1, ly1)
|
||||
Prgm
|
||||
Local steep, x, y, dx, dy, ystep, error, tmp
|
||||
abs(ly1 - ly0) > abs(lx1 - lx0) → steep
|
||||
If steep Then
|
||||
lx0 → tmp
|
||||
ly0 → lx0
|
||||
tmp → ly0
|
||||
lx1 → tmp
|
||||
ly1 → lx1
|
||||
tmp → ly1
|
||||
EndIf
|
||||
If lx0 > lx1 Then
|
||||
lx0 → tmp
|
||||
lx1 → lx0
|
||||
tmp → lx1
|
||||
ly0 → tmp
|
||||
ly1 → ly0
|
||||
tmp → ly1
|
||||
EndIf
|
||||
lx1 - lx0 → dx
|
||||
abs(ly1 - ly0) → dy
|
||||
when(ly0 < ly1, 1, –1) → ystep
|
||||
intDiv(dx, 2) → error
|
||||
ly0 → y
|
||||
For x,lx0,lx1
|
||||
If steep Then: PxlChg x, y :Else: PxlChg y, x :EndIf
|
||||
error - dy → error
|
||||
If error < 0 Then
|
||||
y + ystep → y
|
||||
error + dx → error
|
||||
EndIf
|
||||
EndFor
|
||||
EndPrgm
|
||||
Loading…
Add table
Add a link
Reference in a new issue