Locating Pixels with Bresenham's line algorithm

  • Thread starter Thread starter armin11
  • Start date Start date
  • Tags Tags
    Algorithm Line
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 3K views
armin11
Messages
66
Reaction score
0
hi,I wanted to locate the pixels of a line drawn from (0,0) to (-4,-8) with bresenham's algorithm.I couldn't find a suitable algorithm for finding these pixel locations.Can anyone help me please?(the algorithm can be without computer and work by hand)
 
Physics news on Phys.org
I've searched so much and tried every algorithm they have written ,but they don't work.can anybody help please?
 
This smells like a homework question... In which case you're in the wrong forum.

Also not a hard one. The wiki has full (and rather simple) pseudocode for Bresenham's. Can you really not turn that into working code? That's all you need to do.