Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Fit paraboloid to measured x,y,z coordinates

Subject: Fit paraboloid to measured x,y,z coordinates

From: Daniel Moka

Date: 8 Nov, 2012 21:05:19

Message: 1 of 5

Hello!

First, I wanna thanks everybody who'll spend his time to work on my
problem.

I have measured an object with geodetic total stations. i have X,Y,Z coordinates of the object. I would like to fit a paraboloid to my x,y,z coordinates and deterrmine the deviation (dy,dy,dz) between my measured object and a theoretical paraboloid.

(My object is similar to this : http://goo.gl/wUmiK )

Of course, i already have 3 coloumn vector of x y and z coordinates in matlab.

Thank you all!

Have a nice day!

Daniel

Subject: Fit paraboloid to measured x,y,z coordinates

From: Roger Stafford

Date: 9 Nov, 2012 08:02:16

Message: 2 of 5

"Daniel Moka" <mokadaniel@citromail.hu> wrote in message <k7h6qf$q3a$1@newscl01ah.mathworks.com>...
> I have measured an object with geodetic total stations. i have X,Y,Z coordinates of the object. I would like to fit a paraboloid to my x,y,z coordinates and deterrmine the deviation (dy,dy,dz) between my measured object and a theoretical paraboloid.
> (My object is similar to this : http://goo.gl/wUmiK )
- - - - - - - - -
  If your "object" is one of those antennae pictured at the website you mentioned, it appears to be a circular paraboloid, which would make things quite a bit easier. Is that the kind of paraboloid you are trying to fit your points to?

Roger Stafford

Subject: Fit paraboloid to measured x,y,z coordinates

From: Daniel Moka

Date: 9 Nov, 2012 09:32:17

Message: 3 of 5

"Roger Stafford" wrote in message <k7ida8$3ui$1@newscl01ah.mathworks.com>...
> "Daniel Moka" <mokadaniel@citromail.hu> wrote in message <k7h6qf$q3a$1@newscl01ah.mathworks.com>...
> > I have measured an object with geodetic total stations. i have X,Y,Z coordinates of the object. I would like to fit a paraboloid to my x,y,z coordinates and deterrmine the deviation (dy,dy,dz) between my measured object and a theoretical paraboloid.
> > (My object is similar to this : http://goo.gl/wUmiK )
> - - - - - - - - -
> If your "object" is one of those antennae pictured at the website you mentioned, it appears to be a circular paraboloid, which would make things quite a bit easier. Is that the kind of paraboloid you are trying to fit your points to?
>
> Roger Stafford


Thank you for your reply!

To be honest, i am a little bit greenhorn at this topic :\ My teacher told me, i have to fit a rotation paraboloid to my x,y,z coordinates, and determine the deviations. I have alredy fitted a ball(sphere) to these coordinates, and determined the deviations.
The result is the following : for example for the first 2 points :

2012.11.06 11:02 - Ball (sphere)
Y0 = 2.388 X0 = 0.503 Z0 = 4.005 R = 0.309

Point y x z dy dx dz dr
3 2.220 0.636 4.235 0.003 -0.002 -0.004 -0.005
4 2.215 0.644 4.226 0.002 -0.002 -0.004 -0.005

This ball fitting task was easy to do, because there is a program(created by my teacher) which can solve that.

Responsing to your question, yes, my object is something like that paraboloid at website, and i should fit same paraboloid to this. i am going to university today (where the parabola is) and i am going to take a picture of that, then i will put it here to this message.

i am sorry for my bad english, it is long time since i have used it, nowadays i am trying to improve it...

Daniel

Subject: Fit paraboloid to measured x,y,z coordinates

From: Roger Stafford

Date: 9 Nov, 2012 17:09:20

Message: 4 of 5

"Daniel Moka" <mokadaniel@citromail.hu> wrote in message <k7iij1$kht$1@newscl01ah.mathworks.com>...
> To be honest, i am a little bit greenhorn at this topic :\ My teacher told me, i have to fit a rotation paraboloid to my x,y,z coordinates, and determine the deviations.
> ........
> Responsing to your question, yes, my object is something like that paraboloid at website, and i should fit same paraboloid to this.
- - - - - - - - -
  I am willing help you with your homework to the extent of finding the distance from a given point to the closest point of a given circular paraboloid (that is, a surface obtained by revolving a parabola around its axis.)

  Such a paraboloid can be characterized by a vector of the three cartesian coordinates of its intersection with its central axis, A, and those of its focal point, F. Let P be the coordinates of one of your points and designate Q as the coordinates of the closest point to P on the paraboloid. The plane through triangle PAF cuts the paraboloid in a parabola and Q must lie in this plane on this parabola. Let U and V be the distances in this plane from A to P orthogonal to the line F-A and along it, respectively. Then compute them:

 f = norm(F-A);
 j = (F-A)/f; % Unit vector along F-A
 U = norm(cross(P-A,j));
 V = dot(P-A,j);

Let u,v be corresponding distances for Q, so they must satisfy v = u^2/(4*f) along the parabola. We must minimize the distance between P and Q

 D = sqrt((u-U)^2+(v-V)^2) = sqrt((u-U)^2+(u^2/(4*f)-V)^2)

By setting its derivative with respect to u to zero we get

 u^3/(4*f^2)+(2-V/f)*u-2*U = 0

which is a cubic equation in u. This can be solved using matlab's 'roots' function. The answer will be either one real and two complex roots or three real roots. You would either choose the single real root in the former case or the positive u in the latter case. Then find v:

 v = u^2/(4*f);

Then the distance between P and its closest point Q would be the above expression for D.

  Presumably you would either use matlab's 'fminsearch' or 'lsqnonlin' of the optimization toolbox to search for the least squares solution for your set of given points with the six variable parameters being the three coordinates of A and those of F.

  To recover the x,y,z coordinates of each Q point from its associated u and v values, do this

 Q = A + u/U*cross(j,cross(P-A,j)) + v*j;

This would enable you to evaluate your optimum dx, dy, and dz values for the given points from the vector P-Q.

Roger Stafford

Subject: Fit paraboloid to measured x,y,z coordinates

From: Daniel Moka

Date: 9 Nov, 2012 21:48:23

Message: 5 of 5

ohh man, i do appreciate your help!

Tomorrow, i am going to try to solve this task wtih your informations, after that i will write a message here with my results!

By the way, i have taken some picture...if you are interested in it:
http://goo.gl/1FbRt
http://goo.gl/ziE6A

Thank you !

Have a nice weekend!

Daniel

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us