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:
Normal vector of circles

Subject: Normal vector of circles

From: Paulo

Date: 23 Oct, 2010 18:57:04

Message: 1 of 15

Hi everyone.

Having a circle, knowing its center and radius, how can I calculate the normal vector? I need more information? Moreover, how can I calculate a tangent vector to the circle, knowing its center, radius and the normal vector?

If I rotate this circle, it is possible to calculate again the normal vector with the same direction? Because the normal vector can be pointing in opposite directions.

Thank you very much for your help.

Subject: Normal vector of circles

From: Roger Stafford

Date: 23 Oct, 2010 19:22:04

Message: 2 of 15

"Paulo " <paulofreitas7@portugalmail.pt> wrote in message <i9vb60$eu5$1@fred.mathworks.com>...
> Hi everyone.
>
> Having a circle, knowing its center and radius, how can I calculate the normal vector? I need more information? Moreover, how can I calculate a tangent vector to the circle, knowing its center, radius and the normal vector?
>
> If I rotate this circle, it is possible to calculate again the normal vector with the same direction? Because the normal vector can be pointing in opposite directions.
>
> Thank you very much for your help.
- - - - - - - - - -
  I don't see what the difficulty is. A vector normal to a circle at a point on its circumference is parallel to a vector pointing from the circle's center to that point. A tangent at this point is orthogonal to that normal vector.

Roger Stafford

Subject: Normal vector of circles

From: Jan Simon

Date: 23 Oct, 2010 20:54:05

Message: 3 of 15

Dear Paulo,

> Having a circle, knowing its center and radius, how can I calculate the normal vector?

A circle does not have a normal vector. This impedes the calculation remarkably.
A disk has a normal vector. To be exact, 2 normal vectors: because a disk has no defined orientation with n, -n is valid also.
The radius does not matter the value of the normal vector of a disk, of course.
If your circle is embedded in a 3D space, a center and a radius is not enough to define it. If the circle lives in 2D, the normal is trivial.

So please explain your problem again with all mathematically needed details.

Kind regards, Jan

Subject: Normal vector of circles

From: Paulo

Date: 23 Oct, 2010 21:41:05

Message: 4 of 15

"Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de> wrote in message <i9vi1d$plf$1@fred.mathworks.com>...
> Dear Paulo,
>
> > Having a circle, knowing its center and radius, how can I calculate the normal vector?
>
> A circle does not have a normal vector. This impedes the calculation remarkably.
> A disk has a normal vector. To be exact, 2 normal vectors: because a disk has no defined orientation with n, -n is valid also.
> The radius does not matter the value of the normal vector of a disk, of course.
> If your circle is embedded in a 3D space, a center and a radius is not enough to define it. If the circle lives in 2D, the normal is trivial.
>
> So please explain your problem again with all mathematically needed details.
>
> Kind regards, Jan

Hi.

Yes the circle that I'm using is the one that cuts a sphere in half passing through the center of the sphere, known as great circle. I just have the radius and the center point. Now it is enough Jan? If not, what information I need?

Thank you for your support.

Best regards, Paulo

Subject: Normal vector of circles

From: Roger Stafford

Date: 23 Oct, 2010 21:54:05

Message: 5 of 15

"Paulo " <paulofreitas7@portugalmail.pt> wrote in message <i9vkph$i54$1@fred.mathworks.com>...
> .......
> Yes the circle that I'm using is the one that cuts a sphere in half passing through the center of the sphere, known as great circle. I just have the radius and the center point. Now it is enough Jan? If not, what information I need?
> ......
- - - - - - - -
  You need to state how this great circle is determined. Out of the infinity of possible such great circles, which one is it? When you tell us, I predict the normal to the plane of the circle will be obvious.

Roger Stafford

Subject: Normal vector of circles

From: Jan Simon

Date: 23 Oct, 2010 22:36:03

Message: 6 of 15

Dear Paulo,

> Yes the circle that I'm using is the one that cuts a sphere in half passing through the center of the sphere, known as great circle. I just have the radius and the center point. Now it is enough Jan? If not, what information I need?

Please think twice.
There is an infinite number of great circles on a sphere.

There are several methods to define a specific great circle, e.g.:
- two points on the circle (the connection between the points must not touch the center) and the center of the sphere,
- the center and radius of the sphere --- and the normal vector of the disk...
- etc.

Perhaps it would be better to explain the background of your problem.

Kind regards, Jan

Subject: Normal vector of circles

From: Paulo

Date: 23 Oct, 2010 22:41:04

Message: 7 of 15

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <i9vlht$6qq$1@fred.mathworks.com>...
> "Paulo " <paulofreitas7@portugalmail.pt> wrote in message <i9vkph$i54$1@fred.mathworks.com>...
> > .......
> > Yes the circle that I'm using is the one that cuts a sphere in half passing through the center of the sphere, known as great circle. I just have the radius and the center point. Now it is enough Jan? If not, what information I need?
> > ......
> - - - - - - - -
> You need to state how this great circle is determined. Out of the infinity of possible such great circles, which one is it? When you tell us, I predict the normal to the plane of the circle will be obvious.
>
> Roger Stafford

For the first case, the plane of the great circle can be created arbitrarily due to the infinity of possible choices. There is no restriction with that. Then, the next task I will need to save the direction of the normal vector during the sphere rotations.

I hope that now is more clear.

thank you all for your support.

Subject: Normal vector of circles

From: Jan Simon

Date: 23 Oct, 2010 23:13:05

Message: 8 of 15

Dear Paulo,

> For the first case, the plane of the great circle can be created arbitrarily due to the infinity of possible choices. There is no restriction with that. Then, the next task I will need to save the direction of the normal vector during the sphere rotations.

Now it is getting easier to answer:
You *cannot* calculate a normal vector of a great circle, if you do not define this circle. Did you really expect that there is a method to calculate n = [a,b,c] with well defined values a, b and c, as long as the orientation of the circle is "arbitrary"?!
As said already, a specific normal vector is needed to define the circle - not the other way around.

Then you want to rotate the sphere? How? Do you apply a rotation matrix? Then you can apply this matrix to the normal vector also. "Save the direction of the normal vector during the sphere rotation" means the same problem: The rotation itself means the change of the local coordinates. You do not have to save the directions, the "rotation" contains all information you can get from the system!

Let me translate your problem to the 1D case. Then your question is equivalent to:
1. How can I calculate the length of an arbitrary distance. Answer: This depends on the distance between the end points.
2. How does this length change after a transformation of the coordinates. Answer: If the transformation dilates the coordinates by a factor x, the length is dilated by a factor x.

As far as I can understand your problem, you can omit the sphere, the great circle and the normals. All you need is inlcuded in the "rotation" already.

Kind regards, Jan

Subject: Normal vector of circles

From: Paulo

Date: 24 Oct, 2010 00:07:04

Message: 9 of 15

"Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de> wrote in message <i9vq61$b5$1@fred.mathworks.com>...
> Dear Paulo,
>
> > For the first case, the plane of the great circle can be created arbitrarily due to the infinity of possible choices. There is no restriction with that. Then, the next task I will need to save the direction of the normal vector during the sphere rotations.
>
> Now it is getting easier to answer:
> You *cannot* calculate a normal vector of a great circle, if you do not define this circle. Did you really expect that there is a method to calculate n = [a,b,c] with well defined values a, b and c, as long as the orientation of the circle is "arbitrary"?!
> As said already, a specific normal vector is needed to define the circle - not the other way around.
>
> Then you want to rotate the sphere? How? Do you apply a rotation matrix? Then you can apply this matrix to the normal vector also. "Save the direction of the normal vector during the sphere rotation" means the same problem: The rotation itself means the change of the local coordinates. You do not have to save the directions, the "rotation" contains all information you can get from the system!
>
> Let me translate your problem to the 1D case. Then your question is equivalent to:
> 1. How can I calculate the length of an arbitrary distance. Answer: This depends on the distance between the end points.
> 2. How does this length change after a transformation of the coordinates. Answer: If the transformation dilates the coordinates by a factor x, the length is dilated by a factor x.
>
> As far as I can understand your problem, you can omit the sphere, the great circle and the normals. All you need is inlcuded in the "rotation" already.
>
> Kind regards, Jan

Thank Jan for your reply.

The initial and original problem is: Given a sphere to you, you can take the axes and any other information from it, then you close your eyes while I rotate it. Now, how can you calculate the rotation?

There is a mathematical way to calculate rotations of spheres as I stated before? If anyone can solve this question, my problem is completely solved.

I heard solutions as: Set the axes at the center of the sphere, and save its coordinates and directions. After the rotation, just compare before and after the rotation. Well, I think that this is not a mathematical solution, is more a programming trick.

Thank you very much!

Subject: Normal vector of circles

From: Jan Simon

Date: 24 Oct, 2010 00:38:04

Message: 10 of 15

Dear Paulo,

> The initial and original problem is: Given a sphere to you, you can take the axes and any other information from it, then you close your eyes while I rotate it. Now, how can you calculate the rotation?

If the sphere does have 3 axes, it gets trivial:
Assuming that there are three orthogonal normalized axes as local coordinate system, the global coordinates of these three axes build the rotation matrix already.
The rotation axes is an eigen-vector of the matrix with eigen-value 1. The rotational angle is ACOS((TRACE(R) - 1)/2).

The general problem has no unique solution: You can rotate the sphere by mutliples of 360 deg without a difference afterwards.

Kind regards, Jan

Subject: Normal vector of circles

From: Bruno Luong

Date: 24 Oct, 2010 08:14:04

Message: 11 of 15

"Paulo " <paulofreitas7@portugalmail.pt> wrote in message <i9vtb8$jov$1@fred.mathworks.com>...

>
> The initial and original problem is: Given a sphere to you, you can take the axes and any other information from it, then you close your eyes while I rotate it. Now, how can you calculate the rotation?

You get confused by the person who poses the problem. The sphere by itself has little to do with the rotation (all we know is the *mapping image* as the sphere unchanged).

You can imagine selecting n points on the sphere, i.e., n vectors having the same norm = r. After the rotation it maps to n new points. The question is what is the rotation that maps the old to new points. This problem can be formalized as vectors as following:

P := { x1, x2, ... , xn in R^3 : |xi| = r },
Q := rotation of P,
find the rotation from P and Q.

I claim that if you select P having two points (n=2) not opposite (x1 different +/- x2) and their transformations, it is enough to find the rotation.

Bruno

Subject: Normal vector of circles

From: Paulo

Date: 24 Oct, 2010 12:24:03

Message: 12 of 15

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <ia0psc$6qe$1@fred.mathworks.com>...
> "Paulo " <paulofreitas7@portugalmail.pt> wrote in message <i9vtb8$jov$1@fred.mathworks.com>...
>
> >
> > The initial and original problem is: Given a sphere to you, you can take the axes and any other information from it, then you close your eyes while I rotate it. Now, how can you calculate the rotation?
>
> You get confused by the person who poses the problem. The sphere by itself has little to do with the rotation (all we know is the *mapping image* as the sphere unchanged).
>
> You can imagine selecting n points on the sphere, i.e., n vectors having the same norm = r. After the rotation it maps to n new points. The question is what is the rotation that maps the old to new points. This problem can be formalized as vectors as following:
>
> P := { x1, x2, ... , xn in R^3 : |xi| = r },
> Q := rotation of P,
> find the rotation from P and Q.
>
> I claim that if you select P having two points (n=2) not opposite (x1 different +/- x2) and their transformations, it is enough to find the rotation.
>
> Bruno

Exactly! Thank you Bruno. But the thing is, there is a well known point in the sphere that is the center. So I have for example the x1. But then I need another point x2. What point should I choose? It may be a point at the surface but there are infinite points. To solve this issue I thought in: having a plane cutting the sphere in half and passing from x1, defining a normal to this plane, I can rotate the sphere with the plane and then I can map again the rotation performed. By another words, the rotation in the plane will be the same for the sphere.

Am I missing something? What you think about his?

Thank you a lot!!

Subject: Normal vector of circles

From: Bruno Luong

Date: 24 Oct, 2010 12:58:04

Message: 13 of 15

"Paulo " <paulofreitas7@portugalmail.pt> wrote in message <ia18h3$7st$1@fred.mathworks.com>...
> "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <ia0psc$6qe$1@fred.mathworks.com>...
> > "Paulo " <paulofreitas7@portugalmail.pt> wrote in message <i9vtb8$jov$1@fred.mathworks.com>...
> >
> > >
> > > The initial and original problem is: Given a sphere to you, you can take the axes and any other information from it, then you close your eyes while I rotate it. Now, how can you calculate the rotation?
> >
> > You get confused by the person who poses the problem. The sphere by itself has little to do with the rotation (all we know is the *mapping image* as the sphere unchanged).
> >
> > You can imagine selecting n points on the sphere, i.e., n vectors having the same norm = r. After the rotation it maps to n new points. The question is what is the rotation that maps the old to new points. This problem can be formalized as vectors as following:
> >
> > P := { x1, x2, ... , xn in R^3 : |xi| = r },
> > Q := rotation of P,
> > find the rotation from P and Q.
> >
> > I claim that if you select P having two points (n=2) not opposite (x1 different +/- x2) and their transformations, it is enough to find the rotation.
> >
> > Bruno
>
> Exactly! Thank you Bruno. But the thing is, there is a well known point in the sphere that is the center. So I have for example the x1. But then I need another point x2. What point should I choose? It may be a point at the surface but there are infinite points. To solve this issue I thought in: having a plane cutting the sphere in half and passing from x1, defining a normal to this plane, I can rotate the sphere with the plane and then I can map again the rotation performed. By another words, the rotation in the plane will be the same for the sphere.

First: The center is not on the sphere. Second: When you rotate the center it stays where it is, so the center does not contribute anything in resolving the rotation. It's a bad idea to select the center.

The great circle contains infinity of points. You can hardly store it in the computer as it is. Unless you store the normal vector of the circle (up to you to encode the object), which is enough to know the circle. This is equivalent to select one point (e.g. the point of the half-line carried by normal vector intersecting with the sphere).

But then I claim that one point and its rotation is NOT enough to calculate the rotation.

I'll give you an example with r = 1 to start with:

x1 = (1, 0, 0)
x2 = (0, 1, 0)

After rotation
x1 -> (0, 1, 0)
x2 -> (0, 0, 1)

What is the rotation?, axis? angle?

Bruno

Subject: Normal vector of circles

From: Paulo

Date: 24 Oct, 2010 14:30:07

Message: 14 of 15

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <ia1ags$dgf$1@fred.mathworks.com>...
> "Paulo " <paulofreitas7@portugalmail.pt> wrote in message <ia18h3$7st$1@fred.mathworks.com>...
> > "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <ia0psc$6qe$1@fred.mathworks.com>...
> > > "Paulo " <paulofreitas7@portugalmail.pt> wrote in message <i9vtb8$jov$1@fred.mathworks.com>...
> > >
> > > >
> > > > The initial and original problem is: Given a sphere to you, you can take the axes and any other information from it, then you close your eyes while I rotate it. Now, how can you calculate the rotation?
> > >
> > > You get confused by the person who poses the problem. The sphere by itself has little to do with the rotation (all we know is the *mapping image* as the sphere unchanged).
> > >
> > > You can imagine selecting n points on the sphere, i.e., n vectors having the same norm = r. After the rotation it maps to n new points. The question is what is the rotation that maps the old to new points. This problem can be formalized as vectors as following:
> > >
> > > P := { x1, x2, ... , xn in R^3 : |xi| = r },
> > > Q := rotation of P,
> > > find the rotation from P and Q.
> > >
> > > I claim that if you select P having two points (n=2) not opposite (x1 different +/- x2) and their transformations, it is enough to find the rotation.
> > >
> > > Bruno
> >
> > Exactly! Thank you Bruno. But the thing is, there is a well known point in the sphere that is the center. So I have for example the x1. But then I need another point x2. What point should I choose? It may be a point at the surface but there are infinite points. To solve this issue I thought in: having a plane cutting the sphere in half and passing from x1, defining a normal to this plane, I can rotate the sphere with the plane and then I can map again the rotation performed. By another words, the rotation in the plane will be the same for the sphere.
>
> First: The center is not on the sphere. Second: When you rotate the center it stays where it is, so the center does not contribute anything in resolving the rotation. It's a bad idea to select the center.
>
> The great circle contains infinity of points. You can hardly store it in the computer as it is. Unless you store the normal vector of the circle (up to you to encode the object), which is enough to know the circle. This is equivalent to select one point (e.g. the point of the half-line carried by normal vector intersecting with the sphere).
>
> But then I claim that one point and its rotation is NOT enough to calculate the rotation.
>
> I'll give you an example with r = 1 to start with:
>
> x1 = (1, 0, 0)
> x2 = (0, 1, 0)
>
> After rotation
> x1 -> (0, 1, 0)
> x2 -> (0, 0, 1)
>
> What is the rotation?, axis? angle?
>
> Bruno

What about the normal vector? If we store the normal vector of the great circle still be not enough?

And why not handle with the plane that contains the great circle? It will be a square (right?) and we know its lateral coordinates and the normal vector.

What you think?

Thank you again!

Subject: Normal vector of circles

From: Bruno Luong

Date: 24 Oct, 2010 18:46:03

Message: 15 of 15


>
> What about the normal vector? If we store the normal vector of the great circle still be not enough?

One point is not enough. As I said.

>
> And why not handle with the plane that contains the great circle? It will be a square (right?) and we know its lateral coordinates and the normal vector.
>

A square? Why not? But why not a triangle? Or a line segment along a diameter of the circle? Or a single point of the circle?

I claim two points are enough. Pick them as normal + another point if you like. All you need to know is where they were (before rotation) and where they are (after rotation).

Bruno

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