Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #3156
| X-Received | by 10.157.45.200 with SMTP id g66mr10290921otb.84.1477330224923; Mon, 24 Oct 2016 10:30:24 -0700 (PDT) |
|---|---|
| X-Received | by 10.36.238.131 with SMTP id b125mr106829iti.3.1477330224868; Mon, 24 Oct 2016 10:30:24 -0700 (PDT) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!g45no2240401qte.1!news-out.google.com!w25ni31797qtc.0!nntp.google.com!g45no2240398qte.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.sys.apple2.programmer |
| Date | Mon, 24 Oct 2016 10:30:24 -0700 (PDT) |
| In-Reply-To | <067e080a-f706-41a8-a3aa-414b82375a2d@googlegroups.com> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=67.168.182.173; posting-account=9Dd-GgoAAAAjVgCPcBurQ6c4EXW6Wi8v |
| NNTP-Posting-Host | 67.168.182.173 |
| References | <78d160d0-2aef-49e5-a6b4-5af5aacc2db5@googlegroups.com> <3162a740-1ea8-4835-8afa-be8322709228@googlegroups.com> <067e080a-f706-41a8-a3aa-414b82375a2d@googlegroups.com> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <5ea5f29f-a456-4165-afe6-ddfc8d3dcafe@googlegroups.com> (permalink) |
| Subject | Re: hi-res graphics animation, dynamically generated shape tables |
| From | Michael Pohoreski <michael.pohoreski@gmail.com> |
| Injection-Date | Mon, 24 Oct 2016 17:30:24 +0000 |
| Content-Type | text/plain; charset=UTF-8 |
| Xref | csiph.com comp.sys.apple2.programmer:3156 |
Show key headers only | View raw
On Monday, October 24, 2016 at 9:01:44 AM UTC-7, Michael Pohoreski wrote:
Part 3b -- Supplement
> Our **integer** line drawing function ends up like:
>
> function line2( x0, y0, x1, y1, color )
> {
> var x, y = y0;
> var dx = x1 - x0;
> var dy = y1 - y0;
> var s = 2*dy - dx;
>
> for( x = x0; x <= x1; ++x )
> {
> putpixel( x, y, color );
>
> if (s > 0)
> {
> s -= dx;
> y++;
> }
> s += dy;
> }
> }
Update:
In order to preserve symmetry, the compare should be: >= instead of >
if (s >= 0)
Check out linei() and linej() in line.js
Back to comp.sys.apple2.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
hi-res graphics animation, dynamically generated shape tables Mark Lemmert <mark.lemmert@gmail.com> - 2016-09-28 12:20 -0700
Re: hi-res graphics animation, dynamically generated shape tables Michael J. Mahon <mjmahon@aol.com> - 2016-09-28 16:15 -0500
Re: hi-res graphics animation, dynamically generated shape tables Mark Lemmert <mark.lemmert@gmail.com> - 2016-09-28 21:47 -0700
Re: hi-res graphics animation, dynamically generated shape tables Michael J. Mahon <mjmahon@aol.com> - 2016-09-29 12:50 -0500
Re: hi-res graphics animation, dynamically generated shape tables Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-09-28 16:27 -0700
Re: hi-res graphics animation, dynamically generated shape tables Mark Lemmert <mark.lemmert@gmail.com> - 2016-09-28 21:54 -0700
Re: hi-res graphics animation, dynamically generated shape tables qkumba <peter.ferrie@gmail.com> - 2016-09-29 21:21 -0700
Re: hi-res graphics animation, dynamically generated shape tables Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-09-30 00:06 -0700
Re: hi-res graphics animation, dynamically generated shape tables Mark Lemmert <mark.lemmert@gmail.com> - 2016-10-07 10:23 -0700
Re: hi-res graphics animation, dynamically generated shape tables Nick Westgate <nick.westgate@gmail.com> - 2016-10-09 16:55 -0700
Re: hi-res graphics animation, dynamically generated shape tables Mark Lemmert <mark.lemmert@gmail.com> - 2016-10-10 18:07 -0700
Re: hi-res graphics animation, dynamically generated shape tables Nick Westgate <nick.westgate@gmail.com> - 2016-10-10 19:43 -0700
Re: hi-res graphics animation, dynamically generated shape tables Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-10-17 10:19 -0700
Re: hi-res graphics animation, dynamically generated shape tables Mark Lemmert <mark.lemmert@gmail.com> - 2016-10-17 11:55 -0700
Re: hi-res graphics animation, dynamically generated shape tables Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-10-19 18:54 -0700
Re: hi-res graphics animation, dynamically generated shape tables Mark Lemmert <mark.lemmert@gmail.com> - 2016-10-20 11:17 -0700
Re: hi-res graphics animation, dynamically generated shape tables Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-10-20 18:52 -0700
Re: hi-res graphics animation, dynamically generated shape tables Mark Lemmert <mark.lemmert@gmail.com> - 2016-10-21 15:41 -0700
Re: hi-res graphics animation, dynamically generated shape tables Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-10-24 19:15 -0700
Re: hi-res graphics animation, dynamically generated shape tables Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-10-17 10:15 -0700
Re: hi-res graphics animation, dynamically generated shape tables Mark Lemmert <mark.lemmert@gmail.com> - 2016-10-21 15:43 -0700
Re: hi-res graphics animation, dynamically generated shape tables Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-10-24 09:01 -0700
Re: hi-res graphics animation, dynamically generated shape tables 6502workshop@gmail.com - 2016-11-05 10:29 -0700
Re: hi-res graphics animation, dynamically generated shape tables Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-10-24 09:01 -0700
Re: hi-res graphics animation, dynamically generated shape tables Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-10-24 10:30 -0700
Re: hi-res graphics animation, dynamically generated shape tables Michael Pohoreski <michael.pohoreski@gmail.com> - 2016-10-24 10:18 -0700
csiph-web