Thursday, 8 December 2011

Bresenham 3d line Drawing algorithm | Matlab 3D Line Drawing Algorithm Source code | Matlab Line Drawing Algorithm code

Bresenham 3d line Drawing algorithm is one of the algorithm in Computer graphics,It find out the points of 'N' Dimensional Axis area Lines.Here below we put the matlab code of this algorithm .Here we give and use three dimensional data points and plot that point in Axis areas.
More graphics libraries are used this one algorithm. This algorithm Linear functions are used to draw the Lines.It draw the lines any number of dimensions.This algorithm are mainly used in computer graphics domains.
Here below give the code of "Bresenham 3d line Drawing algorithm"

Point1 = [10 33 8];
Point2 = [39 25 67];

These two points with three dimensional data points are used to draw the Lines.

Function:

bresenham_line3d_algorithm.m is matlab function please download this function from Hackchina.com

Function Calling:
Point1 = [10 33 8];
Point2 = [39 25 67];
[Xpnt,Ypnt,Zpnt] =bresenham_line3d_algorithm(Point1, Point2);
figure;plot3(Xpnt,Ypnt,Zpnt,'s','markerface','b');

The output as follows



Kindly Bookmark and Share it:

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...