2

The question is writen in the title, i got the grey filled part and it has to fit on the arc. I did it manualy but supose there is a better solution i can't figure out. Thank you in advance, Leo.

\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{3D, calc, matrix}
\usepackage{tikz}
\usepackage{mathcomp}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{caption}
\begin{document}
    \begin{figure}
        \centering
        \begin{tikzpicture}


        %3D-Koordinatensystem:
        \draw[->, >=latex] (-5,0,0) -- (5,0,0) node[below]{$a$};
        \draw[->, >=latex] (0,-4,0) -- (0,5,0) node[left]{$b$}; 
        \draw[->, >=latex] (0,0,-8) -- (0,0,8) node[left]{$c$};
        %\draw[dotted, ->, >=latex] (0,0,-8) -- (0,0,8) node[left]{};
        %\draw[->, >=latex] (0,0,4.7) -- (0,0,8) node[left]{$c$};


    \filldraw [color=gray, rotate=109] (-1.2,-3.50) arc (190:340:0.8cm and 0.15cm) -- (0,0) -- cycle;
    \draw [thick, rotate=123.6] (-2,-3) arc (177:360:2cm and 0.5cm) -- (0,0) -- cycle;
    \draw [rotate=124] [dashed] (-2,-3) arc (180:0:2cm and 0.5cm);


    \filldraw [color=gray, rotate=-70] (-1.23,-3.44) arc (188:340:0.9cm and 0.17cm) -- (0,0) -- cycle;
    \draw [thick, rotate=-56] (-2,-3) arc (180:0:2cm and 0.5cm) -- (0,0) -- cycle;
    \draw [thick, rotate=-56] (-2,-3) arc (180:360:2cm and 0.5cm);


        \end{tikzpicture}
%   \caption {$Variety \big\{ (a,b,c) \in \protect\mathbb{R}^3;det$ $\begin{bmatrix} a & b\\ b & c\\
%   \end{bmatrix}$ $=0$ $\big\}$}
%   \label {Figure 5.1:}    

    \end{figure}
\end{document}

enter image description here

1 Answer 1

1

Two ways of saving and reusing paths were described here. The second method is the basis of the following snippet.

\documentclass[tikz,border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc, matrix,intersections,backgrounds}
\usepackage{mathcomp}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{caption}
% from https://tex.stackexchange.com/a/127045/121799
\tikzset{
  saveuse path/.code 2 args={
    \pgfkeysalso{#1/.estyle={insert path={#2}}}%
    \global\expandafter\let\csname pgfk@\pgfkeyscurrentpath/.@cmd\expandafter\endcsname % not optimal as it is now global through out the document
                           \csname pgfk@\pgfkeyscurrentpath/.@cmd\endcsname
    \pgfkeysalso{#1}%
  }
}

\begin{document}
        \begin{tikzpicture}


        %3D-Koordinatensystem:
        \draw[->, >=latex] (-5,0,0) -- (5,0,0) node[below]{$a$};
        \draw[->, >=latex] (0,-4,0) -- (0,5,0) node[left]{$b$}; 
        \draw[->, >=latex] (0,0,-8) -- (0,0,8) node[left]{$c$};
        %\draw[dotted, ->, >=latex] (0,0,-8) -- (0,0,8) node[left]{};
        %\draw[->, >=latex] (0,0,4.7) -- (0,0,8) node[left]{$c$};

    \begin{scope}[rotate=123.6]
    \draw [thick ,saveuse path={pathA}{(-2,-3) arc (177:360:2cm and
    0.5cm) -- (0,0) -- cycle}];
    \draw  [dashed] (-2,-3) arc (180:0:2cm and 0.5cm);
     \begin{scope}[on background layer]
     \clip (0,0) --(-2,-3) --(-1.2,-5)--cycle;
     \fill[gray][pathA];
     \end{scope}
    \end{scope}

    \begin{scope}[rotate=-56]
    \draw [thick, saveuse path={pathB}{ (-2,-3) arc (180:360:2cm and
    0.5cm) -- (0,0) -- cycle}];
     \begin{scope}
    \clip (0,0) --(-2,-3) --(-1.2,-5)--cycle;
    \fill[gray][pathB];
     \end{scope}
    \draw [thick] (-2,-3) arc (180:0:2cm and 0.5cm);
    \end{scope}

    \end{tikzpicture}

\end{document}

enter image description here

1
  • Well this solved my problem, thank you very much! :)
    – Don Ky
    Mar 9, 2018 at 13:28

You must log in to answer this question.

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