Finds convex polygon defined by random 2D points

Finds convex polygon defined by random 2D points

You are now following this Submission

The function "Return_points_polyg_direct" finds the subset of an arbitrarily large set of 2D points. This subset defines the convex polygon that includes all above points. The function accounts for aligned or identical points.
Below is an example of how to use the function with 100 random 2D points.
The initial points are in blue, the convex polygon points are linked in red.

******************
clear;
nouv_list_points3D=[];
Npoints=100;

%construction d'un ensemble de N points aléatoires

list_points_3D=rand(2,Npoints);

ligneZ=zeros(1,Npoints);

list_points_3D=cat(1,list_points_3D,ligneZ);

plot(list_points_3D(1,:),list_points_3D(2,:));

nouv_list_points3D = Return_points_polyg_direct(list_points_3D);

line(nouv_list_points3D(1,:),nouv_list_points3D(2,:),'LineWidth',1,'Color','red','Marker','s','MarkerSize',4);

Cite As

christian delusier (2026). Finds convex polygon defined by random 2D points (https://www.mathworks.com/matlabcentral/fileexchange/13940-finds-convex-polygon-defined-by-random-2d-points), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Computational Geometry in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0