Locating Pixels with Bresenham's line algorithm

  • Thread starter Thread starter armin11
  • Start date Start date
  • Tags Tags
    Algorithm Line
AI Thread Summary
The discussion centers on locating pixel positions for a line drawn from (0,0) to (-4,-8) using Bresenham's algorithm. The original poster expresses difficulty in finding a suitable algorithm, even after extensive searching. Responses suggest that the Wikipedia page on Bresenham's algorithm contains clear pseudocode that should be sufficient for implementation. Some participants imply that the query may be related to a homework assignment, indicating that the forum may not be the appropriate place for such questions. Overall, the emphasis is on utilizing available resources, particularly the pseudocode from Wikipedia, to solve the problem effectively.
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)
 
Technology 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.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top