delaunay function on raspberry pi?
1 次查看(过去 30 天)
显示 更早的评论
Hello all,
I am trying to convert my code so it can run on a raspberry pi. However, part of my code is a map generator which uses the delaunay function to create a triangulation as follows:
(...)
x = x(:);
y = y(:);
z = z(:);
faces = delaunay(x, y);
randomMap = triangulation(faces, x, y, z);
end
Matlab Coder says it cannot convert the delaunay function. Is there any other function I can use to port this? I have already tried using 'delaunayTriangulation' or 'alphashape' instead, and tried to directly call 'qhull', but neither of these work. And since the delaunay function is built-in, I cannot look at the source code to fix this issue either and I do not know enough about the implementation to implement it from scratch.
Any help is appreciated!
2 个评论
Umar
2024-8-18
Hi @Sebastian,
Is it possible for you to post your code along with any data that you are using in order for us to resolve your issue.
Walter Roberson
2024-8-18
Sample code:
function test
N = 50;
x = rand(N,1);
y = rand(N,1);
z = rand(N,1);
x = x(:);
y = y(:);
z = z(:);
faces = delaunay(x, y);
randomMap = triangulation(faces, x, y, z);
end
MATLAB Coder will be unable to compile this.
回答(1 个)
Saurabh
2024-8-26
Hi Sebastian,
According to my understanding, you are trying to do code generation for your code, which uses the “delaunay” function to run it on the Raspberry Pi, but MATLAB says it cannot convert the “delaunay” function.
Going through the release notes found that from R2020a MathWorks has supported Computational Geometry function “delaunayn” for code generation, “delaunayn” can construct Delaunay Triangulation in any n dimensional space. You can explore this function instead of delaunay / delaunayTriangulation.
Refer to this documentation to get to know more about the “delaunayn” function:
I Hope this was helpful.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Delaunay Triangulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!