Hi fellow Matlabers,
I have xyz coordinate of vertices of a 3D object. I am attaching a plot of the object which I created using the following code:
patch(P1X,P1Y,P1Z,'c','FaceAlpha',0.75);
My objective is to have this shell opened (flattened or projected) on a plane. Similar to what is done with earth map (Map projection in Matlab Mapping toolbox here). However, I think their algorithms are based on the assumption that earth is a homogeneous perfect sphere or ellipsoid which is not my case. Additionally, they used specific geodata formats.
I have tried using viewmtx command but it only gives a 2D projection from camera viewing angle. This does not do the job:
A = viewmtx(-37.5,30);
[m,n] = size(x);
x4d = [x(:),y(:),z(:),ones(m*n,1)]';
x2d = A*x4d;
x2 = zeros(m,n); y2 = zeros(m,n);
x2(:) = x2d(1,:);
y2(:) = x2d(2,:);
figure
scatter(x2,y2)
Any help and suggestion would be highly appreciated.
Cheers, Javad

댓글 수: 1

Arunkumar Rathinam
Arunkumar Rathinam 2019년 8월 10일
any updates on this.... on how you solved the problem ??.. any code or link would be really helpful.

댓글을 달려면 로그인하십시오.

답변 (0개)

질문:

2013년 12월 5일

댓글:

2019년 8월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by