delaunay function on raspberry pi?

1 visualización (últimos 30 días)
Sebastian
Sebastian el 16 de Ag. de 2024
Respondida: Saurabh el 26 de Ag. de 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 comentarios
Umar
Umar el 18 de Ag. de 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 el 18 de Ag. de 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.

Iniciar sesión para comentar.

Respuestas (1)

Saurabh
Saurabh el 26 de Ag. de 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.

Categorías

Más información sobre Delaunay Triangulation en Help Center y File Exchange.

Productos


Versión

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by