Code covered by the BSD License  

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

Be the first to rate this file! 0 Downloads (last 30 days) File Size: 5.21 KB File ID: #41743 Version: 1.1
image thumbnail



Wouter (view profile)


14 May 2013 (Updated )

This function distributes polygon points evenly across the polygon.

| Watch this File

File Information

  distributePointsOnPolygon this function uses faces and 2D/3D vertices as
  input. The vertices are redistributed over the polygon to decrease the
  variability in distance between the points.
  This is done by shifting the points iteratively over the original contour
  described by the polygon.
  - the polygon should be connected; i.e. the first and last point must be
    connected by faces.
  - the vertices may not be connected > 2 times.
  - the resulting polygon might be slightly smoohted, depending on the
    number of original points and the distance between those points; you can
    avoid this by using more input points or adding points at the longest faces
  [ v ] = distributePointsOnPolygon ( v )
  [ f, v ] = distributePointsOnPolygon ( f, v )
  [ f, v ] = distributePointsOnPolygon ( f, v, debug )
  use debug = 1 to see the progress.
  tweak the PARAMETRS on line 70-76 to speed up the process/ improve accuracy

Required Products MATLAB
MATLAB release MATLAB 8.1 (R2013a)
Other requirements Image processing toolbox is probably needed for the example code.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
04 Jun 2013 1.1

Now connects first and last vertex (if it was not connected already).

Contact us