Got Questions? Get Answers.
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:
plane equation with a radius

Subject: plane equation with a radius

From: Junghyun

Date: 15 Mar, 2010 10:52:05

Message: 1 of 10

Hello,

I need to find the plane equation if 2 eigenvectors at a given point in a 3D space and a radius are given.
How can I formulate it in Matlab?
Thanks,

Junghyun

Subject: plane equation with a radius

From: Roger Stafford

Date: 15 Mar, 2010 18:38:05

Message: 2 of 10

"Junghyun " <wkhdntnkpst@yahoo.com> wrote in message <hnl3gl$2lm$1@fred.mathworks.com>...
> Hello,
>
> I need to find the plane equation if 2 eigenvectors at a given point in a 3D space and a radius are given.
> How can I formulate it in Matlab?
> Thanks,
>
> Junghyun

  Your question is not at all clear to me Junghyun and I can only guess at what you mean. My speculation is that you wish to define the circle which lies in a plane parallel to two given vectors a and b, and contains a given point c, with the circle's center positioned at this c and with its radius equal to a given value r. If this is correct, do the following.

  If a and b are unit vectors and orthogonal, this circle can be expressed as follows:

 p = c + r*(cos(t)*a + sin(t)*b); % Point p traces out the circle in 3D

  More generally if a and b are any two non-parallel vectors, the circle can be expressed as:

 u = a/norm(a); % u is normalization of vector a
 v = cross(cross(a,b),a); % v is parallel to the plane and orthog. to u
 v = v/norm(v); % Normalize vector v
 p = c + r*(cos(t)*u + sin(t)*v); % Point p traces out the circle in 3D

  In either case, as parameter t varies from 0 to 2*pi, p starts at a, rotates past b, and on around again in a full circle to a at t = 2*pi.

  The assumption is made that a and b are not parallel. Otherwise the circle is not uniquely determined.

Roger Stafford

Subject: plane equation with a radius

From: Junghyun

Date: 16 Mar, 2010 09:12:03

Message: 3 of 10

Hi, Roger,
Thank you so much!
Your speculation was absolutely correct.

a and b are unit vectors and not parallel but orthogonal.
Can I use either way for the case?

Junghyun

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <hnluqd$bb4$1@fred.mathworks.com>...
> "Junghyun " <wkhdntnkpst@yahoo.com> wrote in message <hnl3gl$2lm$1@fred.mathworks.com>...
> > Hello,
> >
> > I need to find the plane equation if 2 eigenvectors at a given point in a 3D space and a radius are given.
> > How can I formulate it in Matlab?
> > Thanks,
> >
> > Junghyun
>
> Your question is not at all clear to me Junghyun and I can only guess at what you mean. My speculation is that you wish to define the circle which lies in a plane parallel to two given vectors a and b, and contains a given point c, with the circle's center positioned at this c and with its radius equal to a given value r. If this is correct, do the following.
>
> If a and b are unit vectors and orthogonal, this circle can be expressed as follows:
>
> p = c + r*(cos(t)*a + sin(t)*b); % Point p traces out the circle in 3D
>
> More generally if a and b are any two non-parallel vectors, the circle can be expressed as:
>
> u = a/norm(a); % u is normalization of vector a
> v = cross(cross(a,b),a); % v is parallel to the plane and orthog. to u
> v = v/norm(v); % Normalize vector v
> p = c + r*(cos(t)*u + sin(t)*v); % Point p traces out the circle in 3D
>
> In either case, as parameter t varies from 0 to 2*pi, p starts at a, rotates past b, and on around again in a full circle to a at t = 2*pi.
>
> The assumption is made that a and b are not parallel. Otherwise the circle is not uniquely determined.
>
> Roger Stafford

Subject: plane equation with a radius

From: Roger Stafford

Date: 16 Mar, 2010 17:20:21

Message: 4 of 10

"Junghyun " <wkhdntnkpst@yahoo.com> wrote in message <hnni13$rja$1@fred.mathworks.com>...
> Hi, Roger,
> Thank you so much!
> Your speculation was absolutely correct.
>
> a and b are unit vectors and not parallel but orthogonal.
> Can I use either way for the case?
> ........
------------
  Yes, either way will work for your unit orthogonal vectors.

Roger Stafford

Subject: plane equation with a radius

From: Junghyun

Date: 14 May, 2010 04:20:20

Message: 5 of 10

Hi, Roger

Can I ask another question?
How can I define a plane equation just given 2 eigen-vectors (in 3D space) and a center point (also in a 3D space)?

Thank you.
Junghyun



"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <hnoekl$a3e$1@fred.mathworks.com>...
> "Junghyun " <wkhdntnkpst@yahoo.com> wrote in message <hnni13$rja$1@fred.mathworks.com>...
> > Hi, Roger,
> > Thank you so much!
> > Your speculation was absolutely correct.
> >
> > a and b are unit vectors and not parallel but orthogonal.
> > Can I use either way for the case?
> > ........
> ------------
> Yes, either way will work for your unit orthogonal vectors.
>
> Roger Stafford

Subject: plane equation with a radius

From: Roger Stafford

Date: 14 May, 2010 04:49:04

Message: 6 of 10

"Junghyun " <wkhdntnkpst@yahoo.com> wrote in message <hsij24$dk9$1@fred.mathworks.com>...
> Hi, Roger
>
> Can I ask another question?
> How can I define a plane equation just given 2 eigen-vectors (in 3D space) and a center point (also in a 3D space)?
>
> Thank you.
> Junghyun

  If the two eigenvectors are u and v, then w = cross(u,v) is a vector orthogonal to each of these. A plane containing u and v is orthogonal to w. Therefore the equation of such a plane that also contains a given (center) point c is:

 wx*x + wy*y + wz*z = w1*cx + w2*cy + w3*cz

where (wx,wy,wz) are the elements of w and (cx,cy,cz) are the coordinates of the point.

Roger Stafford

Subject: plane equation with a radius

From: Junghyun

Date: 11 Jul, 2010 02:57:04

Message: 7 of 10

Hi,
Can I ask another question?

If a vector can be obtained from the 2 points, how can I define a circle which lies on a plane perpendicular to the given vector with a circle's center point c and the radius r.
 

Thank you.
Junghyun
 

Subject: plane equation with a radius

From: Roger Stafford

Date: 11 Jul, 2010 06:35:05

Message: 8 of 10

"Junghyun " <wkhdntnkpst@yahoo.com> wrote in message <i1bbu0$q4v$1@fred.mathworks.com>...
> Hi,
> Can I ask another question?
>
> If a vector can be obtained from the 2 points, how can I define a circle which lies on a plane perpendicular to the given vector with a circle's center point c and the radius r.
>
> Thank you.
> Junghyun
- - - - - - - - - -
  You want an equation of a circle with center at c, radius r, and lying in a plane orthogonal to the line between points a and b?

  To do this parametrically as in my first posting May 15, I need a way to choose some starting point on the circle. For this purpose I'll assume that point c does not lie on the line through a and b. Then do:

 u = cross(c-a,b-a);
 u = u/norm(u);
 v = cross(b-a,u);
 v = v/norm(v);
 p = c + r*(cos(t)*u + sin(t)*v);

As parameter t varies from 0 to 2*pi, p traces a circle of radius r about the center c.

  If c lies on the line but the line does not go through the origin, use

 u = cross(c,b-a);

in the first line of code with the other lines the same.

  If points a, b, c, and the origin are all colinear, then choose whichever coordinate axis, call it d, is not parallel to b-a and do

 u = cross(d,b-a);

for that first line of code. However you do it, choose some vector d which is not parallel to b-a so that u = cross(d,b-a) is nonzero for that first line of code.

Roger Stafford

Subject: plane equation with a radius

From: us

Date: 11 Jul, 2010 09:42:05

Message: 9 of 10

"Junghyun " <wkhdntnkpst@yahoo.com> wrote in message <i1bbu0$q4v$1@fred.mathworks.com>...
> Hi,
> Can I ask another question?
>
> If a vector can be obtained from the 2 points, how can I define a circle which lies on a plane perpendicular to the given vector with a circle's center point c and the radius r.
>
>
> Thank you.
> Junghyun
>

this NG deals with ML language problems...
read a book or your notes...

us

Subject: plane equation with a radius

From: Junghyun

Date: 11 Jul, 2010 23:31:06

Message: 10 of 10

Roger,

Thank you so much!!
It's so helpful.

Junghyun

Tags for this Thread

No tags are associated with 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