How to draw a circle (sphere) passing through four points?












5















I am trying to draw a circle (sphere) passing through four points B, C, E, F like this picture enter image description here



I tried with tikz-3dplot and my code



documentclass[border=3mm,12pt]{standalone}
usepackage{fouriernc}
usepackage{tikz,tikz-3dplot}
usepackage{tkz-euclide}
usetkzobj{all}

usetikzlibrary{intersections,calc,backgrounds}

begin{document}

tdplotsetmaincoords{70}{110}
%tdplotsetmaincoords{80}{100}
begin{tikzpicture}[tdplot_main_coords,scale=1.5]
pgfmathsetmacroa{3}
pgfmathsetmacrob{4}
pgfmathsetmacroh{5}

% definitions
path
coordinate(A) at (0,0,0)
coordinate (B) at (a,0,0)
coordinate (C) at (0,b,0)
coordinate (S) at (0,0,h)
coordinate (E) at ({a*h^2/(a*a + h*h)},0,{(a*a*h)/(a*a + h*h)})
coordinate (F) at (0,{(b*h*h)/(b*b + h*h)},{(b*b*h)/(b*b + h*h)});
draw[dashed,thick]
(A) -- (B) (A) -- (C) (A) -- (E) (S)--(A) (F)--(A);
draw[thick]
(S) -- (B) -- (C) -- cycle;
draw[thick]
(F) -- (B) (C)--(E) (F)--(E);
tkzMarkRightAngle(S,E,A);
tkzMarkRightAngle(S,F,A);

foreach point/position in {A/below,B/left,C/below,S/above,E/left,F/above}
{
fill (point) circle (.8pt);
node[position=3pt] at (point) {$point$};
}

end{tikzpicture}
end{document}


and got



enter image description here



How can I draw a circle (sphere) passing through four points B, C, E, F?










share|improve this question


















  • 2





    A circle is already uniquely fixed by 3 (noncollinear) points. There exist answers that show you how to find such a circle. E.g. tex.stackexchange.com/questions/461161/… (Sorry for advertising;-)

    – marmot
    4 hours ago













  • @marmot Is it true in 3D?

    – minhthien_2016
    3 hours ago






  • 1





    I believe that an orthographic projection of a sphere is a circle. The subtle point is whether the projected circle runs through the points you indicate, something that I cannot decide without more information on how the sphere is determined.

    – marmot
    3 hours ago











  • The sphere has centre is midpoint of the segment EC.

    – minhthien_2016
    3 hours ago











  • @marmot The sphere has centre is midpoint of the segment BC, not EC. I am trying your hint.

    – minhthien_2016
    3 hours ago
















5















I am trying to draw a circle (sphere) passing through four points B, C, E, F like this picture enter image description here



I tried with tikz-3dplot and my code



documentclass[border=3mm,12pt]{standalone}
usepackage{fouriernc}
usepackage{tikz,tikz-3dplot}
usepackage{tkz-euclide}
usetkzobj{all}

usetikzlibrary{intersections,calc,backgrounds}

begin{document}

tdplotsetmaincoords{70}{110}
%tdplotsetmaincoords{80}{100}
begin{tikzpicture}[tdplot_main_coords,scale=1.5]
pgfmathsetmacroa{3}
pgfmathsetmacrob{4}
pgfmathsetmacroh{5}

% definitions
path
coordinate(A) at (0,0,0)
coordinate (B) at (a,0,0)
coordinate (C) at (0,b,0)
coordinate (S) at (0,0,h)
coordinate (E) at ({a*h^2/(a*a + h*h)},0,{(a*a*h)/(a*a + h*h)})
coordinate (F) at (0,{(b*h*h)/(b*b + h*h)},{(b*b*h)/(b*b + h*h)});
draw[dashed,thick]
(A) -- (B) (A) -- (C) (A) -- (E) (S)--(A) (F)--(A);
draw[thick]
(S) -- (B) -- (C) -- cycle;
draw[thick]
(F) -- (B) (C)--(E) (F)--(E);
tkzMarkRightAngle(S,E,A);
tkzMarkRightAngle(S,F,A);

foreach point/position in {A/below,B/left,C/below,S/above,E/left,F/above}
{
fill (point) circle (.8pt);
node[position=3pt] at (point) {$point$};
}

end{tikzpicture}
end{document}


and got



enter image description here



How can I draw a circle (sphere) passing through four points B, C, E, F?










share|improve this question


















  • 2





    A circle is already uniquely fixed by 3 (noncollinear) points. There exist answers that show you how to find such a circle. E.g. tex.stackexchange.com/questions/461161/… (Sorry for advertising;-)

    – marmot
    4 hours ago













  • @marmot Is it true in 3D?

    – minhthien_2016
    3 hours ago






  • 1





    I believe that an orthographic projection of a sphere is a circle. The subtle point is whether the projected circle runs through the points you indicate, something that I cannot decide without more information on how the sphere is determined.

    – marmot
    3 hours ago











  • The sphere has centre is midpoint of the segment EC.

    – minhthien_2016
    3 hours ago











  • @marmot The sphere has centre is midpoint of the segment BC, not EC. I am trying your hint.

    – minhthien_2016
    3 hours ago














5












5








5








I am trying to draw a circle (sphere) passing through four points B, C, E, F like this picture enter image description here



I tried with tikz-3dplot and my code



documentclass[border=3mm,12pt]{standalone}
usepackage{fouriernc}
usepackage{tikz,tikz-3dplot}
usepackage{tkz-euclide}
usetkzobj{all}

usetikzlibrary{intersections,calc,backgrounds}

begin{document}

tdplotsetmaincoords{70}{110}
%tdplotsetmaincoords{80}{100}
begin{tikzpicture}[tdplot_main_coords,scale=1.5]
pgfmathsetmacroa{3}
pgfmathsetmacrob{4}
pgfmathsetmacroh{5}

% definitions
path
coordinate(A) at (0,0,0)
coordinate (B) at (a,0,0)
coordinate (C) at (0,b,0)
coordinate (S) at (0,0,h)
coordinate (E) at ({a*h^2/(a*a + h*h)},0,{(a*a*h)/(a*a + h*h)})
coordinate (F) at (0,{(b*h*h)/(b*b + h*h)},{(b*b*h)/(b*b + h*h)});
draw[dashed,thick]
(A) -- (B) (A) -- (C) (A) -- (E) (S)--(A) (F)--(A);
draw[thick]
(S) -- (B) -- (C) -- cycle;
draw[thick]
(F) -- (B) (C)--(E) (F)--(E);
tkzMarkRightAngle(S,E,A);
tkzMarkRightAngle(S,F,A);

foreach point/position in {A/below,B/left,C/below,S/above,E/left,F/above}
{
fill (point) circle (.8pt);
node[position=3pt] at (point) {$point$};
}

end{tikzpicture}
end{document}


and got



enter image description here



How can I draw a circle (sphere) passing through four points B, C, E, F?










share|improve this question














I am trying to draw a circle (sphere) passing through four points B, C, E, F like this picture enter image description here



I tried with tikz-3dplot and my code



documentclass[border=3mm,12pt]{standalone}
usepackage{fouriernc}
usepackage{tikz,tikz-3dplot}
usepackage{tkz-euclide}
usetkzobj{all}

usetikzlibrary{intersections,calc,backgrounds}

begin{document}

tdplotsetmaincoords{70}{110}
%tdplotsetmaincoords{80}{100}
begin{tikzpicture}[tdplot_main_coords,scale=1.5]
pgfmathsetmacroa{3}
pgfmathsetmacrob{4}
pgfmathsetmacroh{5}

% definitions
path
coordinate(A) at (0,0,0)
coordinate (B) at (a,0,0)
coordinate (C) at (0,b,0)
coordinate (S) at (0,0,h)
coordinate (E) at ({a*h^2/(a*a + h*h)},0,{(a*a*h)/(a*a + h*h)})
coordinate (F) at (0,{(b*h*h)/(b*b + h*h)},{(b*b*h)/(b*b + h*h)});
draw[dashed,thick]
(A) -- (B) (A) -- (C) (A) -- (E) (S)--(A) (F)--(A);
draw[thick]
(S) -- (B) -- (C) -- cycle;
draw[thick]
(F) -- (B) (C)--(E) (F)--(E);
tkzMarkRightAngle(S,E,A);
tkzMarkRightAngle(S,F,A);

foreach point/position in {A/below,B/left,C/below,S/above,E/left,F/above}
{
fill (point) circle (.8pt);
node[position=3pt] at (point) {$point$};
}

end{tikzpicture}
end{document}


and got



enter image description here



How can I draw a circle (sphere) passing through four points B, C, E, F?







3d tikz-3dplot






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 4 hours ago









minhthien_2016minhthien_2016

1,124815




1,124815








  • 2





    A circle is already uniquely fixed by 3 (noncollinear) points. There exist answers that show you how to find such a circle. E.g. tex.stackexchange.com/questions/461161/… (Sorry for advertising;-)

    – marmot
    4 hours ago













  • @marmot Is it true in 3D?

    – minhthien_2016
    3 hours ago






  • 1





    I believe that an orthographic projection of a sphere is a circle. The subtle point is whether the projected circle runs through the points you indicate, something that I cannot decide without more information on how the sphere is determined.

    – marmot
    3 hours ago











  • The sphere has centre is midpoint of the segment EC.

    – minhthien_2016
    3 hours ago











  • @marmot The sphere has centre is midpoint of the segment BC, not EC. I am trying your hint.

    – minhthien_2016
    3 hours ago














  • 2





    A circle is already uniquely fixed by 3 (noncollinear) points. There exist answers that show you how to find such a circle. E.g. tex.stackexchange.com/questions/461161/… (Sorry for advertising;-)

    – marmot
    4 hours ago













  • @marmot Is it true in 3D?

    – minhthien_2016
    3 hours ago






  • 1





    I believe that an orthographic projection of a sphere is a circle. The subtle point is whether the projected circle runs through the points you indicate, something that I cannot decide without more information on how the sphere is determined.

    – marmot
    3 hours ago











  • The sphere has centre is midpoint of the segment EC.

    – minhthien_2016
    3 hours ago











  • @marmot The sphere has centre is midpoint of the segment BC, not EC. I am trying your hint.

    – minhthien_2016
    3 hours ago








2




2





A circle is already uniquely fixed by 3 (noncollinear) points. There exist answers that show you how to find such a circle. E.g. tex.stackexchange.com/questions/461161/… (Sorry for advertising;-)

– marmot
4 hours ago







A circle is already uniquely fixed by 3 (noncollinear) points. There exist answers that show you how to find such a circle. E.g. tex.stackexchange.com/questions/461161/… (Sorry for advertising;-)

– marmot
4 hours ago















@marmot Is it true in 3D?

– minhthien_2016
3 hours ago





@marmot Is it true in 3D?

– minhthien_2016
3 hours ago




1




1





I believe that an orthographic projection of a sphere is a circle. The subtle point is whether the projected circle runs through the points you indicate, something that I cannot decide without more information on how the sphere is determined.

– marmot
3 hours ago





I believe that an orthographic projection of a sphere is a circle. The subtle point is whether the projected circle runs through the points you indicate, something that I cannot decide without more information on how the sphere is determined.

– marmot
3 hours ago













The sphere has centre is midpoint of the segment EC.

– minhthien_2016
3 hours ago





The sphere has centre is midpoint of the segment EC.

– minhthien_2016
3 hours ago













@marmot The sphere has centre is midpoint of the segment BC, not EC. I am trying your hint.

– minhthien_2016
3 hours ago





@marmot The sphere has centre is midpoint of the segment BC, not EC. I am trying your hint.

– minhthien_2016
3 hours ago










1 Answer
1






active

oldest

votes


















7














A circle is determined by 3 points. A sphere, of course, needs at least 4 points on its boundary to be determined. However, the projection of the sphere, i.e. the circle, won't necessarily run through the projections of these points.



This shows two ways to construct circles that run through some of the points:




  1. The dotted circle runs through F, E and C. It is fixed by this requirement. As a consequence it misses B by a small amount.

  2. The red dashed circle runs through the midpoint of BC and through these points. It misses F and E by small amounts.




documentclass[border=3mm,12pt]{standalone}
usepackage{fouriernc}
usepackage{tikz,tikz-3dplot}
usepackage{tkz-euclide}
usetkzobj{all}
usetikzlibrary{calc,through}
tikzset{circle through 3 points/.style n args={3}{%
insert path={let p1=($(#1)!0.5!(#2)$),
p2=($(#1)!0.5!(#3)$),
p3=($(#1)!0.5!(#2)!1!-90:(#2)$),
p4=($(#1)!0.5!(#3)!1!90:(#3)$),
p5=(intersection of p1--p3 and p2--p4)
in },
at={(p5)},
circle through= {(#1)}
}}

usetikzlibrary{intersections,calc,backgrounds}

begin{document}

tdplotsetmaincoords{70}{110}
%tdplotsetmaincoords{80}{100}
begin{tikzpicture}[tdplot_main_coords,scale=1.5]
pgfmathsetmacroa{3}
pgfmathsetmacrob{4}
pgfmathsetmacroh{5}

% definitions
path
coordinate(A) at (0,0,0)
coordinate (B) at (a,0,0)
coordinate (C) at (0,b,0)
coordinate (S) at (0,0,h)
coordinate (E) at ({a*h^2/(a*a + h*h)},0,{(a*a*h)/(a*a + h*h)})
coordinate (F) at (0,{(b*h*h)/(b*b + h*h)},{(b*b*h)/(b*b + h*h)});
draw[dashed,thick]
(A) -- (B) (A) -- (C) (A) -- (E) (S)--(A) (F)--(A);
draw[thick]
(S) -- (B) -- (C) -- cycle;
draw[thick]
(F) -- (B) (C)--(E) (F)--(E);
tkzMarkRightAngle(S,E,A);
tkzMarkRightAngle(S,F,A);

foreach point/position in {A/below,B/left,C/below,S/above,E/left,F/above}
{
fill (point) circle (.8pt);
node[position=3pt] at (point) {$point$};
}
node[circle through 3 points={F}{E}{C},draw=blue,dotted]{};
draw[red,dashed]
let p1=($(B)-(C)$), n1={veclen(x1,y1)/2} in ($(B)!0.5!(C)$) circle (n1);
end{tikzpicture}
end{document}


enter image description here



It will be possible to construct the sphere as well. However, as mentioned its boundary may not run through any of the points.



ADDENDUM: In your setup, the four points do not determine a unique sphere because they all lie in a plane. Using Mathematica I was able to express F as a linear combination



 F = x B + y C + z E


where



x = -((b^2*h^2)/(a^2*(b^2 + h^2))) 
y = h^2/(b^2 + h^2)
z = (b^2*(a^2 + h^2))/(a^2*(b^2 + h^2))


So in this setup it is not possible to draw a unique sphere.






share|improve this answer


























  • I think, there is a way to draw the circle passing through 4 points B, E, F, C like my picture.

    – minhthien_2016
    39 mins ago













  • Let O be midpoint of the segment BC. Translation pyramid SABC into vector AM. I got drive.google.com/file/d/1-3ae7DX_E_s1Sit5Kfr0vnS6hPYM9mOT/view

    – minhthien_2016
    4 mins ago











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f470177%2fhow-to-draw-a-circle-sphere-passing-through-four-points%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









7














A circle is determined by 3 points. A sphere, of course, needs at least 4 points on its boundary to be determined. However, the projection of the sphere, i.e. the circle, won't necessarily run through the projections of these points.



This shows two ways to construct circles that run through some of the points:




  1. The dotted circle runs through F, E and C. It is fixed by this requirement. As a consequence it misses B by a small amount.

  2. The red dashed circle runs through the midpoint of BC and through these points. It misses F and E by small amounts.




documentclass[border=3mm,12pt]{standalone}
usepackage{fouriernc}
usepackage{tikz,tikz-3dplot}
usepackage{tkz-euclide}
usetkzobj{all}
usetikzlibrary{calc,through}
tikzset{circle through 3 points/.style n args={3}{%
insert path={let p1=($(#1)!0.5!(#2)$),
p2=($(#1)!0.5!(#3)$),
p3=($(#1)!0.5!(#2)!1!-90:(#2)$),
p4=($(#1)!0.5!(#3)!1!90:(#3)$),
p5=(intersection of p1--p3 and p2--p4)
in },
at={(p5)},
circle through= {(#1)}
}}

usetikzlibrary{intersections,calc,backgrounds}

begin{document}

tdplotsetmaincoords{70}{110}
%tdplotsetmaincoords{80}{100}
begin{tikzpicture}[tdplot_main_coords,scale=1.5]
pgfmathsetmacroa{3}
pgfmathsetmacrob{4}
pgfmathsetmacroh{5}

% definitions
path
coordinate(A) at (0,0,0)
coordinate (B) at (a,0,0)
coordinate (C) at (0,b,0)
coordinate (S) at (0,0,h)
coordinate (E) at ({a*h^2/(a*a + h*h)},0,{(a*a*h)/(a*a + h*h)})
coordinate (F) at (0,{(b*h*h)/(b*b + h*h)},{(b*b*h)/(b*b + h*h)});
draw[dashed,thick]
(A) -- (B) (A) -- (C) (A) -- (E) (S)--(A) (F)--(A);
draw[thick]
(S) -- (B) -- (C) -- cycle;
draw[thick]
(F) -- (B) (C)--(E) (F)--(E);
tkzMarkRightAngle(S,E,A);
tkzMarkRightAngle(S,F,A);

foreach point/position in {A/below,B/left,C/below,S/above,E/left,F/above}
{
fill (point) circle (.8pt);
node[position=3pt] at (point) {$point$};
}
node[circle through 3 points={F}{E}{C},draw=blue,dotted]{};
draw[red,dashed]
let p1=($(B)-(C)$), n1={veclen(x1,y1)/2} in ($(B)!0.5!(C)$) circle (n1);
end{tikzpicture}
end{document}


enter image description here



It will be possible to construct the sphere as well. However, as mentioned its boundary may not run through any of the points.



ADDENDUM: In your setup, the four points do not determine a unique sphere because they all lie in a plane. Using Mathematica I was able to express F as a linear combination



 F = x B + y C + z E


where



x = -((b^2*h^2)/(a^2*(b^2 + h^2))) 
y = h^2/(b^2 + h^2)
z = (b^2*(a^2 + h^2))/(a^2*(b^2 + h^2))


So in this setup it is not possible to draw a unique sphere.






share|improve this answer


























  • I think, there is a way to draw the circle passing through 4 points B, E, F, C like my picture.

    – minhthien_2016
    39 mins ago













  • Let O be midpoint of the segment BC. Translation pyramid SABC into vector AM. I got drive.google.com/file/d/1-3ae7DX_E_s1Sit5Kfr0vnS6hPYM9mOT/view

    – minhthien_2016
    4 mins ago
















7














A circle is determined by 3 points. A sphere, of course, needs at least 4 points on its boundary to be determined. However, the projection of the sphere, i.e. the circle, won't necessarily run through the projections of these points.



This shows two ways to construct circles that run through some of the points:




  1. The dotted circle runs through F, E and C. It is fixed by this requirement. As a consequence it misses B by a small amount.

  2. The red dashed circle runs through the midpoint of BC and through these points. It misses F and E by small amounts.




documentclass[border=3mm,12pt]{standalone}
usepackage{fouriernc}
usepackage{tikz,tikz-3dplot}
usepackage{tkz-euclide}
usetkzobj{all}
usetikzlibrary{calc,through}
tikzset{circle through 3 points/.style n args={3}{%
insert path={let p1=($(#1)!0.5!(#2)$),
p2=($(#1)!0.5!(#3)$),
p3=($(#1)!0.5!(#2)!1!-90:(#2)$),
p4=($(#1)!0.5!(#3)!1!90:(#3)$),
p5=(intersection of p1--p3 and p2--p4)
in },
at={(p5)},
circle through= {(#1)}
}}

usetikzlibrary{intersections,calc,backgrounds}

begin{document}

tdplotsetmaincoords{70}{110}
%tdplotsetmaincoords{80}{100}
begin{tikzpicture}[tdplot_main_coords,scale=1.5]
pgfmathsetmacroa{3}
pgfmathsetmacrob{4}
pgfmathsetmacroh{5}

% definitions
path
coordinate(A) at (0,0,0)
coordinate (B) at (a,0,0)
coordinate (C) at (0,b,0)
coordinate (S) at (0,0,h)
coordinate (E) at ({a*h^2/(a*a + h*h)},0,{(a*a*h)/(a*a + h*h)})
coordinate (F) at (0,{(b*h*h)/(b*b + h*h)},{(b*b*h)/(b*b + h*h)});
draw[dashed,thick]
(A) -- (B) (A) -- (C) (A) -- (E) (S)--(A) (F)--(A);
draw[thick]
(S) -- (B) -- (C) -- cycle;
draw[thick]
(F) -- (B) (C)--(E) (F)--(E);
tkzMarkRightAngle(S,E,A);
tkzMarkRightAngle(S,F,A);

foreach point/position in {A/below,B/left,C/below,S/above,E/left,F/above}
{
fill (point) circle (.8pt);
node[position=3pt] at (point) {$point$};
}
node[circle through 3 points={F}{E}{C},draw=blue,dotted]{};
draw[red,dashed]
let p1=($(B)-(C)$), n1={veclen(x1,y1)/2} in ($(B)!0.5!(C)$) circle (n1);
end{tikzpicture}
end{document}


enter image description here



It will be possible to construct the sphere as well. However, as mentioned its boundary may not run through any of the points.



ADDENDUM: In your setup, the four points do not determine a unique sphere because they all lie in a plane. Using Mathematica I was able to express F as a linear combination



 F = x B + y C + z E


where



x = -((b^2*h^2)/(a^2*(b^2 + h^2))) 
y = h^2/(b^2 + h^2)
z = (b^2*(a^2 + h^2))/(a^2*(b^2 + h^2))


So in this setup it is not possible to draw a unique sphere.






share|improve this answer


























  • I think, there is a way to draw the circle passing through 4 points B, E, F, C like my picture.

    – minhthien_2016
    39 mins ago













  • Let O be midpoint of the segment BC. Translation pyramid SABC into vector AM. I got drive.google.com/file/d/1-3ae7DX_E_s1Sit5Kfr0vnS6hPYM9mOT/view

    – minhthien_2016
    4 mins ago














7












7








7







A circle is determined by 3 points. A sphere, of course, needs at least 4 points on its boundary to be determined. However, the projection of the sphere, i.e. the circle, won't necessarily run through the projections of these points.



This shows two ways to construct circles that run through some of the points:




  1. The dotted circle runs through F, E and C. It is fixed by this requirement. As a consequence it misses B by a small amount.

  2. The red dashed circle runs through the midpoint of BC and through these points. It misses F and E by small amounts.




documentclass[border=3mm,12pt]{standalone}
usepackage{fouriernc}
usepackage{tikz,tikz-3dplot}
usepackage{tkz-euclide}
usetkzobj{all}
usetikzlibrary{calc,through}
tikzset{circle through 3 points/.style n args={3}{%
insert path={let p1=($(#1)!0.5!(#2)$),
p2=($(#1)!0.5!(#3)$),
p3=($(#1)!0.5!(#2)!1!-90:(#2)$),
p4=($(#1)!0.5!(#3)!1!90:(#3)$),
p5=(intersection of p1--p3 and p2--p4)
in },
at={(p5)},
circle through= {(#1)}
}}

usetikzlibrary{intersections,calc,backgrounds}

begin{document}

tdplotsetmaincoords{70}{110}
%tdplotsetmaincoords{80}{100}
begin{tikzpicture}[tdplot_main_coords,scale=1.5]
pgfmathsetmacroa{3}
pgfmathsetmacrob{4}
pgfmathsetmacroh{5}

% definitions
path
coordinate(A) at (0,0,0)
coordinate (B) at (a,0,0)
coordinate (C) at (0,b,0)
coordinate (S) at (0,0,h)
coordinate (E) at ({a*h^2/(a*a + h*h)},0,{(a*a*h)/(a*a + h*h)})
coordinate (F) at (0,{(b*h*h)/(b*b + h*h)},{(b*b*h)/(b*b + h*h)});
draw[dashed,thick]
(A) -- (B) (A) -- (C) (A) -- (E) (S)--(A) (F)--(A);
draw[thick]
(S) -- (B) -- (C) -- cycle;
draw[thick]
(F) -- (B) (C)--(E) (F)--(E);
tkzMarkRightAngle(S,E,A);
tkzMarkRightAngle(S,F,A);

foreach point/position in {A/below,B/left,C/below,S/above,E/left,F/above}
{
fill (point) circle (.8pt);
node[position=3pt] at (point) {$point$};
}
node[circle through 3 points={F}{E}{C},draw=blue,dotted]{};
draw[red,dashed]
let p1=($(B)-(C)$), n1={veclen(x1,y1)/2} in ($(B)!0.5!(C)$) circle (n1);
end{tikzpicture}
end{document}


enter image description here



It will be possible to construct the sphere as well. However, as mentioned its boundary may not run through any of the points.



ADDENDUM: In your setup, the four points do not determine a unique sphere because they all lie in a plane. Using Mathematica I was able to express F as a linear combination



 F = x B + y C + z E


where



x = -((b^2*h^2)/(a^2*(b^2 + h^2))) 
y = h^2/(b^2 + h^2)
z = (b^2*(a^2 + h^2))/(a^2*(b^2 + h^2))


So in this setup it is not possible to draw a unique sphere.






share|improve this answer















A circle is determined by 3 points. A sphere, of course, needs at least 4 points on its boundary to be determined. However, the projection of the sphere, i.e. the circle, won't necessarily run through the projections of these points.



This shows two ways to construct circles that run through some of the points:




  1. The dotted circle runs through F, E and C. It is fixed by this requirement. As a consequence it misses B by a small amount.

  2. The red dashed circle runs through the midpoint of BC and through these points. It misses F and E by small amounts.




documentclass[border=3mm,12pt]{standalone}
usepackage{fouriernc}
usepackage{tikz,tikz-3dplot}
usepackage{tkz-euclide}
usetkzobj{all}
usetikzlibrary{calc,through}
tikzset{circle through 3 points/.style n args={3}{%
insert path={let p1=($(#1)!0.5!(#2)$),
p2=($(#1)!0.5!(#3)$),
p3=($(#1)!0.5!(#2)!1!-90:(#2)$),
p4=($(#1)!0.5!(#3)!1!90:(#3)$),
p5=(intersection of p1--p3 and p2--p4)
in },
at={(p5)},
circle through= {(#1)}
}}

usetikzlibrary{intersections,calc,backgrounds}

begin{document}

tdplotsetmaincoords{70}{110}
%tdplotsetmaincoords{80}{100}
begin{tikzpicture}[tdplot_main_coords,scale=1.5]
pgfmathsetmacroa{3}
pgfmathsetmacrob{4}
pgfmathsetmacroh{5}

% definitions
path
coordinate(A) at (0,0,0)
coordinate (B) at (a,0,0)
coordinate (C) at (0,b,0)
coordinate (S) at (0,0,h)
coordinate (E) at ({a*h^2/(a*a + h*h)},0,{(a*a*h)/(a*a + h*h)})
coordinate (F) at (0,{(b*h*h)/(b*b + h*h)},{(b*b*h)/(b*b + h*h)});
draw[dashed,thick]
(A) -- (B) (A) -- (C) (A) -- (E) (S)--(A) (F)--(A);
draw[thick]
(S) -- (B) -- (C) -- cycle;
draw[thick]
(F) -- (B) (C)--(E) (F)--(E);
tkzMarkRightAngle(S,E,A);
tkzMarkRightAngle(S,F,A);

foreach point/position in {A/below,B/left,C/below,S/above,E/left,F/above}
{
fill (point) circle (.8pt);
node[position=3pt] at (point) {$point$};
}
node[circle through 3 points={F}{E}{C},draw=blue,dotted]{};
draw[red,dashed]
let p1=($(B)-(C)$), n1={veclen(x1,y1)/2} in ($(B)!0.5!(C)$) circle (n1);
end{tikzpicture}
end{document}


enter image description here



It will be possible to construct the sphere as well. However, as mentioned its boundary may not run through any of the points.



ADDENDUM: In your setup, the four points do not determine a unique sphere because they all lie in a plane. Using Mathematica I was able to express F as a linear combination



 F = x B + y C + z E


where



x = -((b^2*h^2)/(a^2*(b^2 + h^2))) 
y = h^2/(b^2 + h^2)
z = (b^2*(a^2 + h^2))/(a^2*(b^2 + h^2))


So in this setup it is not possible to draw a unique sphere.







share|improve this answer














share|improve this answer



share|improve this answer








edited 45 mins ago

























answered 2 hours ago









marmotmarmot

91.5k4106199




91.5k4106199













  • I think, there is a way to draw the circle passing through 4 points B, E, F, C like my picture.

    – minhthien_2016
    39 mins ago













  • Let O be midpoint of the segment BC. Translation pyramid SABC into vector AM. I got drive.google.com/file/d/1-3ae7DX_E_s1Sit5Kfr0vnS6hPYM9mOT/view

    – minhthien_2016
    4 mins ago



















  • I think, there is a way to draw the circle passing through 4 points B, E, F, C like my picture.

    – minhthien_2016
    39 mins ago













  • Let O be midpoint of the segment BC. Translation pyramid SABC into vector AM. I got drive.google.com/file/d/1-3ae7DX_E_s1Sit5Kfr0vnS6hPYM9mOT/view

    – minhthien_2016
    4 mins ago

















I think, there is a way to draw the circle passing through 4 points B, E, F, C like my picture.

– minhthien_2016
39 mins ago







I think, there is a way to draw the circle passing through 4 points B, E, F, C like my picture.

– minhthien_2016
39 mins ago















Let O be midpoint of the segment BC. Translation pyramid SABC into vector AM. I got drive.google.com/file/d/1-3ae7DX_E_s1Sit5Kfr0vnS6hPYM9mOT/view

– minhthien_2016
4 mins ago





Let O be midpoint of the segment BC. Translation pyramid SABC into vector AM. I got drive.google.com/file/d/1-3ae7DX_E_s1Sit5Kfr0vnS6hPYM9mOT/view

– minhthien_2016
4 mins ago


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f470177%2fhow-to-draw-a-circle-sphere-passing-through-four-points%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Plaza Victoria

In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...