CHLNDDEV / OceanMesh2D

A two-dimensional triangular mesh generator with pre- and post-processing utilities written in pure MATLAB (no toolboxes required) designed specifically to build models that solve shallow-water equations or wave equations in a coastal environment (ADCIRC, FVCOM, WaveWatch3, SWAN, SCHISM, Telemac, etc.).
https://github.com/sponsors/krober10nd
GNU General Public License v3.0
188 stars 68 forks source link

Create draw_polygon_on_figure.m #239

Closed krober10nd closed 3 years ago

krober10nd commented 3 years ago
krober10nd commented 3 years ago
>> help draw_polygon_on_figure
  Draw a polygon on an open figure by clicking the screen. 
  Type the character `h` on the keyboard to finish drawing the polygon. 
  By default, the function merges points less than `ptol` distance apart
  from one another. By default `ptol` is set to 0.1 units. 

  Usage:
    polygon = draw_polygon_figure()

    polygon = draw_polygon_figure(0.2)

  Inputs:
    ptol: distance to merge nearby points (default=0.1). 

  Outputs:
    polygon: an array of coordinates that the user has drawn.  

  Author: Keith J. Roberts
  Created: July 2021