areaintersection.m

Version 1.0.0.0 (1.08 KB) by paul
Approximates the area of intersection of two polygons
2.4K Downloads
Updated 13 Jul 2007

No License

Function gives the approximate area of intersection of two polygons
whose vertices are given by set1 and set2.

Note that implementation of this function requires the standard Matlab
function "inpolygon"

STANDARD CALL

area = areaintersection(set1, set2, resolution)


INPUTS

set1 : an N x 2 matrix of the form (x1, y1; x1, y2; ...) giving the
vertices of a polygon
set2 : an M x 2 matrix of the form (x1, y1; x1, y2; ...) giving the
vertices of a second polygon
resolution : a positive scalar that determines the accuracy of the
approximation. The larger the value the greater the accuracy and the
longer the evaluation time. The matlab function "inpolygon" is the
real limiting factor in terms of execution time

OUTPUT

area : a scalar value that represents the area of intersection of the two
polynomials in standard units squared

Paul Koprowski 2007
paulkoprowski@hotmail.com

Cite As

paul (2026). areaintersection.m (https://www.mathworks.com/matlabcentral/fileexchange/15557-areaintersection-m), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP3
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Elementary Polygons in Help Center and MATLAB Answers
Version Published Release Notes
1.0.0.0

fixed a bug in error mesages