From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: a circle in 3D
Date: Mon, 18 Jul 2011 22:44:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 12
Message-ID: <j02cvp$lq9$>
References: <j022js$mr5$> <j02685$4hm$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1311029049 22345 (18 Jul 2011 22:44:09 GMT)
NNTP-Posting-Date: Mon, 18 Jul 2011 22:44:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:736669

"Roger Stafford" wrote in message <j02685$4hm$>...
> .......
>   I will give a method in terms of vector analysis and you can translate that into matlab code.  Suppose u is a unit vector pointing from the center toward the point of tangency and v a unit vector normal to the osculating plane.  Then w = cross(u,v) will be a unit vector orthogonal to u and v.  Let c be the center point.  Then all points P along the circle can be generated by:
>   P = c + r*(sin(theta)*u + cos(theta)*w);
> for an angle theta which ranges from 0 to 2*pi and r the circle's radius.
> .......
- - - - - - - - -
  There is an easier way of thinking about your problem than the one I gave earlier.  The first derivatives of the parametric equations that determine your space curve after being normalized to a unit vector tangent to the curve at the given point, give you the vector w I referred to.  The vector u is determined from the second derivatives in the process of determining the location of the center of curvature and the radius.  It is unnecessary to deal with the normal, v, to the osculating plane for generating the circle.

Roger Stafford