3.66667

3.7 | 3 ratings Rate this file 30 Downloads (last 30 days) File Size: 3.79 KB File ID: #38331
image thumbnail

Draw line with Arrows in 3D

by

 

draw_line3 draw line with directional arrow/arrows for the given 3D vector coordinates.

| Watch this File

File Information
Description

draw_line3 draw directional vector points in 3D with directional arrows

draw_line3(p1, p2) draw line with defulat optional parmeters;
draw_line3(p1, p2 , param1, val1, ...)
The line with stretching(<-->) and compressive(>---<) arrows or without
arrows (----) can be plotted.

 Input arguments:
 ----------------------
 p1, p2 : Cordinates of the two points in 3D

 Optional parameters ( passed as parameter/value pairs):
--------------

'LineColor' : Colour of line ( vector of colour or char)
                    default : % 'b'
 'LineWidth' : Width of the line (Scaler values)
                    default : 2)
 'ArrowDirection' : (0,1,2) (0 : p1--- p2, 1: p1 --> p2 2: and P1 <-> p2)
                    default : 1
'ArrowLength' : Length of the arrow ( scaler values)
                    default : 5
'ArrowIntend' : Intended arrow ( scaler value)
                    default : 2
'ArrowAngle' : Angle of arrow with the main line in degree
                    default : 45
'ArrowColor' : Arrow face clour ( in color vector or char)
                    default : 'b'
'EdgeColor : arrow edge colour ( in colour vector or char or
                    default : 'g'
'FaceAlpha : alpha values for face transparency of the arrow and line
                    default : 1.0
'EdgeAlpha : alpha values for edge transparency of the arrow and line
                    default : 1.0
'Linestyle : Linetyle on the line and arrow face ('-' , '--',..)
                    default : 'None'

Example:

draw_line3([0 0 0]', [100 100 100]',...
                    'Linecolor', 'b',...
                    'LineWidth', 5 ,...
                    'ArrowDirection', 2,...
                    'ArrowLength', 10,....
                    'ArrowIntend', 3,...
                    'ArrowAngle', 45,...
                    'ArrowColor', 'r')
                
will draw the line with the specified optional parameters in the current plot.

Required Products Image Processing Toolbox
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
13 Jun 2014 Hajananth Nallaivarothayan  
16 Jan 2014 DavidKnight  
19 Oct 2012 Mr Smart  

Contact us