03.01.2015 Aufrufe

Grundlagen: Algorithmen und Datenstrukturen - Lehrstuhl für ...

Grundlagen: Algorithmen und Datenstrukturen - Lehrstuhl für ...

Grundlagen: Algorithmen und Datenstrukturen - Lehrstuhl für ...

MEHR ANZEIGEN
WENIGER ANZEIGEN

Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.

YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.

Einführung<br />

Beispiele<br />

Kreis zeichnen: mit Multiplikation<br />

Bresenham1<br />

x = 0; y = R;<br />

plot(0, R); plot(R, 0); plot(0, −R); plot(−R, 0);<br />

F = 5 4 − R;<br />

while x < y do<br />

if F < 0 then<br />

F = F + 2 ∗ x + 1;<br />

else<br />

F = F + 2 ∗ x − 2 ∗ y + 2;<br />

y = y − 1;<br />

x = x + 1;<br />

plot(x, y); plot(−x, y); plot(−y, x); plot(−y, −x);<br />

plot(y, x); plot(y, −x); plot(x, −y); plot(−x, −y);<br />

Es geht sogar noch etwas schneller!<br />

H. Täubig (TUM) GAD SS’11 32 / 604

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!