delaunay function on raspberry pi?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Umar
il 18 Ago 2024
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
il 18 Ago 2024
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.
Risposte (1)
Saurabh
il 26 Ago 2024
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 Commenti
Vedere anche
Categorie
Scopri di più su Delaunay Triangulation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!