Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.889.026 Times

Connect Randomly Ordered 2D Points into a Minimal Nearest-Neighbor Closed Contour 1.0

  Date Added: June 08, 2013  |  Visits: 217

Connect Randomly Ordered 2D Points into a Minimal Nearest-Neighbor Closed Contour

Report Broken Link
Printer Friendly Version


Product Homepage
Download (18 downloads)



Connects randomly ordered 2D points into a minimal nearest neighbor contour.points2contourTristan UrsellFebruary 2012 [Xout,Yout]=points2contour(Xin,Yin,P,direction) Given any list of 2D points (Xin,Yin), construct a singly connected nearest-neighbor path in either the 'cw' or 'ccw' directions. The code has been written to handle square and hexagon grid points, as well as any non-grid arrangement of points. 'P' sets the point to begin looking for the contour from the original ordering of (Xin,Yin), and 'direction' sets the direction of the contour, with options 'cw' and 'ccw', specifying clockwise and counter-clockwise, respectively. There are many (Inf) situations where there is no unique mapping of points into a connected contour -- e.g. any time there are more than 2 nearest neighbor points, or in situations where the nearest neighbor matrix is non-symmetric. Picking a different P will result in a different contour. Likewise, in cases where one point is far from its neighbors, it may be orphaned, and only connected into the path at the end, giving strange results. The input points can be of any numerical class. Note that this will *not* neccessarily form the shortest path between all the points -- that is the NP-Hard Traveling Salesman Problem, for which there is no deterministic solution. This will, however, find the shortest path for points with a symmetric nearest neighbor matrix. see also: bwtraceboundary Example 1: continuous pointsN=200;P=1;theta=linspace(0,2*pi*(1-1/N),N);[~,I]=sort(rand(1,N));R=2+sin(5*theta(I))/3;Xin=R.*cos(theta(I));Yin=R.*sin(theta(I));[Xout,Yout]=points2contour(Xin,Yin,P,'cw');figure;hold onplot(Xin,Yin,'b-')plot(Xout,Yout,'r-','Linewidth',2)plot(Xout(2:end-1),Yout(2:end-1),'k.','Markersize',15)plot(Xout(1),Yout(1),'g.','Markersize',15)plot(Xout(end),Yout(end),'r.','Markersize',15)xlabel('X')ylabel('Y')axis equal tighttitle(['Black = original points, Blue = original ordering, Red = new ordering, Green starting points'])box on Example 2: square gridP=1;Xin=[1,2,3,4,4,4,4,3,2,1,1,1];Yin=[0,0,0,0,1,2,3,3,2,2,1,0];[Xout,Yout]=points2contour(Xin,Yin,P,'cw');figure;hold onplot(Xin,Yin,'b-')plot(Xout,Yout,'r-','Linewidth',2)plot(Xout(2:end-1),Yout(2:end-1),'k.','Markersize',15)plot(Xout(1),Yout(1),'g.','Markersize',15)plot(Xout(end),Yout(end),'r.','Markersize',15)xlabel('X')ylabel('Y')axis equal tightbox on Example 3: continuous points, pathological caseN=200;P=1;theta=linspace(0,2*pi*(1-1/N),N);[~,I]=sort(rand(1,N));R=2+sin(5*theta(I))/3;Xin=(1+rand(1,N)/2).*R.*cos(theta(I));Yin=(1+rand(1,N)/2).*R.*sin(theta(I));[Xout,Yout]=points2contour(Xin,Yin,P,'cw'); figure;hold onplot(Xin,Yin,'b-')plot(Xout,Yout,'r-','Linewidth',2)plot(Xout(2:end-1),Yout(2:end-1),'k.','Markersize',15)plot(Xout(1),Yout(1),'g.','Markersize',15)plot(Xout(end),Yout(end),'r.','Markersize',15)xlabel('X')ylabel('Y')axis equal tighttitle(['Black = original points, Blue = original ordering, Red = new ordering, Green = starting points'])box on

Requirements: No special requirements
Platforms: Matlab
Keyword: Bwtraceboundary Deterministic Nphard Problem Salesman Solution Symmetric Traveling
Users rating: 0/10

License: Shareware Size: 10 KB
USER REVIEWS
More Reviews or Write Review


CONNECT RANDOMLY ORDERED 2D POINTS INTO A MINIMAL NEAREST-NEIGHBOR CLOSED CONTOUR RELATED
Mathematics  -  ODEcalc 6.10
ODEcalc for Windows: An Ordinary Differential Equation (ODE) Calculator! State your equation and boundary or initial value conditions and it solves your problem. Plots solution y and derivative ydot versus x. Solves most Boundary Value...
3.81 MB  
Programming  -  DKRouteFinder 1.0
DKRouteFinder is a free Cocoa class that offers a practical solution to the Travelling Salesman Problem - efficiently finding an optimal route among a set of arbitrarily distributed objects.
10.24 KB  
Programming  -  TSP Flaming 1.2
TSP Flaming is a software that quickly finds a good solution of the Travelling Salesman Problem using the method of Simulated Annealing. Problem Statement Given a map with cities locations, what is the least-cost round-trip...
163.84 KB  
Finance  -  Car Salesman Organizer Pro 3.1
Car Salesman Organizer Pro, software for Windows. Simple database management system that helps car sales people to organize, manage, and track prospects, leads, and clients. Our Car Salesman solution includes the following databases: Prospects...
9.53 MB  
Development Tools  -  PPT slide for Chapter 4 (Nonlinear Equations) of "Applied Numerical Methods Using MATLAB" 1.0
Chapter 4 Nonlinear Equations4.1 Iterative Method toward Fixed Point4.2 Bisection Method4.3 False Position OR Regula Falsi Method4.4 Newton(-Raphson) Method4.5 Secant Method4.6 Newton Method for a System of Nonlinear Equations4.7 Symbolic Solution...
450.56 KB  
Text Editors  -  Language Popularity Index 2
The Language Popularity Index tool is a fully automatic, transparent, open source and free utility to measure the popularity of programming languages on the Internet. The measurement of programming language popularity suffers two...
450.56 KB  
Web Authoring  -  ZalmanFtpClient 2010 1001
In today's world, the biggest fear of all website owners is loss of data and losing control of all the changes that are happening in the website on a daily basis. The only available solution in all the FTP clients available, the website...
5.58 MB  
Accounting Tools  -  ActiF - Fixed Assets Maintenance 06.02a
Controls the expenses and used parts for Corrective and Preventive Maintenances. Classify all Fixed Assets by Class, Status, Location, User, Vendor, Technician and Failure. Controls the expenses and used parts for Corrective and Preventive...
5.37 MB  
Mail Clients  -  Reach-a-Mail 3.8
Are you spending a lot of time away from your computer? Wish you had access to all your email accounts while traveling? Need to have your letters and address book with you, but don't want to carry a notebook? Reach-a-Mail gives the right answer!...
2.93 MB  
Mail Clients  -  Reach-a-Mail for U3 2.81
Are you spending a lot of time away from your computer? Wish you had access to all your email accounts while traveling? Need to have your letters and address book with you, but don't want to carry a notebook? Reach-a-Mail gives the right answer!...
2.34 MB  
NEW DOWNLOADS IN SCRIPTS, DEVELOPMENT TOOLS
Scripts  -  Freelancer Script 5.05
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Post projects. Featured projects. Private projects. Sealed projects. Edit/delete projects. Select freelancers....
5.49 MB  
Scripts  -  B2B Script 4.20
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Sign-up Account (Registration of account). Lead generation tools (for the sellers). Email verification to...
5.49 MB  
Scripts  -  B2C Script 5.06
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). The script comes with totally editable site colors, icons and graphics Multilevel categories allows extensive browsing Admin can change Category ordering or...
5.49 MB  
Scripts  -  Social Networking Script 2.86
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Registration with name, email, password, date of birth etc. User can add multiple school, college, university with start...
5.49 MB  
Scripts  -  Business Networking Script 8.04
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Ajax based interface. Profile creation. Different types of profile. Profile for jobseekers, employers and employed...
5.49 MB  
Development Tools  -  VMP Viewer 1.0
This is a very rudimentary tool to visualize the VMP files generated by BrainVoyager. Useful to share files with people who do not have BV.
10 KB  
Development Tools  -  Sending reports and timestamped file by emailing 1.0
main executing reference usage:[1] usage_send_mail.mIllustrates email sending with multiple separate files or single timestamped tar file. Attachment failure is properly handled, with continuation of report emailing without the attachment.[2]...
768 KB  
Development Tools  -  IrisMVC 2.0 rc1
IrisMVC is an OOP PHP framework that developers can use as a strong and secure foundation to build on various web applications following the Model-View-Controller (MVC) pattern. It provides the basic functionality developers need, without...
51.2 KB  
Development Tools  -  7-Zip for Script 4.42
7-Zip is a file archiver with a high compression ratio.Features:- High compression ratio in new 7z format with LZMA compression- Supported formats:- Packing / unpacking: 7z, ZIP, GZIP, BZIP2 and TAR- Unpacking only: RAR, CAB, ISO, ARJ, LZH, CHM,...
624.64 KB  
Development Tools  -  Barnardextest 1.0
This file, as the Fisher's exact test, performs the exact probability test for a table of frequency data cross-classified according to two categorical variables, each of which has two levels or subcategories (2x2). It is a non-parametric...
10 KB