Jump to content

Xiaolin Wu's line algorithm: Difference between revisions

Line 4,338:
;;;-------------------------------------------------------------------
</syntaxhighlight>
 
{{out}}
The output of the program is a Portable Arbitrary Map, defining a transparent image of the drawn lines. Here is an example of making a complete PNG image from such a PAM (using CHICKEN Scheme):
<pre>
$ csc -O5 -R r7rs -X r7rs xiaolin_wu_line_algorithm.scm
$ ./xiaolin_wu_line_algorithm image.pam
$ pamgradient lightgray lightblue lightcyan lightgray 1000 750 | pamcomp image.pam - | pamtopng > image.png
</pre>
Here is what I get:
[[File:Xiaolin wu line algorithm SCM.2023.04.28.14.08.55.png|thumb|none|alt=A violet starburst on a light bluish gradient background.]]
 
=={{header|Sidef}}==
1,448

edits

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