FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   Bresenham Algorithm
« Previous topic | Next topic »

Pages: 1 2 
   Author  Topic: Bresenham Algorithm  (Read 1580 times)
toxi

WWW
Re: Bresenham Algorithm
« Reply #15 on: Oct 19th, 2004, 7:56pm »

so near indeed...
 
Code:
x = i % width;
y = i / width; // NOT divided by height!!!

 
hth!
 

http://toxi.co.uk/
fjen

WWW
Re: Bresenham Algorithm
« Reply #16 on: Oct 19th, 2004, 7:57pm »

i guess what you want to do is:
y = i / width;
 
don't tell your teacher ...
 
 
uups. toxi's been faster .. ok.
« Last Edit: Oct 19th, 2004, 7:58pm by fjen »  
st33d

WWW Email
Re: Bresenham Algorithm
« Reply #17 on: Oct 19th, 2004, 9:27pm »

I've got it working on a square and had a successful print out but when I gave it a .gif it started to go awry. I have some redesigning to do.
« Last Edit: Oct 19th, 2004, 9:58pm by st33d »  

I could murder a pint.
Pages: 1 2 

« Previous topic | Next topic »