```Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: plane equation with a radius
Date: Mon, 15 Mar 2010 18:38:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 27
Message-ID: <hnluqd\$bb4\$1@fred.mathworks.com>
References: <hnl3gl\$2lm\$1@fred.mathworks.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1268678285 11620 172.30.248.38 (15 Mar 2010 18:38:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 15 Mar 2010 18:38:05 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:616995

"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
```