triangle filling algorithm bresenham matlab
#1

i need to revieve triangle filling algorithm bresenham matlab///
Reply
#2
triangle filling algorithm bresenham matlab

I. Introduction

This article discusses various algorithms how to draw a solid triangle. This task is a basic requirement of a graphic engine and is often also called 'Triangle Rasterization/Rasterisation'. Three different approaches are presented which are implemented in the applet above.
Note that also the scanline algorithm can be used, but it is designed for the general case of filling a polygon and thus a bit overdesigned.
todo: solid / fluxionary with different vertice colors, not all are equally fast

Standard algorithm: The most common approach

Bresenham Algorithm (completely integer based)

Barycentric Algorithm

A required prerequisite for the first two algorithms (Standard & Bresenham) is a defined order of the three triangle vertices. So we know which is the most top vertice respectively the lowest vertice. Assuming the origin of the coordinate is the topleft corner, thus the lower a vertice is the bigger its y-coordinate is, we define the order v1.y <= v2.y <= v3.y. The sorting of the three vertices has to be performed as very first step.

II. Standard Algorithm

The standard algorithm uses the fact that the two easy cases, a flat bottom and a flat top triangle, are easy to draw.
This is due to the fact that the difference in y is equal for both legs. Looking at the figure below, it's easy to see that y1 - y2 = y1 - y3. The idea of this algorithm is to traverse both legs step by step in y-direction and draw a straight horizontal line between both endpoints.
Therefore the change of x per y-step (that is dx/dy = 1 / slope = invslope) is required, contrary to the normal slope which gives the delta in y per x-step.

Bresenham's line algorithm is an algorithm that determines the points of an n-dimensional raster that should be selected in order to form a close approximation to a straight line between two points. It is commonly used to draw lines on a computer screen, as it uses only integer addition, subtraction and bit shifting, all of which are very cheap operations in standard computer architectures. It is one of the earliest algorithms developed in the field of computer graphics. An extension to the original algorithm may be used for drawing circles.
While algorithms such as Wu's algorithm are also frequently used in modern computer graphics because they can support antialiasing, the speed and simplicity of Bresenham's line algorithm means that it is still important. The algorithm is used in hardware such as plotters and in the graphics chips of modern graphics cards. It can also be found in many software graphics libraries. Because the algorithm is very simple, it is often implemented in either the firmware or the graphics hardware of modern graphics cards.
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: matlab bresenham s ellipse algorithm, advantages and disadvantages of bresenham s algorithm, bresenham line drawing algorithm in pdf, bresenham ellipse generation algorithm flowchart, draw a flowchart for bresenham algorithm, service marketing triangle pdf, bresenham line algorithm verilog,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  image encryption and decryption using rsa algorithm in matlab 2 8,010 29-05-2017, 04:17 PM
Last Post: Priyanka Bidikar
  download liver tumor ct scan image in matlab with source code 4 8,164 21-05-2017, 09:54 PM
Last Post: abdulrahmanmashaal
  MATLAB codes needed for powerline communication 1 8,176 12-04-2017, 05:00 PM
Last Post: jaseela123d
  source code for task scheduling using genetic algorithm using java 2 8,626 11-04-2017, 08:31 PM
Last Post: Guest
  vhdl code for radix 2 modified booth algorithm 4 1,030 04-04-2017, 10:24 AM
Last Post: Garlapati nikitha
  matlab code for wavelet based ofdm transmitter 1 934 24-02-2017, 11:18 AM
Last Post: ijasti
  code to extract brain tumor detection using matlab 2 1,083 17-10-2016, 04:32 PM
Last Post: girish123ak
  secure chat using RSA algorithm karthik1218 2 2,590 14-10-2016, 02:48 PM
Last Post: info togel
  f5 algorithm steganography matlab code 2 881 04-10-2016, 03:00 AM
Last Post: [email protected]
  color image segmentation using jseg algorithm in matlab code 2 875 29-09-2016, 12:07 PM
Last Post: Guest

Forum Jump: