Return to Snippet

Revision: 5927
at April 13, 2008 04:55 by tkf


Updated Code
\documentclass[12pt]{article}
\usepackage{pstricks} % To use the standard "xcolor" package with PSTricks
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Draw manifold and tangent sapce %%%%%%%%%%%
\newcommand{\ManAndTan}[6]{%
 \rput(#1){%
 % Manifold と Tangent Space はそれぞれ二回描画してるので変更の時は注意
   % Manifold
   \psccurve[framearc=0.3,
             fillstyle=solid,
             fillcolor=lightgray]%背景色
	     (-1,-1)(0,-1.5)(2,-1.2)(2.6,-0.4)(1,2)(-1,1)
   % Tangent Space
   \pspolygon[fillstyle=solid,
              fillcolor=white,%背景色
	      linestyle=none]
	      (-1,0)(0,-1)(2.5,1.5)(1.5,2.5)
   % Draw curve on the manifold
   \begin{psclip}{% No background and no line
    \psccurve[framearc=0.3, 
              linestyle=none]
              (-1,-1)(0,-1.5)(2,-1.2)(2.6,-0.4)(1,2)(-1,1)
    }
    \psbezier[linecolor=gray](-1,-1)(0,0)(2,2)(2,-2)% cliped curve
   \end{psclip}
   % Tangent Space
   \pspolygon(-1,0)(0,-1)(2.5,1.5)(1.5,2.5)
   % Tangent Vector
   \psline[linewidth=2pt]{*->}(0,0)(1.5,1.5)
   % 文字
   \rput(-0.8, 1.7){#2}% M
   \rput( 2.5, 2.2){#3}% T_m M
   \rput( 1  , 1.4){#4}% v
   \rput( 1.6,-0.5){#5}% c(t)
   \rput(-0.4, 0  ){#6}% m
 }
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Draw chat on Euclid space %%%%%%%%%%%%%%%%%
\newcommand{\EuclidSpace}[4]{%
 \rput(#1){%
  \psline{->}(-1,0)(2,0)
  \psline{->}(0,-1)(0,2)
   \begin{psclip}{% No background and no line
    \psccurve[framearc=0.3](-0.5,-0.5)(0.5,-0.8)(1.5,0)(1.1,1.4)(-0.5,1)
    }
    \psbezier[linecolor=lightgray](-1,-1)(0,0)(2,2)(2,-2)% cliped curve
   \end{psclip}
  \rput(0.4,2.2){#2}
  \rput(1.5,1.5){#3}
  \rput(0.7,0.7){#4}
 }
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{empty}
\begin{document}

\psset{linewidth=1pt,arrowsize=0.2}%,showpoints=true}

\begin{pspicture}*(-2,-2)(11,11)
 % TM
 \ManAndTan{0,3}{$M$}{$T_m M$}{$v$}{$c(t)$}{$m$}
 \ManAndTan{5,7}{$N$}{$T_n N$}{$w$}{$f \circ c(t)$}{$n$}
 \ManAndTan{8,3}{$P$}{$T_p P$}{}{$g \circ f \circ c(t)$}{$p$}
 % R^m
 \EuclidSpace{0,8}{$R^m$}{$U$}{$\varphi(c(t))$}
 % R
 \psline{->}(-1,0)(2,0)
 \rput(2.2,0.3){$t \in R$}
 % 線種をdashedに設定. 以下で描く矢印に適用
 \psset{linestyle=dashed}
 % -> \phi
 \pscurve{->}(0,3)(-0.5,5.5)(0,8)
 \rput(-0.2,6){$\varphi$}
 % c(t)
 \pscurve{->}(0,0)(-0.2,1)(0,3)
 \rput(0.1,1){$c$}
 % f
 \pscurve{->}(0,3)(4,4)(5,7)
 \pscurve{->}(5,7)(6.5,5)(8,3)
 \rput(4,3.5){$f$}
 \rput(6.5,4.6){$g$}
 % g
 \pscurve{->}(1,4)(3,7)(6,8)
 \pscurve{->}(6,8)(8.4,6.5)(9,4)
 \rput(2.3,7){$T_m f$}
 \rput(8.2,6){$T_n g$}
 % グリッドを描く
 %\psgrid(0,0)(-2,-2)(11,11)
\end{pspicture}

\end{document}

Revision: 5926
at April 13, 2008 04:51 by tkf


Updated Code
\documentclass[12pt]{article}
\usepackage{pstricks} % To use the standard "xcolor" package with PSTricks
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Draw manifold and tangent sapce %%%%%%%%%%%
\newcommand{\ManAndTan}[6]{%
 \rput(#1){%
 % Manifold � Tangent Space �������������������注�
   % Manifold
   \psccurve[framearc=0.3,
             fillstyle=solid,
             fillcolor=lightgray]%���
	     (-1,-1)(0,-1.5)(2,-1.2)(2.6,-0.4)(1,2)(-1,1)
   % Tangent Space
   \pspolygon[fillstyle=solid,
              fillcolor=white,%���
	      linestyle=none]
	      (-1,0)(0,-1)(2.5,1.5)(1.5,2.5)
   % Draw curve on the manifold
   \begin{psclip}{% No background and no line
    \psccurve[framearc=0.3, 
              linestyle=none]
              (-1,-1)(0,-1.5)(2,-1.2)(2.6,-0.4)(1,2)(-1,1)
    }
    \psbezier[linecolor=gray](-1,-1)(0,0)(2,2)(2,-2)% cliped curve
   \end{psclip}
   % Tangent Space
   \pspolygon(-1,0)(0,-1)(2.5,1.5)(1.5,2.5)
   % Tangent Vector
   \psline[linewidth=2pt]{*->}(0,0)(1.5,1.5)
   % ��
   \rput(-0.8, 1.7){#2}% M
   \rput( 2.5, 2.2){#3}% T_m M
   \rput( 1  , 1.4){#4}% v
   \rput( 1.6,-0.5){#5}% c(t)
   \rput(-0.4, 0  ){#6}% m
 }
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Draw chat on Euclid space %%%%%%%%%%%%%%%%%
\newcommand{\EuclidSpace}[4]{%
 \rput(#1){%
  \psline{->}(-1,0)(2,0)
  \psline{->}(0,-1)(0,2)
   \begin{psclip}{% No background and no line
    \psccurve[framearc=0.3](-0.5,-0.5)(0.5,-0.8)(1.5,0)(1.1,1.4)(-0.5,1)
    }
    \psbezier[linecolor=lightgray](-1,-1)(0,0)(2,2)(2,-2)% cliped curve
   \end{psclip}
  \rput(0.4,2.2){#2}
  \rput(1.5,1.5){#3}
  \rput(0.7,0.7){#4}
 }
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{empty}
\begin{document}

\psset{linewidth=1pt,arrowsize=0.2}%,showpoints=true}

\begin{pspicture}*(-2,-2)(11,11)
 % TM
 \ManAndTan{0,3}{$M$}{$T_m M$}{$v$}{$c(t)$}{$m$}
 \ManAndTan{5,7}{$N$}{$T_n N$}{$w$}{$f \circ c(t)$}{$n$}
 \ManAndTan{8,3}{$P$}{$T_p P$}{}{$g \circ f \circ c(t)$}{$p$}
 % R^m
 \EuclidSpace{0,8}{$R^m$}{$U$}{$\varphi(c(t))$}
 % R
 \psline{->}(-1,0)(2,0)
 \rput(2.2,0.3){$t \in R$}
 % �種�dashed�設�. 以���������
 \psset{linestyle=dashed}
 % -> \phi
 \pscurve{->}(0,3)(-0.5,5.5)(0,8)
 \rput(-0.2,6){$\varphi$}
 % c(t)
 \pscurve{->}(0,0)(-0.2,1)(0,3)
 \rput(0.1,1){$c$}
 % f
 \pscurve{->}(0,3)(4,4)(5,7)
 \pscurve{->}(5,7)(6.5,5)(8,3)
 \rput(4,3.5){$f$}
 \rput(6.5,4.6){$g$}
 % g
 \pscurve{->}(1,4)(3,7)(6,8)
 \pscurve{->}(6,8)(8.4,6.5)(9,4)
 \rput(2.3,7){$T_m f$}
 \rput(8.2,6){$T_n g$}
 % �������
 %\psgrid(0,0)(-2,-2)(11,11)
\end{pspicture}

\end{document}

Revision: 5925
at April 13, 2008 04:48 by tkf


Initial Code
\documentclass[12pt]{article}
\usepackage{pstricks} % To use the standard "xcolor" package with PSTricks
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Draw manifold and tangent sapce %%%%%%%%%%%
\newcommand{\ManAndTan}[6]{%
 \rput(#1){%
 % Manifold と Tangent Space はそれぞれ二回描画してるので変更の時は注意
   % Manifold
   \psccurve[framearc=0.3,
             fillstyle=solid,
             fillcolor=lightgray]%背景色
	     (-1,-1)(0,-1.5)(2,-1.2)(2.6,-0.4)(1,2)(-1,1)
   % Tangent Space
   \pspolygon[fillstyle=solid,
              fillcolor=white,%背景色
	      linestyle=none]
	      (-1,0)(0,-1)(2.5,1.5)(1.5,2.5)
   % Draw curve on the manifold
   \begin{psclip}{% No background and no line
    \psccurve[framearc=0.3, 
              linestyle=none]
              (-1,-1)(0,-1.5)(2,-1.2)(2.6,-0.4)(1,2)(-1,1)
    }
    \psbezier[linecolor=gray](-1,-1)(0,0)(2,2)(2,-2)% cliped curve
   \end{psclip}
   % Tangent Space
   \pspolygon(-1,0)(0,-1)(2.5,1.5)(1.5,2.5)
   % Tangent Vector
   \psline[linewidth=2pt]{*->}(0,0)(1.5,1.5)
   % 文字
   \rput(-0.8, 1.7){#2}% M
   \rput( 2.5, 2.2){#3}% T_m M
   \rput( 1  , 1.4){#4}% v
   \rput( 1.6,-0.5){#5}% c(t)
   \rput(-0.4, 0  ){#6}% m
 }
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Draw chat on Euclid space %%%%%%%%%%%%%%%%%
\newcommand{\EuclidSpace}[4]{%
 \rput(#1){%
  \psline{->}(-1,0)(2,0)
  \psline{->}(0,-1)(0,2)
   \begin{psclip}{% No background and no line
    \psccurve[framearc=0.3](-0.5,-0.5)(0.5,-0.8)(1.5,0)(1.1,1.4)(-0.5,1)
    }
    \psbezier[linecolor=lightgray](-1,-1)(0,0)(2,2)(2,-2)% cliped curve
   \end{psclip}
  \rput(0.4,2.2){#2}
  \rput(1.5,1.5){#3}
  \rput(0.7,0.7){#4}
 }
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{empty}
\begin{document}

\psset{linewidth=1pt,arrowsize=0.2}%,showpoints=true}

\begin{pspicture}*(-2,-2)(11,11)
 % TM
 \ManAndTan{0,3}{$M$}{$T_m M$}{$v$}{$c(t)$}{$m$}
 \ManAndTan{5,7}{$N$}{$T_n N$}{$w$}{$f \circ c(t)$}{$n$}
 \ManAndTan{8,3}{$P$}{$T_p P$}{}{$g \circ f \circ c(t)$}{$p$}
 % R^m
 \EuclidSpace{0,8}{$R^m$}{$U$}{$\varphi(c(t))$}
 % R
 \psline{->}(-1,0)(2,0)
 \rput(2.2,0.3){$t \in R$}
 % 線種をdashedに設定. 以下で描く矢印に適用
 \psset{linestyle=dashed}
 % -> \phi
 \pscurve{->}(0,3)(-0.5,5.5)(0,8)
 \rput(-0.2,6){$\varphi$}
 % c(t)
 \pscurve{->}(0,0)(-0.2,1)(0,3)
 \rput(0.1,1){$c$}
 % f
 \pscurve{->}(0,3)(4,4)(5,7)
 \pscurve{->}(5,7)(6.5,5)(8,3)
 \rput(4,3.5){$f$}
 \rput(6.5,4.6){$g$}
 % g
 \pscurve{->}(1,4)(3,7)(6,8)
 \pscurve{->}(6,8)(8.4,6.5)(9,4)
 \rput(2.3,7){$T_m f$}
 \rput(8.2,6){$T_n g$}
 % グリッドを描く
 %\psgrid(0,0)(-2,-2)(11,11)
\end{pspicture}

\end{document}

Initial URL
http://arataka.wordpress.com/2008/04/13/pstrick%e3%81%a7%e5%a4%9a%e6%a7%98%e4%bd%93%e3%81%ae%e5%9b%b3/

Initial Description
PSTrickで書いた多様体の図

Initial Title
PSTrick: Manifold and Tangent Space

Initial Tags
math

Initial Language
LaTeX