Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
phpEnter 5.1.
Udemy Clone script 2.01
VisualNEO Web 19.11.7
VisualNEO for Windows 19.4.29.0
SentiVeillance SDK Trial 7.3
Devart ODBC Driver for PostgreSQL 3.2
SecureBridge 9.2
dotConnect for QuickBooks 1.9
dotConnect for Magento 1.9
dotConnect for Zoho CRM 1.10
dotConnect for FreshBooks 1.10
IP2Location Geolocation Database January.2020
dotConnect for BigCommerce 1.10
HTMLPad 2020 16.0
WeBuilder 2020 16.0
Top Code
SecureBridge 8.0
IP2Location Geolocation Database January.2020
ATN Site Builder 3.0
Eclipse Unicode View 1.0
ICPennyBid Penny Auction Script 4.0
Classified Ad Lister 1.0
ADO.NET Provider for ExactTarget 1.0
ATN Resume Finder 2.0
Ledger Accounting for Firebird/Interbase
PHP Review Script 1.0
Invoice Manager by PHPJabbers 3.0
Devart ODBC Driver for PostgreSQL 3.2
Aglowsoft SQL Query Tools 8.2
Java Code Checker (JCC) 1.0
Solid File System OS edition 5.1
Top Rated
phpEnter 5.1.
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
3D Bresenham's line generation 1.0
File ID: 86175






3D Bresenham's line generation 1.0
Download 3D Bresenham's line generation 1.0http://www.mathworks.comReport Error Link
License: Shareware
File Size: 10.0 KB
Downloads: 13
Submit Rating:
3D Bresenham's line generation 1.0 Description
Description: This program will generate the coordinates of a 3D Bresenham's raster line between two given points.

A very useful application of this algorithm can be found in the implementation of Fischer's Bresenham interpolation method in my another program that can rotate three dimensional image volume with an affine matrix:
http://www.mathworks.com/matlabcentral/fil...?objectId=21080

Usage: [X Y Z] = bresenham_line3d(P1, P2);

P1 - vector for Point1, where P1 = [x1 y1 z1]

P2 - vector for Point2, where P2 = [x2 y2 z2]

precision (optional) - Although according to Bresenham's line algorithm, point coordinates x1 y1 z1 and x2 y2 z2 should be integer numbers, this program extends its limit to all real numbers. If any of them are floating numbers, you should specify how many digits of decimal that you would like to preserve. Be aware that the length of output X Y Z coordinates will increase in 10 times for each decimal digit that you want to preserve. By default, the precision is 0, which means that they will be rounded to the nearest integer.

X - a set of x coordinates on Bresenham's line

Y - a set of y coordinates on Bresenham's line

Z - a set of z coordinates on Bresenham's line

Therefore, all points in XYZ set (i.e. P(i) = [X(i) Y(i) Z(i)]) will constitute the Bresenham's line between P1 and P1.

Example:

P1 = [12 37 6]; P2 = [46 3 35];
[X Y Z] = bresenham_line3d(P1, P2);
figure; plot3(X,Y,Z,'s','markerface','b');

This program is ported to MATLAB from:

B.Pendleton. line3d - 3D Bresenham's (a 3D line drawing algorithm), 1992.
ftp://ftp.isc.org/pub/usenet/comp.sources...volume26/line3d
Which is also referenced by:

Fischer, J., A. del Rio (2004). A Fast Method for Applying Rigid Transformations to Volume Data, WSCG2004 Conference.
http://wscg.zcu.cz/wscg2004/Papers_2004_Short/M19.pdf

License: Shareware

Related: digit, times, increase, default, nearest, rounded, means, output, Length

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 13



More Similar Code

This code uses Bresenham line generation algorithm to generate a line, with modified expression for error calculation which does not involves any division or calculation of slope of line. This parameter is however modified by same mechanism as original algorithm but with different value than actual Bresenham algorithm.
This code is generalized in terms of order of input of first point followed by second point or vice versa. Also result is...



Given starting and ending points returns list of coordinates as per Bresenham's line algorithm. I wrote this a long time ago under Matlab 4.x I think. It works under Matlab 5.3 and 6.1. I have not reviewed the code since I wrote it.



This free Java applet lets you have an image rotate on your site in 3D. It takes a 2D image and spins it around it's X, Y, or Z axis as if it were a 3D image.

It's great for logos on a site, or for general pictures that you want to...



3D Affine matrix is such a 4x4 matrix:

M = [ [R T]; [0 0 0 1] ];
[x2 y2 z2 1]d-deOao = M * [x1 y1 z1 1]d-deOao ;

where, R is a 3x3 rotation matrix, and T is a 3x1 translation matrix. [x1 y1 z1] is a location in original...



This code does not use any for loops and takes advantage of Matlabs internally optimized routines to produce a fast, optimized version of Bresenham's line drawing algorithm



The Big Faceless Graph Library is a Java class library for creating graphs and charts. Backed by a full 3D engine, you can create shaded 3D Pie, Bar and Line graphs as GIF, PDF, PNG or other image formats. Features include transparent backgrounds,...



This Java class library is for creating graphs and charts. It is backed by a full 3D engine, allowing you to create shaded 3D pie, bar, and line graphs as GIF, PDF, PNG, or other image formats. Its features include transparent backgrounds,...



AJAX Progressbar Control is new AJAX based Progress bar for KUpload+ 2.0 which takes full advantage of AJAX and the new features of Microsoft's next-generation IDE - Visual Studio .NET 2005. It also allows developers to enjoy significant...



Released VB application will crash and the user do not know why! This tool adds line number on VB source files automatically. With its help and smartly using the undocumented VB function erl() , user can report error's line No now.



Given start and end point, produce a list of points through which line (or ray) will traverse.

User Review for 3D Bresenham's line generation
- required fields
     

Please enter text on the image