v bx,[X]
imul bx
mov bx,[Z]
add bx,[Zoff] ; Distance
idiv bx
add ax,[Mx] ; Center on screen
mov bp,ax
mov ax,[Yoff] ; Yoff*Y / Z+Zoff = screen y
mov bx,[Y]
imul bx
mov bx,[Z]
add bx,[Zoff] ; Distance
idiv bx
add ax,[My] ; Center on screen
mov bx,320
imul bx
add ax,bp ; ax = (y*320)+x
mov di,ax
mov ax,[Z] ; Get color from Z
add ax,100d ; (This piece of code could be improved)
mov [byte ptr es:di],al ; Place a dot with color al
mov [Erase+si],di ; Save position for erase
ret
ENDP ShowPoint
PROC MainProgram
call UpdateAngles ; Calculate new angles
call SetRotation ; Find sine & cosine of those angles
xor si,si ; First 3d-point
mov cx,MaxPoints
ShowLoop:
call RotatePoint ; Rotate