From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Plotting circle tangent to a curve in 3d
Date: Fri, 2 Mar 2012 01:41:12 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 8
Message-ID: <jip8fo$p8k$>
References: <jio009$84g$> <jiomnj$t63$> <jiosj4$k5c$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1330652472 25876 (2 Mar 2012 01:41:12 GMT)
NNTP-Posting-Date: Fri, 2 Mar 2012 01:41:12 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:759541

"Edward Tan" <> wrote in message <jiosj4$k5c$>...
>     Thank you very much for your help. It works and thank you for the detail explanation.
> "Roger Stafford" wrote in message <jiomnj$t63$>...
> >  N = dot(P10,P10)*P20-dot(P20,P20)*P10; % <-- Approx. tangent direction
- - - - - - - - -
  I should have explained what sort of approximation to the curve tangent direction the vector N is.  It points along the line tangent to the circle at P0 which passes through the three points P1, P0, and P2.  In case these are colinear and no circle is possible it is just the direction along their common line.  It is assumed none of the three points coincide.

Roger Stafford