# Problems drawing curves on ellipsoid

I'm trying to draw an ellipsoid but I have trouble matching this dashed curve with the limit of the shading in the picture, as you can see in the image ... what am I forgetting?

\documentclass{standalone}

\usepackage{tikz,amsmath,amssymb}
\usepackage{tikz-3dplot}

\usetikzlibrary{calc,arrows, arrows.meta}

\begin{document}

\tdplotsetmaincoords{90}{0}

%define polar coordinates for some vector
%TODO: look into using 3d spherical coordinate system
\pgfmathsetmacro{\thetavec}{0}
\pgfmathsetmacro{\phivec}{0}

\begin{tikzpicture}[
thick, font = \scriptsize, >={[scale =1]Stealth},
fip/.style ={circle, fill = fcolor, draw = fcolor, inner sep = 1pt}
]

\def\OP{.4} % Deines the Opacity
\def\Fi{70} % Deines the filling percentage in contrast to the drawing
\def \yaxis{2}
%start tikz picture, and use the tdplot_main_coords style to implement the    display
%coordinate transformation provided by 3dplot
\begin{scope}[scale=2.5,tdplot_main_coords,yshift=.7cm,xshift=-1cm]
%draw the main coordinate system axes
\draw[thick,->] (0,0,0) -- (2,0,0) node[anchor=south east]{$x$};
\draw[thick,->] (0,0,0) -- (0,1.5,0) node[anchor=north west]{$y$};
\draw[thick,->] (0,0,0) -- (0,0,1.5) node[anchor=south]{$z$};

\tdplotsetthetaplanecoords{\phivec}

%draw some dashed arcs, demonstrating direct arc drawing ...
%the problem is here

\shade[ball color=blue!10!white,opacity=0.2] (1cm,0) arc (0:-180:1cm and 7.5mm) arc (180:0:1cm and .75cm);
% (-z x y)
\draw (0, 1, 0) node [circle, fill=blue, inner sep=.02cm] () {};
\draw (0, 0, 1) node [circle, fill=green, inner sep=.02cm] () {};
\draw (-1, 0, 0) node [circle, fill=red, inner sep=.02cm] () {};
\end{scope}

\end{tikzpicture}

\end{document}

• \tdplotsetmaincoords isn't the problem ... indeed, the problem is marked in the code with %the problem is here the problem is I can't match the dashed curve with the limit of the shading in the picture. Because that I put \tdplotsetmaincoords{90}{0} so that the problem is seen. – juanuni Jun 20 '18 at 4:22

I am not sure I understand the question but you can draw the arc as a plot.

\documentclass{standalone}

\usepackage{tikz,amsmath,amssymb}
\usepackage{tikz-3dplot}

\usetikzlibrary{calc,arrows, arrows.meta}

\begin{document}

\tdplotsetmaincoords{70}{110}

%define polar coordinates for some vector
%TODO: look into using 3d spherical coordinate system
\pgfmathsetmacro{\thetavec}{0}
\pgfmathsetmacro{\phivec}{0}

\begin{tikzpicture}[
thick, font = \scriptsize, >={[scale =1]Stealth},
fip/.style ={circle, fill = fcolor, draw = fcolor, inner sep = 1pt}
]

\def\OP{.4} % Deines the Opacity
\def\Fi{70} % Deines the filling percentage in contrast to the drawing
\def \yaxis{2}
%start tikz picture, and use the tdplot_main_coords style to implement the    display
%coordinate transformation provided by 3dplot
\begin{scope}[scale=2.5,tdplot_main_coords,yshift=.7cm,xshift=-1cm]
%draw the main coordinate system axes
\draw[thick,->] (0,0,0) -- (2,0,0) node[anchor=south east]{$x$};
\draw[thick,->] (0,0,0) -- (0,1.5,0) node[anchor=north west]{$y$};
\draw[thick,->] (0,0,0) -- (0,0,1.5) node[anchor=south]{$z$};

\tdplotsetthetaplanecoords{\phivec}

%draw some dashed arcs, demonstrating direct arc drawing ...
%the problem is here
\draw[dashed,domain=0:90]

\shade[ball color=blue!10!white,opacity=0.2] (1cm,0) arc (0:-180:1cm and 7.5mm) arc (180:0:1cm and .75cm);
% (-z x y)
\draw (0, 1, 0) node [circle, fill=blue, inner sep=.02cm] () {};
\draw (0, 0, 1) node [circle, fill=green, inner sep=.02cm] () {};
\draw (-1, 0, 0) node [circle, fill=red, inner sep=.02cm] () {};
\end{scope}

\end{tikzpicture}

\end{document}

And with \tdplotsetmaincoords{90}{0}

• Yes, you understand my question. Thank you. – juanuni Jun 20 '18 at 4:41