Code covered by the BSD License  

Highlights from
Points On Line

Be the first to rate this file! 13 Downloads (last 30 days) File Size: 4.43 KB File ID: #32564
image thumbnail

Points On Line

by Ankur Pawar

 

18 Aug 2011 (Updated 29 Nov 2011)

Linearly spaced points between two point and ,point in Convex Hull test.

| Watch this File

File Information
Description

pointsOnLine:Linearly spaced points between two points in space . This function uses direction vector of two point to calculate points between .

inConvHull:function to test a point inside a 3d Convex Hull
zip file contain

pointsOnLine.m : creates linearly spaced points .

testpointsOnLine.m : example showing the use of pointsOnLine function .

sphericalDodecahedron.m : projection of dodecahedron on sphere . Uses this function to create points between two vertex.

inConvHull.m :function test a point whether it is inside a 3d convex hull or not.

testInHull.m :script to test inConvHull function.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Cubed sphere

MATLAB release MATLAB 7.0.1 (R14SP1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
18 Oct 2011 Sven

Please note that this function can be generalised with a speedup by:

points = interp1([0;1], [point1;point2], linspace(0,1,numPoints));

30 Oct 2011 Ankur Pawar

It is generalized but not fast.

tic,points = pointsOnLine([2 4 5],[9 9 9],500);toc
Elapsed time is 0.000351 seconds

tic,points = interp1([0;1], [2 4 5;9 9 9], linspace(0,1,500));toc
Elapsed time is 0.001596 seconds

Please login to add a comment or rating.
Updates
29 Nov 2011

Included a new function inConvHull.m for in convex hull test.

Tag Activity for this File
Tag Applied By Date/Time
points on line Ankur Pawar 18 Aug 2011 09:04:50
line Ankur Pawar 18 Aug 2011 09:04:50
2d Ankur Pawar 18 Aug 2011 09:04:50
3d Ankur Pawar 18 Aug 2011 09:04:50
geometry Ankur Pawar 18 Aug 2011 09:04:50
linspace Ankur Pawar 18 Aug 2011 09:04:50
graphis Ankur Pawar 18 Aug 2011 09:04:50
polyhedron Ankur Pawar 18 Aug 2011 09:04:50
dodecahedron Ankur Pawar 18 Aug 2011 09:04:50
space points Ankur Pawar 18 Aug 2011 09:04:50
projection Ankur Pawar 18 Aug 2011 09:04:50
distribute Ankur Pawar 18 Aug 2011 09:04:50
interpolate Ankur Pawar 18 Aug 2011 09:04:50
create points Ankur Pawar 18 Aug 2011 09:04:50
spherical Ankur Pawar 18 Aug 2011 09:04:50
convex hull Ankur Pawar 29 Nov 2011 13:15:00
inside Ankur Pawar 29 Nov 2011 13:15:00
inside convex hull Ankur Pawar 29 Nov 2011 13:15:00

Contact us at files@mathworks.com