How can one draw a segment of a sphere with TikZ? The Next CEO of Stack OverflowTikz: Draw...

Is it my responsibility to learn a new technology in my own time my employer wants to implement?

No sign flipping while figuring out the emf of voltaic cell?

Why isn't the Mueller report being released completely and unredacted?

Domestic-to-international connection at Orlando (MCO)

Which one is the true statement?

Is a distribution that is normal, but highly skewed considered Gaussian?

Easy to read palindrome checker

The exact meaning of 'Mom made me a sandwich'

Newlines in BSD sed vs gsed

Is there a way to save my career from absolute disaster?

Writing differences on a blackboard

I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin

What does "Its cash flow is deeply negative" mean?

I want to delete every two lines after 3rd lines in file contain very large number of lines :

Plot of histogram similar to output from @risk

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?

INSERT to a table from a database to other (same SQL Server) using Dynamic SQL

Is wanting to ask what to write an indication that you need to change your story?

Is this "being" usage is essential?

How do I align (1) and (2)?

What flight has the highest ratio of time difference to flight time?

Do I need to write [sic] when a number is less than 10 but isn't written out?

How to scale a tikZ image which is within a figure environment



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












0















I am trying to replace the black plan with a segment of a sphere using tikz :



continuation pseudo arclength



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.










share|improve this question









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


















0















I am trying to replace the black plan with a segment of a sphere using tikz :



continuation pseudo arclength



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.










share|improve this question









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
















0












0








0








I am trying to replace the black plan with a segment of a sphere using tikz :



continuation pseudo arclength



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.










share|improve this question









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 :



continuation pseudo arclength



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






share|improve this question









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.











share|improve this question









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.









share|improve this question




share|improve this question








edited 1 min 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
















  • 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












1 Answer
1






active

oldest

votes


















1














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}


enter image description here






share|improve this answer


























  • 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
    50 mins ago











  • @Yacola No worries and glad to hear that this goes in the right direction.

    – marmot
    38 mins ago











  • One last question : can you give me a hint on how to do it with a part of a sphere instead of the plan?

    – Yacola
    31 mins ago











  • I think that I am looking for a parametric plot that will replace the plan by a surface corresponding to a part of a sphere which center is where black line and orange curve cross. I'll try to look at more general spherical plots.

    – Yacola
    21 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
});


}
});






Yacola is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















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









1














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}


enter image description here






share|improve this answer


























  • 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
    50 mins ago











  • @Yacola No worries and glad to hear that this goes in the right direction.

    – marmot
    38 mins ago











  • One last question : can you give me a hint on how to do it with a part of a sphere instead of the plan?

    – Yacola
    31 mins ago











  • I think that I am looking for a parametric plot that will replace the plan by a surface corresponding to a part of a sphere which center is where black line and orange curve cross. I'll try to look at more general spherical plots.

    – Yacola
    21 mins ago


















1














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}


enter image description here






share|improve this answer


























  • 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
    50 mins ago











  • @Yacola No worries and glad to hear that this goes in the right direction.

    – marmot
    38 mins ago











  • One last question : can you give me a hint on how to do it with a part of a sphere instead of the plan?

    – Yacola
    31 mins ago











  • I think that I am looking for a parametric plot that will replace the plan by a surface corresponding to a part of a sphere which center is where black line and orange curve cross. I'll try to look at more general spherical plots.

    – Yacola
    21 mins ago
















1












1








1







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}


enter image description here






share|improve this answer















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}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 9 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
    50 mins ago











  • @Yacola No worries and glad to hear that this goes in the right direction.

    – marmot
    38 mins ago











  • One last question : can you give me a hint on how to do it with a part of a sphere instead of the plan?

    – Yacola
    31 mins ago











  • I think that I am looking for a parametric plot that will replace the plan by a surface corresponding to a part of a sphere which center is where black line and orange curve cross. I'll try to look at more general spherical plots.

    – Yacola
    21 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
    50 mins ago











  • @Yacola No worries and glad to hear that this goes in the right direction.

    – marmot
    38 mins ago











  • One last question : can you give me a hint on how to do it with a part of a sphere instead of the plan?

    – Yacola
    31 mins ago











  • I think that I am looking for a parametric plot that will replace the plan by a surface corresponding to a part of a sphere which center is where black line and orange curve cross. I'll try to look at more general spherical plots.

    – Yacola
    21 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
50 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
50 mins ago













@Yacola No worries and glad to hear that this goes in the right direction.

– marmot
38 mins ago





@Yacola No worries and glad to hear that this goes in the right direction.

– marmot
38 mins ago













One last question : can you give me a hint on how to do it with a part of a sphere instead of the plan?

– Yacola
31 mins ago





One last question : can you give me a hint on how to do it with a part of a sphere instead of the plan?

– Yacola
31 mins ago













I think that I am looking for a parametric plot that will replace the plan by a surface corresponding to a part of a sphere which center is where black line and orange curve cross. I'll try to look at more general spherical plots.

– Yacola
21 mins ago







I think that I am looking for a parametric plot that will replace the plan by a surface corresponding to a part of a sphere which center is where black line and orange curve cross. I'll try to look at more general spherical plots.

– Yacola
21 mins ago












Yacola is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















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.




draft saved


draft discarded














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





















































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

Can't compile dgruyter and caption packagesLaTeX templates/packages for writing a patent specificationLatex...

Schneeberg (Smreczany) Bibliografia | Menu...

Hans Bellmer Spis treści Życiorys | Upamiętnienie | Przypisy | Bibliografia | Linki zewnętrzne |...