generate uniformly distributed coordinates (Ax3 matrix) from known coordinates (Rx3 matrix)

Hi. I am trying to generate uniformly distributed coordinates (Ax3 matrix) from the non-uniform coordinates of a 3D object (Rx3 matrix) that I know. That is, I should create these uniformly distributed coordinates taking into account the Rx3 coordinates and maintaining the geometry of the 3D object. Is there any function available that can serve my purpose?
I am currently starting like this:
object3D = importdata("example.txt"); % known

Answers (1)

3 Comments

Thank you for the references.
I tried using scatteredInterpolant, but could you tell me what function (v) is best to use? Because I didn't get any results.
P = importdata("object3D.txt");
v = sin(P(:,1).^2 + P(:,2).^2 + P(:,3).^2)./(P(:,1).^2+P(:,2).^2+P(:,3).^2);
F = scatteredInterpolant(P,v);
points = F.Points;
figure
plot3(points(:,1), points(:,2), points(:,3),'k.','Markersize',15)
grid off
axis equal
xlabel('x')
ylabel('y')
zlabel('z')
view([15,50,30])
Why you want a function v? Attach your data.
I added the "v" function because "scatteredInterpolant" requests a v=F(x,y,z).
Attached you will find the .txt file.
M = importdata("example.txt");
plot3(M(:,1),M(:,2),M(:,3),'o')

Sign in to comment.

Products

Release

R2021b

Asked:

on 22 Dec 2022

Edited:

on 23 Dec 2022

Community Treasure Hunt

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

Start Hunting!