Rank: 1266 based on 93 downloads (last 30 days) and 1 file submitted
photo

NS

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by NS
Updated   File Tags Downloads
(last 30 days)
Comments Rating
24 Sep 2010 Screenshot Curve intersections Fast computation of intersections and self-intersections of curves using vectorization. Author: NS curves, intersections, polygons, intersection, selfintersections, points 93 16
  • 5.0
5.0 | 14 ratings
Comments and Ratings by NS View all
Updated File Comments Rating
15 Dec 2012 Curve intersections Fast computation of intersections and self-intersections of curves using vectorization. Author: NS

To Emil: Thank you for your comment. Unfortunately there is not much that can be done about that, unless one uses for-loops, which are likely to delay the execution time considerably.

To make the execution time as fast as possible, I need to create N x M matrices, where N and M are the number of segments in each curve.

Perhaps you can try some other contribution on File Exchange that does not utilize vectorization, but it is likely to be very slow (there should be about 4e10 tests for intersections for vectors of that size!)

Alternatively, contact me to send you a modification to my code to test with your data. However, I cannot guarantee accuracy of the results, as I did not do extensive tests to it, but it seems to work.

24 Feb 2012 Curve intersections Fast computation of intersections and self-intersections of curves using vectorization. Author: NS

To Aviator: yes, it should handle these cases.

Comments and Ratings on NS's Files View all
Updated File Comment by Comments Rating
20 Aug 2014 Curve intersections Fast computation of intersections and self-intersections of curves using vectorization. Author: NS Greene, Chad

This function has proven very helpful for me. Thank you for sharing, and thank you for writing such a nice, neat code.

06 Mar 2014 Curve intersections Fast computation of intersections and self-intersections of curves using vectorization. Author: NS Abdulrahman

THANK YOU SO MUCH. Great algorithm and works perfectly and super fast.

Speechless

07 Jan 2014 Curve intersections Fast computation of intersections and self-intersections of curves using vectorization. Author: NS Ilya

it would be helpful to show how to get the (all) values of "t", at which the intersections occur.

Namely, two values of the parameter "t" correspond to each self-intersection.

06 Jan 2014 Curve intersections Fast computation of intersections and self-intersections of curves using vectorization. Author: NS Ilya

it would be helpful to show how to get the (all) values of "t", at which the intersections occur.

12 Dec 2013 Curve intersections Fast computation of intersections and self-intersections of curves using vectorization. Author: NS Arthington, Matthew

I've searched for a fast intersections function and I can't find one faster than this.

I'm a bit surprised that repeated subfunction calls are as fast as they are for large curves. Vectorising some of the operations speeds up the function, but only for smaller curves.

Contact us