Projection of 3D object at different random orientations onto 2D plane
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I was wondering if there is a way to project a 3D object onto a 2D plane. I am trying to take statistics of size when projected onto a 2D plane of multiple ellipsoid with random orientations.
My attempt to solve this problem was to first generate an ellipsoid using the ellipsoid() function, rotating it randomly, viewing it at an angle where I only see the XY plane, and taking images.
[x, y, z] = ellipsoid(0,0,0,5.9,3.25,3.25,30);
ndata = 100;
figure(1)
colormap gray(:,:,1)
clf;
for m = 1:ndata
S = surfl(x, y, z);
axis([-10 10 -10 10 -10 10])
xlabel('X')
ylabel('Y')
zlabel('Z')
view(0,0)
rotate(S,[rand rand rand],rand*360)
pause(0.05)
end
Ideally, I would like to use some kind of mask so I don't have to go through processing it from an image. Any help is appreciated. Thanks!
0 comentarios
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!