You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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.
Cite As
Doron avramov (2026). circles - rectangle intersection area (https://se.mathworks.com/matlabcentral/fileexchange/38463-circles-rectangle-intersection-area), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.3.0.0 (2.2 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
