Jump to content

Xiaolin Wu's line algorithm: Difference between revisions

Line 956:
plot (s, ypxl1, xpxl1, rfpart yend * xgap);
plot (s, succ ypxl1, xpxl1, fpart yend * xgap)
(* s[ypxl1, xpxl1] := rfpart yend * xgap; *)
(* s[succ ypxl1, xpxl1] := fpart yend * xgap *)
end
else
Line 963 ⟶ 961:
plot (s, xpxl1, ypxl1, rfpart yend * xgap);
plot (s, xpxl1, succ ypxl1, fpart yend * xgap)
(* s[xpxl1, ypxl1] := rfpart yend * xgap; *)
(* s[xpxl1, succ ypxl1] := fpart yend * xgap *)
end
 
Line 985 ⟶ 981:
plot (s, ypxl2, xpxl2, rfpart yend * xgap);
plot (s, succ ypxl2, xpxl2, fpart yend * xgap)
(* s[ypxl2, xpxl2] := rfpart yend * xgap; *)
(* s[succ ypxl2, xpxl2] := fpart yend * xgap *)
end
else
Line 992 ⟶ 986:
plot (s, xpxl2, ypxl2, rfpart yend * xgap);
plot (s, xpxl2, succ ypxl2, fpart yend * xgap)
(* s[xpxl2, ypxl2] := rfpart yend * xgap; *)
(* s[xpxl2, succ ypxl2] := fpart yend * xgap *)
end
in
Line 1,006 ⟶ 998:
plot (s, ipart intery, x, rfpart intery);
plot (s, succ (ipart intery), x, fpart intery);
(* s[ipart intery, x] := rfpart intery; *)
(* s[succ (ipart intery), x] := fpart intery; *)
intery := intery + gradient
end
Line 1,019 ⟶ 1,009:
plot (s, x, ipart intery, rfpart intery);
plot (s, x, succ (ipart intery), fpart intery);
(* s[x, ipart intery] := rfpart intery; *)
(* s[x, succ (ipart intery)] := fpart intery; *)
intery := intery + gradient
end
1,448

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.