Accurate polygon extension
by Krispijn Scholte
28 Oct 2008
(Updated 27 Jan 2009)
Enlarges polygon by a specified range. Also generates internal polygons caused by intersections.
|
Watch this File
|
| File Information |
| Description |
This function extends a polygon by a specified range. It also generates internal polygons caused by intersections.
The resulting polygon does not preserve the original shape of the input polygon (see screenshot above), but represents the range specified from the input polygon.
Example of usage is given in the m-file header (or type "help extendPoly").
Credit to NS for the self intersection algorithm. |
| Acknowledgements |
The author wishes to acknowledge the following in the creation of this submission:
Curve intersections
|
| MATLAB release |
MATLAB 7.6 (R2008a)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 29 Oct 2008 |
Fixed bug in determining if input polygon is defined CW or CCW |
| 29 Oct 2008 |
Added a bunch error and warning messages for badly formed input. Automatically closes input polygon if not closed (warning generated). |
| 10 Nov 2008 |
New and faster CW/CCW detection method for the input polygon. Old method returned incorrect results when the polygon points have negative x-values only. |
| 27 Jan 2009 |
v1.5: Replaced selfintersection algorithm because it yielded inaccurate results; added user definable resolution parameter for drawing the circle pieces of the resulting polygon. |
| 27 Jan 2009 |
v1.5 Replaced selfintersection algorithm because it yielded inaccurate results; added user definable resolution parameter for drawing the circle pieces of the resulting polygon. |
|
Contact us at files@mathworks.com