From: Marcin on
"Roger Stafford" <ellieandrogerxyzzy(a)mindspring.com.invalid> wrote in message <ht4co8$5bf$1(a)fred.mathworks.com>...
> "Marcin " <mb1234(a)gazeta.pl> wrote in message <ht4940$b11$1(a)fred.mathworks.com>...
> > That's the catch. Nobody knows that, so it must be some kind of guess.
> - - - - - -
> It is no guess, Marcin. What you have put forward is not a well-defined problem and certainly does not have a unique solution. In fact there are infinitely many solutions.
>
> I strongly suggest you think long and hard about information concerning the object in its so-called "horizontal" position which you haven't thought to state here. Maybe there is something you know which will make it all a very reasonable problem. As it currently stands it is meaningless.
>
> If I were to hand you a perfectly spherical ball and ask you to rotate it until it was horizontal, what would be your reply? Your probable response should indicate to you what kind of problem you have been presenting here to us. I am sure you can do better than that.
>
> Roger Stafford

You are right of course with the ball. But let's assume that it's an ellipsoid-like shape (or flattened ball), it is rotated and I want to align it with the xy plane. How would I do that?
From: Matt J on
"Marcin " <mb1234(a)gazeta.pl> wrote in message <ht5gc5$cl0$1(a)fred.mathworks.com>...

>
> You are right of course with the ball. But let's assume that it's an ellipsoid-like shape (or flattened ball), it is rotated and I want to align it with the xy plane. How would I do that?
==============

How is that any different from the case of a perfect sphere? Do you know which axis of the ellipsoid was originally parallel to the z-axis? If so, eliciting that info from you has been like pulling teeth.
From: Marcin on
> How is that any different from the case of a perfect sphere? Do you know which axis of the ellipsoid was originally parallel to the z-axis? If so, eliciting that info from you has been like pulling teeth.

I don't but any alignment with the xyz axes will do. Mind you, that the object might not be a perfect ellipsoid but it will still have some principal axes, which I want to align. I guess that I have just answered my own question - some kind of PCA should do. But I still don't know how to plot it nicely - plot3 is not good enough and I can't find anything to do the interpolation for surf/mesh to work.
From: Matt J on
"Marcin " <mb1234(a)gazeta.pl> wrote in message <ht5o7v$96u$1(a)fred.mathworks.com>...
> > How is that any different from the case of a perfect sphere? Do you know which axis of the ellipsoid was originally parallel to the z-axis? If so, eliciting that info from you has been like pulling teeth.
>
> I don't but any alignment with the xyz axes will do. Mind you, that the object might not be a perfect ellipsoid but it will still have some principal axes, which I want to align. I guess that I have just answered my own question - some kind of PCA should do. But I still don't know how to plot it nicely - plot3 is not good enough and I can't find anything to do the interpolation for surf/mesh to work.
======================

I still don't see why surf won't work as is. In doc surf, they show to plot spheres/ellipsoids given a set of surface points.
From: Marcin on
> I still don't see why surf won't work as is. In doc surf, they show to plot spheres/ellipsoids given a set of surface points.

Try to do this then:

x = (-1:.1:1); y = (-1:.1:1);
[X,Y] = meshgrid(x,y);
Z = (1-X.^2-Y.^2);
mesh(Z); % this will work fine

Rp = randperm(numel(Z));
xr = X(Rp(1:200));
yr = Y(Rp(1:200));
zr = Z(Rp(1:200));
plot3(xr,yr,zr,'.'); % this will work fine as well but doesn't look too good

mesh(zr); % this will produce an error

All the data I have is xr,yr,zr.
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4
Prev: Pixel Scan
Next: Any reliabillity engineering geek?