circles - rectangle intersection area

A fast function which calculate the intersection area of a circle in a large rectangle.
545 download
Aggiornato 15 ott 2012

Visualizza la licenza

this function takes a list of circles centered (xcenter, ycenter) with radius r
and calculate the relative area in the rectangle with size xmax/ymax 1024x1024.
rectangle size can be changed
main strength of this function is by its speed of calculation.
average computation time is about 0.3s for 10000 circles.This was achieved by aproximating the circle area into
%3rd order polynoms instead of integrating
%the circle equation for finding the area below the axis.
example
x=1024*rand(1,10000);
y=1024*rand(1,10000);
radius=50;
tic; Result_V=compute_circle_area2(x,y,radius);
toc; %Elapsed time is 0.193961 seconds.
clarification:
The function "DistancePoints" used here was downloaded from “geom2d” package created by David Legland.

Cita come

Doron avramov (2026). circles - rectangle intersection area (https://it.mathworks.com/matlabcentral/fileexchange/38463-circles-rectangle-intersection-area), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2010a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Denoising and Compression in Help Center e MATLAB Answers
Versione Pubblicato Note della release
1.3.0.0

clarification:
The function "DistancePoints" used here was downloaded from “geom2d” package created by David Legland.

1.1.0.0

bug fixed

1.0.0.0