"Rahul Uk" <rauluk23mj@gmail.com> wrote in message
<g0r1rp$cr2$1@fred.mathworks.com>...
> How to find the center, radius of a circle(3D) given 3
> points say (a,b,c),(a1,b1,c1),(a2,b2,c2)???
Considering that this is homework, it might be useful to
post what you have already tried. This way we can help you
learn rather than just hand you answers.
"helper " <spamless@nospam.com> wrote in message
<g0r4t9$59p$1@fred.mathworks.com>...
> "Rahul Uk" <rauluk23mj@gmail.com> wrote in message
> <g0r1rp$cr2$1@fred.mathworks.com>...
> > How to find the center, radius of a circle(3D) given 3
> > points say (a,b,c),(a1,b1,c1),(a2,b2,c2)???
>
> Considering that this is homework, it might be useful to
> post what you have already tried. This way we can help you
> learn rather than just hand you answers.
>
>
What I thought of doing is to transform the axis in such a
way that the z axis becomes perpendicular to the new axis
and we are able to use the plane so obtained to draw the circle.
"Rahul Uk" <rauluk23mj@gmail.com> wrote in message
<g0r1rp$cr2$1@fred.mathworks.com>...
> How to find the center, radius of a circle(3D) given 3
> points say (a,b,c),(a1,b1,c1),(a2,b2,c2)???
Hai,
The problem cant be solved with 3 points, but for
given 4 points in 3 dimensional space [(x1,y1,z1) (x2,y2,z2)
(x3,y3,z3) (x4,y4,z4)] the equation of the sphere with these
points on the surface can be calculated by solving the
following determinant.
"Ashwini Deshpande" <vd.ashwini@mathworks.com> wrote in
message <g0r6ut$lkg$1@fred.mathworks.com>...
> "Rahul Uk" <rauluk23mj@gmail.com> wrote in message
> <g0r1rp$cr2$1@fred.mathworks.com>...
> > How to find the center, radius of a circle(3D) given 3
> > points say (a,b,c),(a1,b1,c1),(a2,b2,c2)???
>
> Hai,
>
> The problem cant be solved with 3 points, but for
> given 4 points in 3 dimensional space [(x1,y1,z1) (x2,y2,z2)
> (x3,y3,z3) (x4,y4,z4)] the equation of the sphere with these
> points on the surface can be calculated by solving the
> following determinant.
>
> M = [ x^2 + y^2 + z^2 , x , y , z , 1;
> x1^2 + y1^2 + z1^2 , x1 , y1 , z1 , 1;
> x2^2 + y2^2 + z2^2 , x2 , y2 , z2 , 1;
> x3^2 + y3^2 + z3^2 , x3 , y3 , z3 , 1;
> x4^2 + y4^2 + z4^2 , x4 , y4 , z4 , 1; ]
>
> det(M) = 0;
>
> If u equate the determinant of the above matrix, u will get
> both radius and center point co-ordinates.
>
> Note:
> 1. No three combinations of the 4 points can be colinear.
> 2. All 4 points cannot lie on the same plane (coplanar).
>
> Hope it helps,
> Ashwini
>
What I am interested in knowing is about something called 3
dimensional Circle.
The equation, given 3 points.
> What I thought of doing is to transform the axis in such a
> way that the z axis becomes perpendicular to the new axis
> and we are able to use the plane so obtained to draw the
circle.
That will work, but it is unnecessary. Just realize that
all 3 points must be the same distance from the center.
There will only be one point that fits this criteria. The
3 known points along with the 3 dimensions will give you 3
equations on the 3 variables (x,y,z value of the center).
Once you have have the center, determining the radius will
be easy.
"helper " <spamless@nospam.com> wrote in message
<g0r7su$27a$1@fred.mathworks.com>...
> > What I thought of doing is to transform the axis in such a
> > way that the z axis becomes perpendicular to the new axis
> > and we are able to use the plane so obtained to draw the
> circle.
>
> That will work, but it is unnecessary. Just realize that
> all 3 points must be the same distance from the center.
> There will only be one point that fits this criteria. The
> 3 known points along with the 3 dimensions will give you 3
> equations on the 3 variables (x,y,z value of the center).
> Once you have have the center, determining the radius will
> be easy.
>
> Good luck!
>
But I find the problem in plotting it.In 3 D matlab plots a
sphere given radius and center.How to get a circle??
"Rahul Uk" <rauluk23mj@gmail.com> wrote in message
<g0r8dq$61q$1@fred.mathworks.com>...
> "helper " <spamless@nospam.com> wrote in message
> <g0r7su$27a$1@fred.mathworks.com>...
> > > What I thought of doing is to transform the axis in
such a
> > > way that the z axis becomes perpendicular to the new
axis
> > > and we are able to use the plane so obtained to draw
the
> > circle.
> >
> > That will work, but it is unnecessary. Just realize
that
> > all 3 points must be the same distance from the
center.
> > There will only be one point that fits this criteria.
The
> > 3 known points along with the 3 dimensions will give
you 3
> > equations on the 3 variables (x,y,z value of the
center).
> > Once you have have the center, determining the radius
will
> > be easy.
> >
> > Good luck!
> >
> But I find the problem in plotting it.In 3 D matlab plots
a
> sphere given radius and center.How to get a circle??
"helper " <spamless@nospam.com> wrote in message
<g0r8ul$ai3$1@fred.mathworks.com>...
> "Rahul Uk" <rauluk23mj@gmail.com> wrote in message
> <g0r8dq$61q$1@fred.mathworks.com>...
> > "helper " <spamless@nospam.com> wrote in message
> > <g0r7su$27a$1@fred.mathworks.com>...
> > > > What I thought of doing is to transform the axis in
> such a
> > > > way that the z axis becomes perpendicular to the new
> axis
> > > > and we are able to use the plane so obtained to draw
> the
> > > circle.
> > >
> > > That will work, but it is unnecessary. Just realize
> that
> > > all 3 points must be the same distance from the
> center.
> > > There will only be one point that fits this criteria.
> The
> > > 3 known points along with the 3 dimensions will give
> you 3
> > > equations on the 3 variables (x,y,z value of the
> center).
> > > Once you have have the center, determining the radius
> will
> > > be easy.
> > >
> > > Good luck!
> > >
> > But I find the problem in plotting it.In 3 D matlab plots
> a
> > sphere given radius and center.How to get a circle??
>
> Use the PLOT3 function to plot lines in 3-space.
There may be infinite number of circles you can draw with three points in three dimensional space. The question is then which circle to choose? The following website may help you in understanding the topic. http://www.geocities.com/kiranisingh/center.html
"Rahul Uk" <rauluk23mj@gmail.com> wrote in message <g0r1rp$cr2
$1@fred.mathworks.com>...
> How to find the center, radius of a circle(3D) given 3
> points say (a,b,c),(a1,b1,c1),(a2,b2,c2)???
-----------------------------
Rahul, you are right. Provided they are not colinear, it takes just three, not
four, points to uniquely define a circle, even in three dimensions. However,
in three dimensions you will not find the circle's center simply by finding
points that are equidistant from those three points. Any point along a certain
infinitely long line would have that property.
Without giving you the solution explicitly, I will tell you the approach I would
take to find it. Any three non-colinear points determine a plane, so first you
should endeavor to find the equation of that plane. It will be a single linear
equation in x, y, and z. If A, B, and C are the given points, one method of
finding this equation is to take the cross product of vector AB with vector AC,
which will define the direction orthogonal to the plane in question. This,
combined with the fact that the plane must contain any of the three points,
suffices to find its equation.
Next you find the plane which bisects line segment AB. This is obtained by
equating the square of the distance from a point (x,y,z) to A with that from B.
When simplified this will also be a linear equation. Finally do the same thing
with segment AC and you then have the equation of the bisector of AC.
These three planes intersect in a unique point which will be the center of the
desired circle, so if you find their equations' simultaneous solution, you have
the center and are well on your way to a solution of your problem.
> Rahul, you are right. Provided they are not colinear,
it takes just three, not
> four, points to uniquely define a circle, even in three
dimensions. However,
> in three dimensions you will not find the circle's center
simply by finding
> points that are equidistant from those three points. Any
point along a certain
> infinitely long line would have that property.
Yumnam Kirani Singh <kirani.singh@gmail.com> wrote in message
<14663209.1211181283308.JavaMail.jakarta@nitrogen.mathforum.org>...
> There may be infinite number of circles you can draw with three points in
three dimensional space. The question is then which circle to choose? The
following website may help you in understanding the topic.
> http://www.geocities.com/kiranisingh/center.html
---------
No, I disagree with that, Yumnam. There are infinitely many points which are
equidistant from the three points, but there is only one circle through them,
assuming they are non-colinear. The points uniquely determine a plane and the
circle must lie in that plane. There can be only one such circle.
"Rahul Uk" <rauluk23mj@gmail.com> wrote in message
<g0rdu2$mtf$1@fred.mathworks.com>...
> Hi Roger,
>
> I am able to get the center and radius thanks to your
> method.But I am not able to plot the circle.
I would like to plot the circle in the plane so obtained.
I wonder to read your comments. Isn't your comment self contrasting? don't you ever think thant any three equidistant points form a circle? You mention infinate number of such points means nothing but infinite number of circles and infinite number of plaines. Am I seriously wrong?
Yumnam Kirani Singh <kirani.singh@gmail.com> wrote in message
<29420242.1211187243656.JavaMail.jakarta@nitrogen.mathforum.org>...
> I wonder to read your comments. Isn't your comment self contrasting? don't
you ever think thant any three equidistant points form a circle? You mention
infinate number of such points means nothing but infinite number of circles
and infinite number of plaines. Am I seriously wrong?
Excuse me, but I assume you are commenting
to Roger. (You should quote the person you
are referring to, otherwise an ambiguity occurs.)
You stated this:
"There may be infinite number of circles you can draw with three points in
three dimensional space. The question is then which circle to choose? The
following website may help you in understanding the topic. http://www.geocities.com/kiranisingh/center.html"
But your statement is incorrect, and if your
website states differently, then it is incorrect
too.
Three general distinct and non-collinear
points determine a unique plane in a 3-d
space. Surely you appreciate this fact.
In that plane, there is a unique circle that
will pass through those three points, again
assuming non-collinearity of the points.
These three points must therefore determine
a unique circle in the space. Why? Any circle
that passes through the three points in R^3
must lie in a plane in that space. Since that
plane must be the same as the one that
contains those three points, then the circle
is itself unique.
If you see the messagebox tree, then definitely, my answer as to Roger. I don't know how does it leads you to confusion. If you specify a plain consisting of three dimensional points, then it is nothing but a two dimensional problems with three cor-ordinates. Any three two dimesional co-ordinates specify an unique circle.
Yumnam Kirani Singh <kirani.singh@gmail.com> wrote in message
<29420242.1211187243656.JavaMail.jakarta@nitrogen.mathforum.org>...
> I wonder to read your comments. Isn't your comment self contrasting?
don't you ever think thant any three equidistant points form a circle? You
mention infinate number of such points means nothing but infinite number of
circles and infinite number of plaines. Am I seriously wrong?
----------
Hello Yumnam,
My remarks were not self-contradictory. There are indeed infinitely many
points which are equidistant from three given points in three-dimensional
space, but only one of them can be considered the center of a circle through
them, namely the one that lies in their plane. In three-dimensional space
there is a distinction between the concept of a circle and that of a sphere. A
circle is required to lie entirely in a plane, whereas a sphere is not. Therefore,
the fact that a point is equidistant from three given points does not prove
that that point is the center of a circle through those three points; it also
must lie in their plane.
I looked up the website you referenced, and in it your statement is exactly
right. You say, "We can draw infinite number of circles, which can pass
through one or two given points. But if the number of points given is three,
then we can draw only one circle, which will pass through the three given
points. Also, we can draw many spheres, which will pass through any three or
less number of given points. But we can draw only one sphere, which will
pass through any four given points in 3-dimension."
However, when you stated in this thread, as you did, "There may be infinite
number of circles you can draw with three points in three dimensional space,"
that was definitely incorrect. It contradicts the definition of a circle which
restricts it to a plane.
"Rahul Uk" <rauluk23mj@gmail.com> wrote in message <g0rfij$eho
$1@fred.mathworks.com>...
> "Rahul Uk" <rauluk23mj@gmail.com> wrote in message
> <g0rdu2$mtf$1@fred.mathworks.com>...
> > Hi Roger,
> >
> > I am able to get the center and radius thanks to your
> > method.But I am not able to plot the circle.
>
> I would like to plot the circle in the plane so obtained.
----------------
Rahul, as to actually making the circular plot, I will give you an additional bit
of help. What you need is a parametric representation of the circle. If you
possess two orthogonal vectors pointing from the circle's center to its
circumference, you can express any other vector pointing from the center to
that circumference as one of these vectors times the cosine of an angle plus
the other vector times the sine of the angle. This angle, as it varies from 0 to
2*pi, constitutes your parameter.
You already have one of these vectors, namely a vector from the center, (call
it P) which you have found, to the point A (referring to the terminology in my
previous post.) You also have a vector orthogonal to the circle's plane from
the cross product of AB with AC. Suppose you normalize that orthogonal
vector by dividing it by its norm. Then the cross product of that with PA gives
you another vector orthogonal to PA and also extending from P to a point on
the circle's circumference. Hence this is your second needed vector.
If you do a 'linspace' on the above angle, you should be able to use 'plot3',
as already mentioned, to then draw the circle. End of hint.
In article <8057003.1211195750855.JavaMail.jakarta@nitrogen.mathforum.org>, Yumnam Kirani Singh <kirani.singh@gmail.com> wrote:
> If you see the messagebox tree, then definitely, my answer as to Roger.
No, what you do not realize is that not
everybody uses the same newsgroup browser
as do you. Some such browsers do not
provide that tree structure. So you should
use referential quotes to provide that
information.
John
--
The best material model of a cat is another, or preferably the same, cat.
A. Rosenblueth, Philosophy of Science, 1945
Those who can't laugh at themselves leave the job to others.
Anonymous
"Rahul Uk" <rauluk23mj@gmail.com> wrote in message <g13gth$kct
$1@fred.mathworks.com>...
> HI..
>
> the circle is not exactly drawn....through the 3 points.I
> used the approach told by Roger.
>
> Please Help
------------
Hello Rahul,
If you can show us what you've done, perhaps one of us can determine why the
circle you've drawn does not go exactly through the three points. Round off
error of course will cause a very small error but that should only amount to one
part in 10^14 or thereabouts. I realize you can't show us your plotting but you
could show the code that leads up to it.
Dr anubhav <poojanubhav2007@gmail.com> wrote in message
<27634102.1211469163224.JavaMail.jakarta@nitrogen.mathforum.org>...
> y find centroid of triangle.
> then
> Solve
---------
The centroid of the three points is not the same as the center of the circle that
runs through them That would hold true only if the three points formed the
vertices of an equilateral triangle.
function B = getcoord(A,L,Phi)
L=L';
L=L(1:3);
L0=L/norm(L);
B=A*cos(Phi)+cross(L0,A)*sin(Phi);
return
This is the function I used to rotate my vector.[Method told
by Roger]
A is the vector if C is the center of the circle and M,N,O
are the 3 points then A is vector CM.
L is the 3 coordinates of the plane where I want the circle.
Phi is the parameter which I change from 0 to 2*pi to draw
the circle.
for q=0:pi/1000:2*pi
p1=getcoord(p,f,q);
plot3(p1(1),p1(2),p1(3),'r*');
hold on
end
this is the loop i used to plot the circle.
The problem is it is plotting the circle with centre as
origin and not C.
"Rahul Uk" <rauluk23mj@gmail.com> wrote in message <g15hrh$iik
$1@fred.mathworks.com>...
> Hi,
>
> function B = getcoord(A,L,Phi)
> L=L';
> L=L(1:3);
> L0=L/norm(L);
> B=A*cos(Phi)+cross(L0,A)*sin(Phi);
> return
>
> This is the function I used to rotate my vector.[Method told
> by Roger]
> A is the vector if C is the center of the circle and M,N,O
> are the 3 points then A is vector CM.
> L is the 3 coordinates of the plane where I want the circle.
> Phi is the parameter which I change from 0 to 2*pi to draw
> the circle.
>
> for q=0:pi/1000:2*pi
> p1=getcoord(p,f,q);
> plot3(p1(1),p1(2),p1(3),'r*');
> hold on
> end
> this is the loop i used to plot the circle.
>
> The problem is it is plotting the circle with centre as
> origin and not C.
---------
Apparently L0 is the normalized vector orthogonal to the plane of the
triangle MNO. What's missing here is the offset to the center of the circle.
You need to add vector C to B which points from the origin to the circle's
center.
If you recall, I said, "If you possess two orthogonal vectors pointing from the
circle's center to its circumference, you can express any other vector pointing
from the center to that circumference as one of these vectors times the
cosine of an angle plus the other vector times the sine of the angle. This
angle, as it varies from 0 to 2*pi, constitutes your parameter."
The key part of this is the phrase, ".... any other vector pointing from the
center to that circumference ..." To get a vector pointing from the origin to
the circumference, you need to add the vector pointing from the origin to the
center.
Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central. Read the complete Disclaimer prior to use.