Spherical shell using tikz












1















How can I draw a spherical shell of a certain thickness using tikz?



I have found this question where somebody was asking about drawing one sphere inside another, which is surely related to this one.



Drawing Sphere to represent a black hole



Any help?










share|improve this question







New contributor




Marc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Welcome to TeX.SX! Can you show us what you have tried so far? (Meaning that you can add a Minimal Working Example). As you have already found the other question with nice answers, you have some starting point already - we would appreciate to see it.

    – Tom
    3 hours ago











  • Can you also make a sketch how the result should look like?

    – samcarter
    3 hours ago











  • I'm working on a first approximation right now so that I can show you.

    – Marc
    3 hours ago
















1















How can I draw a spherical shell of a certain thickness using tikz?



I have found this question where somebody was asking about drawing one sphere inside another, which is surely related to this one.



Drawing Sphere to represent a black hole



Any help?










share|improve this question







New contributor




Marc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Welcome to TeX.SX! Can you show us what you have tried so far? (Meaning that you can add a Minimal Working Example). As you have already found the other question with nice answers, you have some starting point already - we would appreciate to see it.

    – Tom
    3 hours ago











  • Can you also make a sketch how the result should look like?

    – samcarter
    3 hours ago











  • I'm working on a first approximation right now so that I can show you.

    – Marc
    3 hours ago














1












1








1


1






How can I draw a spherical shell of a certain thickness using tikz?



I have found this question where somebody was asking about drawing one sphere inside another, which is surely related to this one.



Drawing Sphere to represent a black hole



Any help?










share|improve this question







New contributor




Marc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












How can I draw a spherical shell of a certain thickness using tikz?



I have found this question where somebody was asking about drawing one sphere inside another, which is surely related to this one.



Drawing Sphere to represent a black hole



Any help?







tikz-pgf technical-drawing






share|improve this question







New contributor




Marc 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




Marc 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






New contributor




Marc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 3 hours ago









MarcMarc

1061




1061




New contributor




Marc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Marc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Marc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • Welcome to TeX.SX! Can you show us what you have tried so far? (Meaning that you can add a Minimal Working Example). As you have already found the other question with nice answers, you have some starting point already - we would appreciate to see it.

    – Tom
    3 hours ago











  • Can you also make a sketch how the result should look like?

    – samcarter
    3 hours ago











  • I'm working on a first approximation right now so that I can show you.

    – Marc
    3 hours ago



















  • Welcome to TeX.SX! Can you show us what you have tried so far? (Meaning that you can add a Minimal Working Example). As you have already found the other question with nice answers, you have some starting point already - we would appreciate to see it.

    – Tom
    3 hours ago











  • Can you also make a sketch how the result should look like?

    – samcarter
    3 hours ago











  • I'm working on a first approximation right now so that I can show you.

    – Marc
    3 hours ago

















Welcome to TeX.SX! Can you show us what you have tried so far? (Meaning that you can add a Minimal Working Example). As you have already found the other question with nice answers, you have some starting point already - we would appreciate to see it.

– Tom
3 hours ago





Welcome to TeX.SX! Can you show us what you have tried so far? (Meaning that you can add a Minimal Working Example). As you have already found the other question with nice answers, you have some starting point already - we would appreciate to see it.

– Tom
3 hours ago













Can you also make a sketch how the result should look like?

– samcarter
3 hours ago





Can you also make a sketch how the result should look like?

– samcarter
3 hours ago













I'm working on a first approximation right now so that I can show you.

– Marc
3 hours ago





I'm working on a first approximation right now so that I can show you.

– Marc
3 hours ago










1 Answer
1






active

oldest

votes


















5














I can only guess.



documentclass[tikz,border=3.14mm]{standalone}
usepackage{tikz-3dplot}
usetikzlibrary{3d}
% https://tex.stackexchange.com/a/12033/121799
tikzset{reverseclip/.style={insert path={(current bounding box.north
east) rectangle (current bounding box.south west)}}}
begin{document}
tdplotsetmaincoords{110}{-30}
begin{tikzpicture}[tdplot_main_coords]
pgfmathsetmacro{Radius}{4}
pgfmathsetmacro{radius}{3.6}
path[tdplot_screen_coords] (0,0) circle (Radius);
begin{scope}
clip plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=00,longitude=x)
-- plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=x,longitude=90)
-- plot[variable=x,domain=90:0] (xyz spherical cs:radius=Radius,latitude=x,longitude=0)
[reverseclip];
shade[tdplot_screen_coords,ball color=gray,opacity=0.5] (0,0) circle (Radius);
end{scope}
fill[top color=gray!80,bottom color=gray!60]
plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=00,longitude=x)
-- plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=x,longitude=90)
-- plot[variable=x,domain=0:90] (xyz spherical cs:radius=radius,latitude=x,longitude=0);
draw[fill=gray!10] plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=00,longitude=x)
-- plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=00,longitude=x)
-- cycle;
draw[fill=gray!30] plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=x,longitude=90)
-- plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=x,longitude=90)
-- cycle;
draw[fill=gray!70] plot[variable=x,domain=90:0] (xyz spherical cs:radius=Radius,latitude=x,longitude=0)
-- plot[variable=x,domain=0:90] (xyz spherical cs:radius=radius,latitude=x,longitude=0)
-- cycle;
end{tikzpicture}
end{document}


enter image description here






share|improve this answer























    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
    });


    }
    });






    Marc 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%2f471663%2fspherical-shell-using-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









    5














    I can only guess.



    documentclass[tikz,border=3.14mm]{standalone}
    usepackage{tikz-3dplot}
    usetikzlibrary{3d}
    % https://tex.stackexchange.com/a/12033/121799
    tikzset{reverseclip/.style={insert path={(current bounding box.north
    east) rectangle (current bounding box.south west)}}}
    begin{document}
    tdplotsetmaincoords{110}{-30}
    begin{tikzpicture}[tdplot_main_coords]
    pgfmathsetmacro{Radius}{4}
    pgfmathsetmacro{radius}{3.6}
    path[tdplot_screen_coords] (0,0) circle (Radius);
    begin{scope}
    clip plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=00,longitude=x)
    -- plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=x,longitude=90)
    -- plot[variable=x,domain=90:0] (xyz spherical cs:radius=Radius,latitude=x,longitude=0)
    [reverseclip];
    shade[tdplot_screen_coords,ball color=gray,opacity=0.5] (0,0) circle (Radius);
    end{scope}
    fill[top color=gray!80,bottom color=gray!60]
    plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=00,longitude=x)
    -- plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=x,longitude=90)
    -- plot[variable=x,domain=0:90] (xyz spherical cs:radius=radius,latitude=x,longitude=0);
    draw[fill=gray!10] plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=00,longitude=x)
    -- plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=00,longitude=x)
    -- cycle;
    draw[fill=gray!30] plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=x,longitude=90)
    -- plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=x,longitude=90)
    -- cycle;
    draw[fill=gray!70] plot[variable=x,domain=90:0] (xyz spherical cs:radius=Radius,latitude=x,longitude=0)
    -- plot[variable=x,domain=0:90] (xyz spherical cs:radius=radius,latitude=x,longitude=0)
    -- cycle;
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer




























      5














      I can only guess.



      documentclass[tikz,border=3.14mm]{standalone}
      usepackage{tikz-3dplot}
      usetikzlibrary{3d}
      % https://tex.stackexchange.com/a/12033/121799
      tikzset{reverseclip/.style={insert path={(current bounding box.north
      east) rectangle (current bounding box.south west)}}}
      begin{document}
      tdplotsetmaincoords{110}{-30}
      begin{tikzpicture}[tdplot_main_coords]
      pgfmathsetmacro{Radius}{4}
      pgfmathsetmacro{radius}{3.6}
      path[tdplot_screen_coords] (0,0) circle (Radius);
      begin{scope}
      clip plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=00,longitude=x)
      -- plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=x,longitude=90)
      -- plot[variable=x,domain=90:0] (xyz spherical cs:radius=Radius,latitude=x,longitude=0)
      [reverseclip];
      shade[tdplot_screen_coords,ball color=gray,opacity=0.5] (0,0) circle (Radius);
      end{scope}
      fill[top color=gray!80,bottom color=gray!60]
      plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=00,longitude=x)
      -- plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=x,longitude=90)
      -- plot[variable=x,domain=0:90] (xyz spherical cs:radius=radius,latitude=x,longitude=0);
      draw[fill=gray!10] plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=00,longitude=x)
      -- plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=00,longitude=x)
      -- cycle;
      draw[fill=gray!30] plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=x,longitude=90)
      -- plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=x,longitude=90)
      -- cycle;
      draw[fill=gray!70] plot[variable=x,domain=90:0] (xyz spherical cs:radius=Radius,latitude=x,longitude=0)
      -- plot[variable=x,domain=0:90] (xyz spherical cs:radius=radius,latitude=x,longitude=0)
      -- cycle;
      end{tikzpicture}
      end{document}


      enter image description here






      share|improve this answer


























        5












        5








        5







        I can only guess.



        documentclass[tikz,border=3.14mm]{standalone}
        usepackage{tikz-3dplot}
        usetikzlibrary{3d}
        % https://tex.stackexchange.com/a/12033/121799
        tikzset{reverseclip/.style={insert path={(current bounding box.north
        east) rectangle (current bounding box.south west)}}}
        begin{document}
        tdplotsetmaincoords{110}{-30}
        begin{tikzpicture}[tdplot_main_coords]
        pgfmathsetmacro{Radius}{4}
        pgfmathsetmacro{radius}{3.6}
        path[tdplot_screen_coords] (0,0) circle (Radius);
        begin{scope}
        clip plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=00,longitude=x)
        -- plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=x,longitude=90)
        -- plot[variable=x,domain=90:0] (xyz spherical cs:radius=Radius,latitude=x,longitude=0)
        [reverseclip];
        shade[tdplot_screen_coords,ball color=gray,opacity=0.5] (0,0) circle (Radius);
        end{scope}
        fill[top color=gray!80,bottom color=gray!60]
        plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=00,longitude=x)
        -- plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=x,longitude=90)
        -- plot[variable=x,domain=0:90] (xyz spherical cs:radius=radius,latitude=x,longitude=0);
        draw[fill=gray!10] plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=00,longitude=x)
        -- plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=00,longitude=x)
        -- cycle;
        draw[fill=gray!30] plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=x,longitude=90)
        -- plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=x,longitude=90)
        -- cycle;
        draw[fill=gray!70] plot[variable=x,domain=90:0] (xyz spherical cs:radius=Radius,latitude=x,longitude=0)
        -- plot[variable=x,domain=0:90] (xyz spherical cs:radius=radius,latitude=x,longitude=0)
        -- cycle;
        end{tikzpicture}
        end{document}


        enter image description here






        share|improve this answer













        I can only guess.



        documentclass[tikz,border=3.14mm]{standalone}
        usepackage{tikz-3dplot}
        usetikzlibrary{3d}
        % https://tex.stackexchange.com/a/12033/121799
        tikzset{reverseclip/.style={insert path={(current bounding box.north
        east) rectangle (current bounding box.south west)}}}
        begin{document}
        tdplotsetmaincoords{110}{-30}
        begin{tikzpicture}[tdplot_main_coords]
        pgfmathsetmacro{Radius}{4}
        pgfmathsetmacro{radius}{3.6}
        path[tdplot_screen_coords] (0,0) circle (Radius);
        begin{scope}
        clip plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=00,longitude=x)
        -- plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=x,longitude=90)
        -- plot[variable=x,domain=90:0] (xyz spherical cs:radius=Radius,latitude=x,longitude=0)
        [reverseclip];
        shade[tdplot_screen_coords,ball color=gray,opacity=0.5] (0,0) circle (Radius);
        end{scope}
        fill[top color=gray!80,bottom color=gray!60]
        plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=00,longitude=x)
        -- plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=x,longitude=90)
        -- plot[variable=x,domain=0:90] (xyz spherical cs:radius=radius,latitude=x,longitude=0);
        draw[fill=gray!10] plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=00,longitude=x)
        -- plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=00,longitude=x)
        -- cycle;
        draw[fill=gray!30] plot[variable=x,domain=0:90] (xyz spherical cs:radius=Radius,latitude=x,longitude=90)
        -- plot[variable=x,domain=90:0] (xyz spherical cs:radius=radius,latitude=x,longitude=90)
        -- cycle;
        draw[fill=gray!70] plot[variable=x,domain=90:0] (xyz spherical cs:radius=Radius,latitude=x,longitude=0)
        -- plot[variable=x,domain=0:90] (xyz spherical cs:radius=radius,latitude=x,longitude=0)
        -- cycle;
        end{tikzpicture}
        end{document}


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 hours ago









        marmotmarmot

        94k4109208




        94k4109208






















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










            draft saved

            draft discarded


















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













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












            Marc 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%2f471663%2fspherical-shell-using-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

            How to label and detect the document text images

            Vallis Paradisi

            Tabula Rosettana