2

Ultimately I'm trying to draw the tiling of a sphere with triangle group (2,3,4) (i.e., Coxeter complex B3) and shade in various lunes. I figured out how to draw the tiling of the sphere using the blocsphere package (as shown with code below). But I can't for the life of me figure out how to now fill the area between two great circles using blocsphere. Any help with trying to code both the Coxeter complex as well as a lune would be appreciated Here's the code that I have for the tiling of the sphere:

\documentclass{amsart}
\usepackage{blochsphere}
\pgfsetlayers{back,main,front}

\begin{document}


\begin{tikzpicture}
    \begin{scope}
        \begin{blochsphere}[radius=1.5 cm,tilt=25,rotation=-20,nested=true]
            % The next line is automatically included when not nesting
            % but needs to be here when nesting
            \drawBall

            \drawBallGrid[style={draw,opacity=1}]{360}{45}

            \drawGreatCircle{45}{0}%[style={dashed}]
            \drawGreatCircle{-45}{0}%[style={dashed}]
            \drawGreatCircle{45}{-90}
            \drawGreatCircle{-45}{-90}
            
        \end{blochsphere}

    \end{scope}
\end{tikzpicture}


\end{document}

And here is what I'm trying to draw at the end of the day: enter image description here

8
  • 3
    Welcome to TSE. Please post a Minimal Working Example, instead of a code snippet. Commented Jun 23 at 18:04
  • @José Carlos Santos: Hi! I just added the image from the compiled code. Is this what you're looking for? It's just the B_3 Coxeter complex. I couldn't figure out how to start drawing lunes using the blochsphere package.
    – Amy Herron
    Commented Jun 23 at 23:35
  • 1
    Did you bother to click the link from my previous comment? Commented Jun 24 at 7:20
  • You really need to complete your code. As it is now, your question will most likely be closed. I do not know, but I doubt that it is possible to use the very simple package to fill anything. You would need to use TikZ and then there would be no advantage left of using blochsphere at all. Commented Jun 24 at 7:30
  • 1
    Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for the users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. Commented Jun 24 at 16:11

1 Answer 1

2

Maybe this is not the most straight-forward way, but with the use of the fillbetween library from the pgfplots package you could do like this:

\documentclass[border=10pt]{standalone}
\usepackage{blochsphere}
\pgfsetlayers{back, main, front}

\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{fillbetween}

\begin{document}

\begin{tikzpicture}
    \begin{blochsphere}[radius=1.5cm, tilt=25, rotation=-20, nested=true]
        \drawBall

        \drawBallGrid[style={draw}]{360}{45}

        \drawGreatCircle{45}{0}
        \drawGreatCircle{-45}{0}
        \drawGreatCircle{45}{-90}
        \drawGreatCircle{-45}{-90}

        \drawGreatCircle[style={red, name path global=A}]{90}{135}
        s\drawGreatCircle[style={red, name path global=B}]{90}{180}
    \end{blochsphere}

    \fill[cyan, opacity=0.5,
        intersection segments={of=A and B, sequence={L1 -- R1[reverse]}}] to[bend right=5] cycle;

\end{tikzpicture}

\end{document}

result from the above code

(The bottom part is not super exact, but I opted for this solution instead of calculating the intersections of the large circles with the circumcircle.)


1
  • Thank you very much!!!!!
    – Amy Herron
    Commented Jul 8 at 19:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .