The source of the difficulty is that ellipses are constructed in a particular way in TikZ. They are paths that start from the x-axis and proceed counter-clockwise around their centre. The vast majority of the time, the exact parametrisation doesn't matter. You appear to have found the one situation where it does!
In the actual question, you only want to be able to mirror the ellipse, and so draw it starting from the negative x-axis (the title of the question suggests a more flexible approach). That's actually not too hard since we can exploit the symmetry of the ellipse. The key is to provide it with a negative x-radius, since then it will start from the negative x-axis (and proceed clockwise, but we could correct for that by negating the y-radius as well). To do this, we interrupt the call from the node shape to the drawing command and flip the sign of the x-radius. The simplest way to do this is to redefine the \pgfpathellipse
macro to do the negation and then call the original macro. The following code does this.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations,shapes,decorations.markings}
\makeatletter
\let\origpgfpathellipse=\pgfpathellipse
\def\revpgfpathellipse#1#2#3{%
#2%
\pgf@xa=-\pgf@x
\origpgfpathellipse{#1}{\pgfqpoint{\pgf@xa}{0pt}}{#3}}
\makeatother
\tikzset{
reversed ellipse/.style={
ellipse,
reverse the ellipse%
},
reverse the ellipse/.code={
\let\pgfpathellipse=\revpgfpathellipse
}
}
\begin{document}
\begin{tikzpicture}
\node[ellipse,
draw,
postaction={
decorate,
decoration={
markings,
mark=at position 1 with {
\arrow[line width=5pt,blue]{>}
}
}
}
] at (0,0) {hello world};
\node[reversed ellipse,
draw,
postaction={
decorate,
decoration={
markings,
mark=at position 1 with {
\arrow[line width=5pt,blue]{>}
}
}
}
] at (0,-2) {hello world};
\end{tikzpicture}
\end{document}
Here's the result:
(the arrow got clipped, but you can see where it lies)
Something like this? And you don't want isometric (angles 30/150/90), trust me ;)
Code
\documentclass[tikz]{standalone}
\usetikzlibrary{3d}
\begin{document}
\newcommand{\xangle}{15}
\newcommand{\yangle}{153}
\newcommand{\zangle}{90}
\newcommand{\xlength}{1}
\newcommand{\ylength}{1}
\newcommand{\zlength}{1}
\newcommand{\dimension}{5}% actually dimension-1
\pgfmathsetmacro{\xx}{\xlength*cos(\xangle)}
\pgfmathsetmacro{\xy}{\xlength*sin(\xangle)}
\pgfmathsetmacro{\yx}{\ylength*cos(\yangle)}
\pgfmathsetmacro{\yy}{\ylength*sin(\yangle)}
\pgfmathsetmacro{\zx}{\zlength*cos(\zangle)}
\pgfmathsetmacro{\zy}{\zlength*sin(\zangle)}
\begin{tikzpicture}
[ x={(\xx cm,\xy cm)},
y={(\yx cm,\yy cm)},
z={(\zx cm,\zy cm)},
]
\foreach \a in {0,...,\dimension}
{ \foreach \b in {0,...,\dimension}
{ \pgfmathsetmacro{\c}{100-\a*7-\b*7}
\draw[canvas is xy plane at z=\a, black!\c] (\b,0) -- (\b,\dimension) (0,\b) -- (\dimension,\b);
\draw[canvas is xz plane at y=\a, black!\c] (\b,0) -- (\b,\dimension) (0,\b) -- (\dimension,\b);
\draw[canvas is yz plane at x=\a, black!\c] (\b,0) -- (\b,\dimension) (0,\b) -- (\dimension,\b);
}
}
\foreach \a in {0,...,\dimension}
{ \foreach \b in {0,...,\dimension}
{ \foreach \c in {0,...,\dimension}
{ \fill (\a,\b,\c) circle (0.05cm);
}
}
}
\end{tikzpicture}
\end{document}
Result
Edit 1: Some improvements: The fading computation is better, and the cuboid is constructed from back to front (if zangle≈270
, yangle≈150
, xangle≈30
). Does it have to be a cube, or is a cuboid sufficient?
Code
\documentclass[tikz]{standalone}
\usetikzlibrary{3d}
\usepackage{xifthen}
\begin{document}
\newcommand{\xangle}{11}
\newcommand{\yangle}{133}
\newcommand{\zangle}{270}
\newcommand{\xlength}{1}
\newcommand{\ylength}{1}
\newcommand{\zlength}{1}
% nice result for 30 150 270 1 1.414 1.732
% nice result for 11 133 270 1 1 1
\newcommand{\dimension}{6}% actually dimension-1
\pgfmathsetmacro{\xx}{\xlength*cos(\xangle)}
\pgfmathsetmacro{\xy}{\xlength*sin(\xangle)}
\pgfmathsetmacro{\yx}{\ylength*cos(\yangle)}
\pgfmathsetmacro{\yy}{\ylength*sin(\yangle)}
\pgfmathsetmacro{\zx}{\zlength*cos(\zangle)}
\pgfmathsetmacro{\zy}{\zlength*sin(\zangle)}
\begin{tikzpicture}
[ x={(\xx cm,\xy cm)},
y={(\yx cm,\yy cm)},
z={(\zx cm,\zy cm)},
]
\foreach \x in {\dimension,...,0}
{ \foreach \y in {\dimension,...,0}
{ \foreach \z in {\dimension,...,0}
{ \pgfmathsetmacro{\c}{100-(\x*\y*\z)/(\dimension*\dimension*\dimension)*95}
\ifthenelse{\x>0}
{\draw[black!\c] (\x,\y,\z) -- (\x-1,\y,\z);}{}
\ifthenelse{\y>0}
{\draw[black!\c] (\x,\y,\z) -- (\x,\y-1,\z);}{}
\ifthenelse{\z>0}
{\draw[black!\c] (\x,\y,\z) -- (\x,\y,\z-1);}{}
\fill[red!\c] (\x,\y,\z) circle (0.05cm);
}
}
}
\foreach \x/\y/\z/\lab in {0/0/4/Bla,1/5/0/Bli,1/1/1/Blubb}
{ \fill[blue] (\x,\y,\z) circle (0.05cm) node[fill=white,rounded corners=2mm,fill opacity=0.5,text opacity=1,above right,inner sep=2pt] {\lab};
}
\end{tikzpicture}
\end{document}
Output
Output cuboid
\newcommand{\xangle}{30}
\newcommand{\yangle}{150}
\newcommand{\zangle}{270}
\newcommand{\xlength}{1}
\newcommand{\ylength}{1.414}
\newcommand{\zlength}{1.732}
Best Answer
Here is a possible realisation of a more realistic cloud (and sun and ground).
I have used the shadows library, see Section 66. Shadows in the TikZ & PGF manual (version 3.0.0). For the clouds I have only drawn circles that overlap each other in a quite regular grid (see the code below the comment
% cloud
). If you want something else, you can draw (not entirely) overlapping shapes in a more irregular way to achieve a more natural look.