delaunay function on raspberry pi?

1 vue (au cours des 30 derniers jours)
Sebastian
Sebastian le 16 Août 2024
Réponse apportée : Saurabh le 26 Août 2024
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 commentaires
Umar
Umar le 18 Août 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
Walter Roberson le 18 Août 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.

Connectez-vous pour commenter.

Réponses (1)

Saurabh
Saurabh le 26 Août 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, “delaunayncan 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.

Catégories

En savoir plus sur Spatial Search dans Help Center et File Exchange

Produits


Version

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by