Question
Bresenham's line algorithm might be useful, although I'm not sure exactly which one to use . let me know if you need additional info or
Bresenham's line algorithm might be useful, although I'm not sure exactly which one to use. let me know if you need additional info or clarification.
forget what I said about bresenhams algorithm. the question is this: show that the point x, y is darkened only if w-x, v-y is darkened. as you go through the algorithm, you notice that you can fill in the darkened points in reverse at the same time, starting at x,y or 0,0 and going to w,v filling in the points or darkening them at both ends at the same time, by filling in x,y and w-x, v-y at the same time.
basically, this is an algorithm to make a line using pixels, so you can't just draw a straight line, you have to create it using pixels, and this algorithm chooses the coordinate of pixel to color in
(a). Let the following algorithm be used to represent the segment from (0,0) to(w,v), where w is odd. Show that pixel (x,y) is dark if and only if pixel (w-2,0-y) is dark. Algorithm 1 Input: integers and ter with OCUS Output: 1 dark pixels that represent the line segment joining (0,0) and (w,u) 1. Start at pixel (r,y) = (0,0). Leta - -u). 2. Darkon pixel ( y)). 3 , when a pixels are dark. Stop 4. Replice (r ) by (+1.1) and n by Ye # 20. 5. 1 0. Nurn lo step 2 6. Replace( ) by (my Ron CDStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started