Searching \ for '[OT] Mathematics - line drawing' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/method/math.htm?key=math
Search entire site for: 'Mathematics - line drawing'.

Exact match. Not showing close matches.
PICList Thread
'[OT] Mathematics - line drawing'
2007\07\22@151758 by Lee Marshall

flavicon
face

hi, i want to work with graphic lcds, but i am unsure about how to calculate
what pixels are switched on when a line is drawn.

i am guessing there is some algorithm for calculating what pixels are turned
on, if a line must be drawn from 0,3 to 4,6 or something.

can anyone tell me about this process...
--
View this message in context: www.nabble.com/Mathematics---line-drawing-tf4126137.html#a11733804
Sent from the PIC - [OT] mailing list archive at Nabble.com.

2007\07\22@162844 by Brooke Clarke

flavicon
face
Hi Lee:

I think what you're looking for is Bresenham's algorithm
http://www.prc68.com/I/PClock.shtml#BA

--
Have Fun,

Brooke Clarke
http://www.PRC68.com
http://www.precisionclock.com

Date: Sun, 22 Jul 2007 12:08:45 -0700 (PDT)
From: Lee Marshall <spam_OUTleeguy92TakeThisOuTspamgooglemail.com>
Subject: [OT] Mathematics - line drawing
To: .....piclistKILLspamspam@spam@mit.edu
Message-ID: <11733804.postspamKILLspamtalk.nabble.com>
Content-Type: text/plain; charset=us-ascii


hi, i want to work with graphic lcds, but i am unsure about how to calculate
what pixels are switched on when a line is drawn.

i am guessing there is some algorithm for calculating what pixels are turned
on, if a line must be drawn from 0,3 to 4,6 or something.

can anyone tell me about this process...
--

2007\07\23@064136 by Michael Rigby-Jones

picon face


>-----Original Message-----
>From: .....piclist-bouncesKILLspamspam.....mit.edu [EraseMEpiclist-bouncesspam_OUTspamTakeThisOuTmit.edu]
>On Behalf Of Lee Marshall
>Sent: 22 July 2007 20:09
>To: piclistspamspam_OUTmit.edu
>Subject: [OT] Mathematics - line drawing
>
>
>
>hi, i want to work with graphic lcds, but i am unsure about
>how to calculate what pixels are switched on when a line is drawn.
>
>i am guessing there is some algorithm for calculating what
>pixels are turned on, if a line must be drawn from 0,3 to 4,6
>or something.
>
>can anyone tell me about this process...
>--

Point Google to "Bresenham line algorithm" and you should have more information than you could ever need.  e.g.

http://en.wikipedia.org/wiki/Bresenham's_line_algorithm

This is a simple algorithm that avoids any multiplication or division, so runs quickly on small micros.  Bresenham also developed a circle drawing algorithm that might be useful to to you.

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2007\07\23@192218 by Peter Todd

picon face
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Jul 23, 2007 at 11:44:10AM +0100, Michael Rigby-Jones wrote:
> Point Google to "Bresenham line algorithm" and you should have more information than you could ever need.  e.g.
>
> http://en.wikipedia.org/wiki/Bresenham's_line_algorithm
>
> This is a simple algorithm that avoids any multiplication or division, so runs quickly on small micros.  Bresenham also developed a circle drawing algorithm that might be useful to to you.

I did up an implementation of that algorithm in my Orthographic Cube
project. You can download the C source code at:

http://www.petertodd.org/art/source-code/bin/io.pkt.art.orthographic-cube-20070620.tar.bz2

The line drawing code is in line.[ch] if I recall.

- --
http://petertodd.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGpTX+3bMhDbI9xWQRAi2xAKCXY6KsKq3lP6Kph8DF1Rp50SK2qgCcDI57
1rRN45v0nqkZ5uW5otcPkQs=
=0LZN
-----END PGP SIGNATURE-----

More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...