Fast and Robust Self-Intersections
This function computes the locations where a curve self-intersects in a fast and robust way. The curve can be broken with NaNs or have vertical segments. Segments of the curve involved in each of the self-interesections are also provided.
Example of use:
N=201;
th=linspace(-3*pi,4*pi,N);
R=1;
x=R*cos(th)+linspace(0,6,N);
y=R*sin(th)+linspace(0,1,N);
t0=clock;
[x0,y0,segments]=selfintersect(x,y)
etime(clock,t0)
plot(x,y,'b',x0,y0,'.r');
axis ('equal'); grid
Citation pour cette source
Antoni J. Canós (2024). Fast and Robust Self-Intersections (https://www.mathworks.com/matlabcentral/fileexchange/13351-fast-and-robust-self-intersections), MATLAB Central File Exchange. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxCatégories
Tags
Remerciements
Inspiré par : Fast and Robust Curve Intersections
A inspiré : Accurate polygon extension, FGT - Fold Geometry Toolbox
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
Version | Publié le | Notes de version | |
---|---|---|---|
1.0.0.0 |