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
VB.Net PDF 4.4.7
SuiteCRM Survey Rocket Plugin 1.0
Airbnb Clone Script | Airbnb Clone 4.3.1
IP2Location Geolocation Database 2018
ODBC Driver for Salesforce 1.5
Rapid PHP 2018 15.0
Bytescout BarCode Generator SDK 4.70.0.981
Data Puppy Lite (32-bit) 1.0
ProZ clone script 1.0.3
VideoCap Live Streaming SDK ActiveX 8.5
Magento Web to Print 1.0
dbForge Data Compare for MySQL 5.4
dbForge Query Builder for MySQL 4.3
ODBC Driver for NetSuite 1.2
Rapid CSS 2018 15.0
Top Code
Mann-Kendall Tau-b with Sen's Method (enhanced) 1.0
Online Food Ordeing System 1.0
OpenCV Delphi wrapper 1.0
Etsy Clone Script v 2.0
Fuzzy k means 1.0
Low Pass Butterworth Filter 1.0
ABBYY FineReader Engine 9.0
Advanced Forced Matrix Script 1.0
Feed The Snake 1.3
OpenELD 1.0
BMI Calculator Widget 1.3
Pro MLM 1
Dione Card Validator 1.0.2
ECG Beat Calculation 1.0
Test and Measurement Widgets 1.0
Top Rated
Output Messenger 1.8.0
Aliexpress Clone- Ec21 Script 1
Indiegogo Clone 3.0
Online Food Ordeing System 1.0
PHP Image Resize Script 1.0
Best Spotify Clone 1.0
Get Random Record Based on Weight 1.0.0
Travel Portal Script 9.29
Magento Product Designer 1.0
OFOS - Just Eat Clone Script 1.0
PrestaShop Upload Images Module 1.2.1
Trading Software 1.2.4
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
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...



Calculate Distance Between Two Points Us Visit | Rate | Error is a multi-platform compatible program to calculate the distance between two locations. It can be used for store locator or radius calculation. Free sample source codes in PHP, ASP,...



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

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

Please enter text on the image