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
Social Media Script 1.0
ByteScout PDF Renderer SDK 9.0.0.3079
Magento Mobile App Builder 2.0.0
Binary MLM Plan 1.0.2
Review Assistant 4.0
SSIS Data Flow Components 1.8
Maulik Shah 1.0
GetOrgChart 2.4.91
ODBC Driver for SQL Azure 2.4
EntityDAC 2.0
CarMax Clone Script 1.0
Mega Menu Magento 2 2.0
Luxand FaceSDK 6.5.1
Data Puppy Lite (64-bit) 1.0
Bytescout BarCode Reader SDK 10.1.0.1778
Top Code
Wired Ekleipo 1.0
HOW TO: Use Database and ASP Sessions to Implement ASP Security
Hotel Management - Full Board Version 6.55
Flash Animated OsCommerce Templates
Image Edge Detection Using Ant Colony Optimization 1.0
validate email address
CGIMachine - Access Counter 2.20
Netflix Clone 3.0
How To Control Page Output Caching in ASP.NET by Using Visual C# .NET
Scratch n Win
PHP Image Resize Script 1.0
Sudoku Free Puzzles Daily Script 2.0
Open Source Chat Script 1.0
Restaurant Table Booking System 2.0
Online Food Ordeing System 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...



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