File:Lissajous phase.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 785 × 745 pixels, file size: 130 KB)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: Figure showing several Lissajous figures for different phase delays. [1] was used for reference.
    Date
    Source Own work
    Author Krishnavedala
    SVG development
    InfoField
     The SVG code is valid.
     This diagram was created with LaTeX and converted to SVG using dvisvgm.
    LaTeX source code
    \documentclass[10pt,border=0pt,tikz,class=scrartcl,multi=false]{standalone}
    \usepackage[T1]{fontenc}
    \usepackage[latin1]{inputenc}
    \usepackage{lmodern}
    \usepackage{mathtools,amssymb,gensymb}
    \usepackage{pgfplots}
    \usepackage{ifthen}
    \pgfplotsset{compat=1.10}
    \usetikzlibrary{positioning,calc,arrows,fit,backgrounds,decorations.text,shapes,matrix}
    
    \title {Lissajous phase}
    \author{Krishnatej Vedala}
    
    \def\amplitude{1}
    \newcommand{\LissajousCurve}[1]{
    	\begin{tikzpicture}[anchor=center]\begin{axis}[draw, axis equal, clip=false,
    	axis lines=center,
    	xtick=\empty, ytick=\empty,
    	xmin=-\amplitude-0.1, ymin=-\amplitude-0.1, xmax=\amplitude+0.1, ymax=\amplitude+0.4,
    	xlabel={\Large$x(t)$}, ylabel={\Large$y(t)$}]
    	\addplot[samples=100, domain=0:1, line width=2.5pt, variable=\t, >->] ({\amplitude*sin(deg(2*pi*t))},{\amplitude*sin(deg(2*pi*t)+#1)});
    	\addplot[black,dotted] coordinates {
    		(-\amplitude,\amplitude) (\amplitude,\amplitude) 
    		(\amplitude,-\amplitude) (-\amplitude,-\amplitude) 
    		(-\amplitude,\amplitude)};
    	\end{axis}\end{tikzpicture}
    }
    
    \tikzset{
    	plots/.style = {
    		inner sep      = 0pt,
    		align          = center,
    		font           = \normalsize,
    		transform shape,
    		anchor = center,
    		thick
    	},
    	graph/.style = {draw = none, scale = .75},
    	info/.style = {font = \footnotesize, draw = none}
    }
    
    \tikzset{
    	pics/graph_pic/.style n args = {3}{code={
    		\node (-g) [scale=.65, plots, graph] {\LissajousCurve{#1}};
    		\begin{scope}[x=(-g.south west), y=(-g.south), yshift=-6.6em]
    		\node [plots, info] {
    			$\underbrace{
    				\left\{\begin{aligned}
    				x(t)&=\sin(2\pi t)\\[-5pt]
    				y(t)&=\sin\left(2\pi t-#2\right)
    				\end{aligned}\right.}_{
    				\begin{array}{@{}c@{}}
    				\delta=#1^\circ\\
    				\text{#3}
    				\end{array}}$
    		};
    		\node (-c) [fit = (-g.north east), inner sep = 0pt] {};
    		\end{scope}
    	}}
    }
    
    \pagestyle{empty}
    \begin{document}
    \begin{tikzpicture}[thick,auto,>=stealth']
    \def\pp{10}
    
    	\fill [fill=black!40] (0,0) rectangle (\pp,\pp);
    	\fill [fill=black!40] (0,0) rectangle (-\pp,-\pp);
    	\fill [fill=black!10] (0,0) rectangle (-\pp,\pp);
    	\fill [fill=black!10] (0,0) rectangle (\pp,-\pp);
    
    	\draw [decorate, decoration={brace,amplitude=17pt}] (0,\pp) -- node [pos=.5,anchor=south,yshift=15pt] { Positive slope (I \& IV)} (\pp,\pp);
    	\draw [decorate, decoration={brace,amplitude=17pt}] (-\pp,\pp) -- node [pos=.5,anchor=south,yshift=15pt] { Negative slope (II \& III)} (0,\pp);
    	\draw [decorate, decoration={brace,amplitude=17pt}] (\pp,\pp) -- node [pos=.5,anchor=south,xshift=15pt,rotate=-90] { Clockwise (I \& II)} (\pp,0);
    	\draw [decorate, decoration={brace,amplitude=17pt}] (\pp,0) -- node [pos=.5,anchor=south,xshift=15pt,rotate=-90] { Counter clockwise (III \& IV)} (\pp,-\pp);
    
    	\node [anchor=north east] at (\pp,\pp) {\Large\textrm I};
    	\node [anchor=north west] at (-\pp,\pp) {\Large\textup{II}};
    	\node [anchor=south west] at (-\pp,-\pp) {\Large\textup{III}};
    	\node [anchor=south east] at (\pp,-\pp) {\Large\textup{IV}};
    
    	\foreach[count=\i] \angle/\a/\b/\c in 
    	{-315/7\pi/4/,
    	-270/3\pi/2/(in ``quadrature''),
    	-225/5\pi/4/,
    	-180/\pi//(inverted),
    	-135/3\pi/4/,
    	-90/\pi/2/(in ``quadrature''),
    	-45/\pi/4/,
    	0/0//(in phase)}{
    		\ifthenelse{\equal{\angle}{-270}}{\def\len{7.8}}{\def\len{6.8}}
    		\ifthenelse{\equal{\b}{}}{
    			\path pic (g-\i) at +(45*\i:\len) {graph_pic={\angle}{\a}{\c}};
    		}{
    			\path pic (g-\i) at +(45*\i:\len) {graph_pic={\angle}{\frac{\a}{\b}}{\c}};
    		}
    		\ifthenelse{\equal{\angle}{-270}}{
    			\draw[dashed, semithick] (0,0) -- node [near end, sloped, above] 
    			{\footnotesize$\delta=\angle^\circ$} ($(g-\i-g)-(0,8em)$);
    		}{
    			\draw[dashed, semithick] (0,0) -- node [near end, sloped, above] 
    			{\footnotesize$\delta=\angle^\circ$} (g-\i-g);
    		}
    	}
    
    	\draw [->, semithick, postaction={decorate, decoration={
    		text along path, text={Increasing phase shift}, text align={center,left indent=3mm},raise=3pt}
    	}] (1.5,0) arc (0:-315:1.5);
    
    	\node [draw=black, thick, dashed, rectangle, rotate=90, align=center, anchor=south] at (-\pp-0.1,0) {\large
    		LTI Lissajous figures are \textbf{ovals} with \emph{eccentricity} and\\
    		\emph{direction of rotation} determined by phase shift $\delta$.
    	};
    \end{tikzpicture}
    \end{document}
    

    Licensing

    I, the copyright holder of this work, hereby publish it under the following licenses:
    w:en:Creative Commons
    attribution share alike
    This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
    You are free:
    • to share – to copy, distribute and transmit the work
    • to remix – to adapt the work
    Under the following conditions:
    • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
    • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
    GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
    You may select the license of your choice.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    20 August 2014

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current00:15, 24 April 2015Thumbnail for version as of 00:15, 24 April 2015785 × 745 (130 KB)wikimediacommons>Krishnavedalafixed issues

    There are no pages that use this file.