Faster polygon operations than polyshape
이전 댓글 표시
Is there a faster method to handle vast amounts of polyshape operations? In my thesis, I need to perform large number of boolean operations of FoV of multiple satellites. I tried using a MEX version of GPC-Library. Though individual operations (binary operations with just two polygons) seemed faster, when working with polygon vectors, polyshape again become comparable in performance. Besides this the MEX code also become unstable and crashes MATLAB as I call it repeatedly. Any suggestions would be appriceated.
P.s. I use polyshape due to level of accuracy required for work, instead of approximated spherical point and operations on them.
댓글 수: 1
Jayanth Suresh
2023년 6월 20일
@JackCrusoe47 I am looking for ways to speed up my polyshape operations too. Do you have a rough estimate on the kind of time savings you got with the code you were using?
답변 (1개)
Bruno Luong
2020년 12월 6일
1 개 추천
댓글 수: 5
JackCrusoe47
2020년 12월 8일
JackCrusoe47
2020년 12월 8일
Bruno Luong
2020년 12월 8일
Ah your are welcome. I'm glad to learn the code is helpful.
Hi Bruno,
I hope this message find you well. I came across this thread as I was searching for a way to speed up union polyshapes. I am putting polybuffer around a set of links (see figure below). Method 1(left figure): store XY coordinates of all links in one array, then make a polyshape. output is not ideal. Method 2 (right figure): generate a polyshape for each link, then union. output is very ideal, but about 20 times slower than Method 1. I wonder if you can help me out here. Thank you.

In term of the clipper software, do I need to write a MEX Function based on C++ or C# to translate the software to use it in MATLAB, how would the outputs from software work with polyshape in MATLAB? I do not have any experenice in C languages or wrting MEX. any tipps there? Thank you so much.
Bruno Luong
2022년 4월 28일
The clipper provide a mex-ready cpp file. All you need is the C compiler supported by your MATLAB version.
The package is provided with an mfile with H1 line. The calling is well documented.
카테고리
도움말 센터 및 File Exchange에서 Polygonal Shapes에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!