How can one draw a segment of a sphere with TikZ? The Next CEO of Stack OverflowTikz: Draw...
Domestic-to-international connection at Orlando (MCO)
Reference request: Grassmannian and Plucker coordinates in type B, C, D
No sign flipping while figuring out the emf of voltaic cell?
Is there a difference between "Fahrstuhl" and "Aufzug"
What flight has the highest ratio of time difference to flight time?
Writing differences on a blackboard
Powershell. How to parse gci Name?
Which one is the true statement?
Rotate a column
Recycling old answers
How a 64-bit process virtual address space is divided in Linux?
Break Away Valves for Launch
The exact meaning of 'Mom made me a sandwich'
How to install OpenCV on Raspbian Stretch?
What steps are necessary to read a Modern SSD in Medieval Europe?
Is there a way to save my career from absolute disaster?
Some questions about different axiomatic systems for neighbourhoods
Bartok - Syncopation (1): Meaning of notes in between Grand Staff
Are police here, aren't itthey?
Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis
I want to delete every two lines after 3rd lines in file contain very large number of lines :
Make solar eclipses exceedingly rare, but still have new moons
What did we know about the Kessel run before the prequels?
Is it my responsibility to learn a new technology in my own time my employer wants to implement?
How can one draw a segment of a sphere with TikZ?
The Next CEO of Stack OverflowTikz: Draw simple shortened curved line between two coordinates in tikzThe intersection of a sphere with planes through an axis tangent to the north poleHow to draw a squeezed ellipse with fading color on a sphere surface with TikZ?PGF: draw longitudinal arcs in 3D axis environmentTikZ: Drawing an arc from an intersection to an intersectionPolar plot using pgfplots/tikzHow can I draw a curved surface in a polar coordinate system?tikz/pgfplots - Plotting 3D surface with sphereCreate with TikZ a union of more graphsSolvent-accessible and -excluded surface
I am trying to replace the black plan with a segment of a sphere using tikz :

The sphere would be of centre H(Yi) and radius ||H(Yi) , H(Yi+1_0)|| on which will lie all the points from k=0 (green point) to k (blue point) (=> corresponding to an arc of a circle in the plan designated by the axis system in the upper left corner).
Any propositions using tikz to add a part of a sphere would be greatly appreciated. Thank you.
tikz-pgf
New contributor
Yacola is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I am trying to replace the black plan with a segment of a sphere using tikz :

The sphere would be of centre H(Yi) and radius ||H(Yi) , H(Yi+1_0)|| on which will lie all the points from k=0 (green point) to k (blue point) (=> corresponding to an arc of a circle in the plan designated by the axis system in the upper left corner).
Any propositions using tikz to add a part of a sphere would be greatly appreciated. Thank you.
tikz-pgf
New contributor
Yacola is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
4
welcome to tex.se! to my opinion your question (as is) is to broad and type do-it-for-me, so it will probably will be closed .... please show us, what you try so far.
– Zarko
1 hour ago
add a comment |
I am trying to replace the black plan with a segment of a sphere using tikz :

The sphere would be of centre H(Yi) and radius ||H(Yi) , H(Yi+1_0)|| on which will lie all the points from k=0 (green point) to k (blue point) (=> corresponding to an arc of a circle in the plan designated by the axis system in the upper left corner).
Any propositions using tikz to add a part of a sphere would be greatly appreciated. Thank you.
tikz-pgf
New contributor
Yacola is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I am trying to replace the black plan with a segment of a sphere using tikz :

The sphere would be of centre H(Yi) and radius ||H(Yi) , H(Yi+1_0)|| on which will lie all the points from k=0 (green point) to k (blue point) (=> corresponding to an arc of a circle in the plan designated by the axis system in the upper left corner).
Any propositions using tikz to add a part of a sphere would be greatly appreciated. Thank you.
tikz-pgf
tikz-pgf
New contributor
Yacola is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Yacola is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 8 mins ago
Yacola
New contributor
Yacola is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 1 hour ago
YacolaYacola
63
63
New contributor
Yacola is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Yacola is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Yacola is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
4
welcome to tex.se! to my opinion your question (as is) is to broad and type do-it-for-me, so it will probably will be closed .... please show us, what you try so far.
– Zarko
1 hour ago
add a comment |
4
welcome to tex.se! to my opinion your question (as is) is to broad and type do-it-for-me, so it will probably will be closed .... please show us, what you try so far.
– Zarko
1 hour ago
4
4
welcome to tex.se! to my opinion your question (as is) is to broad and type do-it-for-me, so it will probably will be closed .... please show us, what you try so far.
– Zarko
1 hour ago
welcome to tex.se! to my opinion your question (as is) is to broad and type do-it-for-me, so it will probably will be closed .... please show us, what you try so far.
– Zarko
1 hour ago
add a comment |
1 Answer
1
active
oldest
votes
The purpose of this post is to define a style that draws a part of a sphere. More specifically, it will draw a segment in which the latitude and longitude are in a certain range. Drawing this segment is then as simple as saying
draw[thin,fill=white,fill opacity=0.6,
sphere segment={phi from 60 to 120 and theta from -10 to 50 and radius 4}];
where phi and theta are the longitude and latitude parameters.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{tikz-3dplot}
usetikzlibrary{3d}
begin{document}
tdplotsetmaincoords{70}{30}
begin{tikzpicture}[tdplot_main_coords,bullet/.style={fill,circle,inner
sep=1pt},sphere segment/.style args={%
phi from #1 to #2 and theta from #3 to #4 and radius #5}{insert path={%
plot[variable=x,smooth,domain=#2:#1]
(xyz spherical cs:radius=#5,longitude=x,latitude=#3)
-- plot[variable=x,smooth,domain=#3:#4]
(xyz spherical cs:radius=#5,longitude=#1,latitude=x)
--plot[variable=x,smooth,domain=#1:#2]
(xyz spherical cs:radius=#5,longitude=x,latitude=#4)
-- plot[variable=x,smooth,domain=#4:#3]
(xyz spherical cs:radius=#5,longitude=#2,latitude=x)}},
>=stealth,declare function={f(x)=exp(-2+0.5*x);}]
draw[thick] (0,0,0) -- (4,0,0);
draw[thick,orange] plot[variable=x,smooth,domain=0:4] ({x},0,{f(x)});
% note: this domain is an approximation, it should really be
% from 0 to xmax where xmax is the solution of x^2+f(x)^2=4^2
draw[thin,fill=white,fill opacity=0.6,
sphere segment={phi from 60 to 120 and theta from -10 to 50 and radius 4}] ;
draw[thick,->] (4,0,0) -- (6,0,0);
draw[thick,orange] plot[variable=x,smooth,domain=4:6] ({x},0,{f(x)});
% should be xmax:6
end{tikzpicture}
end{document}

Thanks for your answer @marmot, I should have just ask it with MWE in the first time, that wasn't intended to be the whole picture but more like what you just did, my bad...
– Yacola
57 mins ago
@Yacola No worries and glad to hear that this goes in the right direction.
– marmot
45 mins ago
add a comment |
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
});
}
});
Yacola is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f482330%2fhow-can-one-draw-a-segment-of-a-sphere-with-tikz%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
The purpose of this post is to define a style that draws a part of a sphere. More specifically, it will draw a segment in which the latitude and longitude are in a certain range. Drawing this segment is then as simple as saying
draw[thin,fill=white,fill opacity=0.6,
sphere segment={phi from 60 to 120 and theta from -10 to 50 and radius 4}];
where phi and theta are the longitude and latitude parameters.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{tikz-3dplot}
usetikzlibrary{3d}
begin{document}
tdplotsetmaincoords{70}{30}
begin{tikzpicture}[tdplot_main_coords,bullet/.style={fill,circle,inner
sep=1pt},sphere segment/.style args={%
phi from #1 to #2 and theta from #3 to #4 and radius #5}{insert path={%
plot[variable=x,smooth,domain=#2:#1]
(xyz spherical cs:radius=#5,longitude=x,latitude=#3)
-- plot[variable=x,smooth,domain=#3:#4]
(xyz spherical cs:radius=#5,longitude=#1,latitude=x)
--plot[variable=x,smooth,domain=#1:#2]
(xyz spherical cs:radius=#5,longitude=x,latitude=#4)
-- plot[variable=x,smooth,domain=#4:#3]
(xyz spherical cs:radius=#5,longitude=#2,latitude=x)}},
>=stealth,declare function={f(x)=exp(-2+0.5*x);}]
draw[thick] (0,0,0) -- (4,0,0);
draw[thick,orange] plot[variable=x,smooth,domain=0:4] ({x},0,{f(x)});
% note: this domain is an approximation, it should really be
% from 0 to xmax where xmax is the solution of x^2+f(x)^2=4^2
draw[thin,fill=white,fill opacity=0.6,
sphere segment={phi from 60 to 120 and theta from -10 to 50 and radius 4}] ;
draw[thick,->] (4,0,0) -- (6,0,0);
draw[thick,orange] plot[variable=x,smooth,domain=4:6] ({x},0,{f(x)});
% should be xmax:6
end{tikzpicture}
end{document}

Thanks for your answer @marmot, I should have just ask it with MWE in the first time, that wasn't intended to be the whole picture but more like what you just did, my bad...
– Yacola
57 mins ago
@Yacola No worries and glad to hear that this goes in the right direction.
– marmot
45 mins ago
add a comment |
The purpose of this post is to define a style that draws a part of a sphere. More specifically, it will draw a segment in which the latitude and longitude are in a certain range. Drawing this segment is then as simple as saying
draw[thin,fill=white,fill opacity=0.6,
sphere segment={phi from 60 to 120 and theta from -10 to 50 and radius 4}];
where phi and theta are the longitude and latitude parameters.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{tikz-3dplot}
usetikzlibrary{3d}
begin{document}
tdplotsetmaincoords{70}{30}
begin{tikzpicture}[tdplot_main_coords,bullet/.style={fill,circle,inner
sep=1pt},sphere segment/.style args={%
phi from #1 to #2 and theta from #3 to #4 and radius #5}{insert path={%
plot[variable=x,smooth,domain=#2:#1]
(xyz spherical cs:radius=#5,longitude=x,latitude=#3)
-- plot[variable=x,smooth,domain=#3:#4]
(xyz spherical cs:radius=#5,longitude=#1,latitude=x)
--plot[variable=x,smooth,domain=#1:#2]
(xyz spherical cs:radius=#5,longitude=x,latitude=#4)
-- plot[variable=x,smooth,domain=#4:#3]
(xyz spherical cs:radius=#5,longitude=#2,latitude=x)}},
>=stealth,declare function={f(x)=exp(-2+0.5*x);}]
draw[thick] (0,0,0) -- (4,0,0);
draw[thick,orange] plot[variable=x,smooth,domain=0:4] ({x},0,{f(x)});
% note: this domain is an approximation, it should really be
% from 0 to xmax where xmax is the solution of x^2+f(x)^2=4^2
draw[thin,fill=white,fill opacity=0.6,
sphere segment={phi from 60 to 120 and theta from -10 to 50 and radius 4}] ;
draw[thick,->] (4,0,0) -- (6,0,0);
draw[thick,orange] plot[variable=x,smooth,domain=4:6] ({x},0,{f(x)});
% should be xmax:6
end{tikzpicture}
end{document}

Thanks for your answer @marmot, I should have just ask it with MWE in the first time, that wasn't intended to be the whole picture but more like what you just did, my bad...
– Yacola
57 mins ago
@Yacola No worries and glad to hear that this goes in the right direction.
– marmot
45 mins ago
add a comment |
The purpose of this post is to define a style that draws a part of a sphere. More specifically, it will draw a segment in which the latitude and longitude are in a certain range. Drawing this segment is then as simple as saying
draw[thin,fill=white,fill opacity=0.6,
sphere segment={phi from 60 to 120 and theta from -10 to 50 and radius 4}];
where phi and theta are the longitude and latitude parameters.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{tikz-3dplot}
usetikzlibrary{3d}
begin{document}
tdplotsetmaincoords{70}{30}
begin{tikzpicture}[tdplot_main_coords,bullet/.style={fill,circle,inner
sep=1pt},sphere segment/.style args={%
phi from #1 to #2 and theta from #3 to #4 and radius #5}{insert path={%
plot[variable=x,smooth,domain=#2:#1]
(xyz spherical cs:radius=#5,longitude=x,latitude=#3)
-- plot[variable=x,smooth,domain=#3:#4]
(xyz spherical cs:radius=#5,longitude=#1,latitude=x)
--plot[variable=x,smooth,domain=#1:#2]
(xyz spherical cs:radius=#5,longitude=x,latitude=#4)
-- plot[variable=x,smooth,domain=#4:#3]
(xyz spherical cs:radius=#5,longitude=#2,latitude=x)}},
>=stealth,declare function={f(x)=exp(-2+0.5*x);}]
draw[thick] (0,0,0) -- (4,0,0);
draw[thick,orange] plot[variable=x,smooth,domain=0:4] ({x},0,{f(x)});
% note: this domain is an approximation, it should really be
% from 0 to xmax where xmax is the solution of x^2+f(x)^2=4^2
draw[thin,fill=white,fill opacity=0.6,
sphere segment={phi from 60 to 120 and theta from -10 to 50 and radius 4}] ;
draw[thick,->] (4,0,0) -- (6,0,0);
draw[thick,orange] plot[variable=x,smooth,domain=4:6] ({x},0,{f(x)});
% should be xmax:6
end{tikzpicture}
end{document}

The purpose of this post is to define a style that draws a part of a sphere. More specifically, it will draw a segment in which the latitude and longitude are in a certain range. Drawing this segment is then as simple as saying
draw[thin,fill=white,fill opacity=0.6,
sphere segment={phi from 60 to 120 and theta from -10 to 50 and radius 4}];
where phi and theta are the longitude and latitude parameters.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{tikz-3dplot}
usetikzlibrary{3d}
begin{document}
tdplotsetmaincoords{70}{30}
begin{tikzpicture}[tdplot_main_coords,bullet/.style={fill,circle,inner
sep=1pt},sphere segment/.style args={%
phi from #1 to #2 and theta from #3 to #4 and radius #5}{insert path={%
plot[variable=x,smooth,domain=#2:#1]
(xyz spherical cs:radius=#5,longitude=x,latitude=#3)
-- plot[variable=x,smooth,domain=#3:#4]
(xyz spherical cs:radius=#5,longitude=#1,latitude=x)
--plot[variable=x,smooth,domain=#1:#2]
(xyz spherical cs:radius=#5,longitude=x,latitude=#4)
-- plot[variable=x,smooth,domain=#4:#3]
(xyz spherical cs:radius=#5,longitude=#2,latitude=x)}},
>=stealth,declare function={f(x)=exp(-2+0.5*x);}]
draw[thick] (0,0,0) -- (4,0,0);
draw[thick,orange] plot[variable=x,smooth,domain=0:4] ({x},0,{f(x)});
% note: this domain is an approximation, it should really be
% from 0 to xmax where xmax is the solution of x^2+f(x)^2=4^2
draw[thin,fill=white,fill opacity=0.6,
sphere segment={phi from 60 to 120 and theta from -10 to 50 and radius 4}] ;
draw[thick,->] (4,0,0) -- (6,0,0);
draw[thick,orange] plot[variable=x,smooth,domain=4:6] ({x},0,{f(x)});
% should be xmax:6
end{tikzpicture}
end{document}

edited 16 mins ago
answered 1 hour ago
marmotmarmot
113k5145274
113k5145274
Thanks for your answer @marmot, I should have just ask it with MWE in the first time, that wasn't intended to be the whole picture but more like what you just did, my bad...
– Yacola
57 mins ago
@Yacola No worries and glad to hear that this goes in the right direction.
– marmot
45 mins ago
add a comment |
Thanks for your answer @marmot, I should have just ask it with MWE in the first time, that wasn't intended to be the whole picture but more like what you just did, my bad...
– Yacola
57 mins ago
@Yacola No worries and glad to hear that this goes in the right direction.
– marmot
45 mins ago
Thanks for your answer @marmot, I should have just ask it with MWE in the first time, that wasn't intended to be the whole picture but more like what you just did, my bad...
– Yacola
57 mins ago
Thanks for your answer @marmot, I should have just ask it with MWE in the first time, that wasn't intended to be the whole picture but more like what you just did, my bad...
– Yacola
57 mins ago
@Yacola No worries and glad to hear that this goes in the right direction.
– marmot
45 mins ago
@Yacola No worries and glad to hear that this goes in the right direction.
– marmot
45 mins ago
add a comment |
Yacola is a new contributor. Be nice, and check out our Code of Conduct.
Yacola is a new contributor. Be nice, and check out our Code of Conduct.
Yacola is a new contributor. Be nice, and check out our Code of Conduct.
Yacola is a new contributor. Be nice, and check out our Code of Conduct.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f482330%2fhow-can-one-draw-a-segment-of-a-sphere-with-tikz%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
4
welcome to tex.se! to my opinion your question (as is) is to broad and type do-it-for-me, so it will probably will be closed .... please show us, what you try so far.
– Zarko
1 hour ago