I want to draw some ellipses and then transform the ellipse without changing its area.
I want to be able to transform the ellipse according to the following two equations;
First transformation:
∆y = constant * x and ∆x = 0
where x is the horizontal position of the coordinate and ∆y the change of the vertical (y) position
Second transformation
∆x = constant * y and ∆y = 0
where y is the vertical position of the coordinate and ∆x the change of the horizontal (x) position
In the first picture I start with an horizontal ellipse (see attached figure) which contains some red and blue lines which also need to be transformed.
This ellipse is transformed using the first transformation (got this working...)
I cannot get the second transformation to work (see Image 3...) I use a rotation but this is not correct because it does not hold equation 2, I do not know how to use scope for this...
The fourth image is again the first transformation but this does not want to work anymore....
Can anyone help ?
Thanks.
here is my latex code
\documentclass[11pt]{article}
\usepackage{tikz}
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
\usetikzlibrary{calc}
\begin{document}
\newcommand{\addphasespace}[5]{
\begin{scope}[xshift=#1]
\draw (-1.5,-1.5) rectangle (1.5,1.5);
\draw (-1.5,0) -- (1.5,0);
\draw (0,-1.5) -- (0,1.5);
\node[inner sep=1pt,font=\large] at (0,-1.75) {$x$};
\node[inner sep=1pt,font=\large] at (1.75,0) {$y$};
\node[inner sep=1pt,font=\large] at (0,1.9) {#5};
\begin{scope}[#4]
\fill[black!20,yshift=0cm] (0,0) circle (#2 and #3);
\draw[yshift=0cm,red] (-#2,0) -- (#2,0);
\draw[yshift=0cm,blue] (0,-#3) -- (0,#3);
\draw[yshift=0cm,blue] (0.1,-0.195) -- (0.1,0.195);
\draw[yshift=0cm,blue] (-0.1,-0.195) -- (-0.1,0.195);
\draw[yshift=0cm,blue] (0.2,-0.19) -- (0.2,0.19);
\draw[yshift=0cm,blue] (-0.2,-0.19) -- (-0.2,0.19);
\draw[yshift=0cm,blue] (0.3,-0.18) -- (0.3,0.18);
\draw[yshift=0cm,blue] (-0.3,-0.18) -- (-0.3,0.18);
\draw[yshift=0cm,blue] (0.4,-0.17) -- (0.4,0.17);
\draw[yshift=0cm,blue] (-0.4,-0.17) -- (-0.4,0.17);
\draw[yshift=0cm,blue] (0.5,-0.158) -- (0.5,0.158);
\draw[yshift=0cm,blue] (-0.5,-0.158) -- (-0.5,0.158);
\draw[yshift=0cm,blue] (0.6,-0.135) -- (0.6,0.135);
\draw[yshift=0cm,blue] (-0.6,-0.135) -- (-0.6,0.135);
\draw[yshift=0cm,blue] (0.7,-0.1) -- (0.7,0.1);
\draw[yshift=0cm,blue] (-0.7,-0.1) -- (-0.7,0.1);
\draw[yshift=0cm] (0,0) circle (#2 and #3);
\end{scope}
\end{scope}
}
%%%%%%%%%%%%%%%
\begin{figure}
\begin{tikzpicture}
\draw[help lines] (-3,-3) grid (15,3);
% area ellipse = pi*0.8*0.2 = 0.5026
%Plot1
\addphasespace{0cm}{0.8}{0.2}{}{1}
%Plot2
\draw[->] (4.8,0) -- (4.8,-0.85);
\draw[->] (3.2,0) -- (3.2,0.85);
\addphasespace{4cm}{0.8}{0.2}{opacity = 0.3}{2}
\addphasespace{4cm}{0.8}{0.2}{x={(1,-1.3)}}{2}
%%Plot3
\draw[->] (7.2,1.05) -- (7.9,1.05);
\draw[->] (8.8,-1.05) -- (8.1,-1.05);
\addphasespace{8cm}{0.8}{0.2}{opacity = 0.3,x={(1,-1.3)}}{3}
\addphasespace{8cm}{0.8}{0.2}{x={(1,-1.3)},rotate=-37.57}{3}
%%Plot3
\draw[->] (12.82,1.05) -- (12.82,0.1);
\draw[->] (11.18,-1.05) -- (11.18,0.1);
\addphasespace{12cm}{0.8}{0.2}{opacity = 0.3 ,x={(1,-1.3)},rotate=-75.14}{4}
\addphasespace{12cm}{0.8}{0.2}{x={(1,-1.3)},rotate=-127.57,x={(1,-1.5)}}{4}
\end{tikzpicture}
\end{figure}
\end{document}