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
.Net Runtime Library for Delphi 6.0.4.0
Scimbo 1.64
AnyMap JS Maps 8.4.2
GetOrgChart 2.5.3
AnyChart JS Charts and Dashboards 8.4.2
OrgChart JS 3.8.0
dbForge Compare Bundle for MySQL 8.1
dbForge Search for SQL Server 2.3
Database Workbench Pro 5.5.0
Luxand FaceSDK 7.0
SSIS Data Flow Components 1.10
Entity Developer Professional 6.3
dbForge Index Manager for SQL Server 1.9
dbForge Data Generator For MySQL 2.2
Magento Australia Post eParcel Extension 1.0
Top Code
MATLAB Support Package for Arduino (aka ArduinoIO Package) 1.0
Betting system 6.x-1.x-dev
Java-2-Pseudo 1.0
Faculty Evaluation System 1.1
MLM Forced Matrix Plan Software 1.0.2
Online Car Rental Management Software Solution Alpha
Library Management System 1.0
Aspose.Words for Java 13.3.0.0
Russian Roulette
soccerbet 1.0
Cuckoo Search (CS) Algorithm 1.0
Student Information Management System 1.0
Java/RTR 1.0
JEDI Database Desktop 27012002
PHP Point of sale 10.0
Top Rated
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
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
PHP GZ Blog Script 1.1
ATN Jobs Software 4.0
ATN Mall 2.0
WeBuilder 2015 13.3
PHP Digital Download Script 1.0.4
Shortest Distance Between Two Lines in N dimensions 1.0
File ID: 86551






Shortest Distance Between Two Lines in N dimensions 1.0
Download Shortest Distance Between Two Lines in N dimensions 1.0http://www.mathworks.comReport Error Link
License: Shareware
File Size: 10.0 KB
Downloads: 15
Submit Rating:
Shortest Distance Between Two Lines in N dimensions 1.0 Description
Description: Function uses algorithm from Dan Sunday internet site
http://softsurfer.com/Archive/algorithm_01...ment_to_Segment
L1, L2 includes two points in matrix of 2*n
where n are dimensions (3 in 3D).
d - shortest distance between two lines
Pc,Qc - points where exists shortest distance d

EXAMPLE:
L1=rand(2,3);
L2=rand(2,3);
[d Pc Qc]=distBW2lines(L1,L2)

Functions of lines L1,L2 and shortest distance line
can be plotted in 3d or with minor change in 2D by
removing comments sign from code at the end of the file.
In some cases points Pc,Qc will not displayed accurately on line.
Just change value of par parameter according to point.

Programmed by Alexander Brodsky
newshurik at yahoo.com

License: Shareware

Related: filein, cases, displayed, Comments, byremoving, plotted, minor, Change, accurately, linejust, Alexander, brodskynewshurik, yahoocom, pointprogrammed, Parameter, linecan, Lines, points

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

File Size: 10.0 KB

Downloads: 15



More Similar Code

Computes the shortest distance between two line segments given start and end points for each. Adapts the algorithm found on Dan Sunday's website (http://softsurfer.com/Archive/algorithm_01...ment_to_Segment
).

Usage: Input the start and end x,y,z coordinates for two line segments.
p1, p2 are [x,y,z] coordinates of first line segment and p3,p4 are for
second line segment.

Output: scalar minimum distance...



This function will compute the great circle distance between two points on a sphere of uniform radius using the Vincenty formula. At minimum, four inputs are required: lat1, long1, lat2, long2. Optionally, a fifth parameter (r) can be specified....



This program calculates the distance between two locations (latitude and longitude) using the Haversine formula. The Haversine formula gives the shortest distance between two points over the earth's surface, ignoring elevation, hills, etc...



This function computes the minimum euclidean distance between two polygons P1 & P2.

- for vertex-vertex case



Takes the list of coordinates between 2 groups of pixels and calculates the shortest distance between the 2 groups and returns their pixel coordinates.



Geozip Calc Distance Between Zip Codes is Unix compatible. Calculates distance between zip codes in the US or finds zip codes within a given distance. The sub-routines included can be used to calculate distance between latitude and longitude...



M-file to calculate the distance between two points on the earth surface, using different ellipsoid parameters.



These files show how MATLAB can be used to simulate random walks both on a lattice in N-dimensions and on a graph. The zip file contains the following:

RandDir: generates a random basis vector on a lattice
RandGraphMove: Given a...



Vincenty published an algorithm for calculating the distance between two latitudes and longitudes and another to find the destination latitude and longitude, given the start coordinate, bearing and distance



This script calculates distance between two US zip codes. Included sub-routines can be used to calculate any distance between latitude and longitude coordinates. The calculation accounts for the fact that the earth is not a perfect sphere.

User Review for Shortest Distance Between Two Lines in N dimensions
- required fields
     

Please enter text on the image