Path: news.mathworks.com!not-for-mail From: <HIDDEN> Newsgroups: comp.soft-sys.matlab Subject: Re: plane equation with a radius Date: Sun, 11 Jul 2010 06:35:05 +0000 (UTC) Organization: The MathWorks, Inc. Lines: 34 Message-ID: <i1bomp$625$1@fred.mathworks.com> References: <hnl3gl$2lm$1@fred.mathworks.com> <hnluqd$bb4$1@fred.mathworks.com> <hnni13$rja$1@fred.mathworks.com> <hnoekl$a3e$1@fred.mathworks.com> <hsij24$dk9$1@fred.mathworks.com> <hsiko0$2dg$1@fred.mathworks.com> <i1bbu0$q4v$1@fred.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: webapp-05-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1278830105 6213 172.30.248.35 (11 Jul 2010 06:35:05 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Sun, 11 Jul 2010 06:35:05 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1187260 Xref: news.mathworks.com comp.soft-sys.matlab:652130 "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