We Recommend

Learning Perl Learning Perl
In this smooth, carefully paced course, a leading Perl trainer teaches you to program in the language that threatens to make C, sed, awk, and the Unix shell obsolete for many tasks. This book is the "official" guide for both formal (classroom) and informal learning. It is fully accessible to the novice programmer.


Ballyhoo


Posted By

tkf on 04/13/08


Tagged

math pstrick figure


Versions (?)


PSTrick: Manifold and Tangent Space


Published in: LaTeX 


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/

PSTrickで書いた多様体の図


  1. \documentclass[12pt]{article}
  2. \usepackage{pstricks} % To use the standard "xcolor" package with PSTricks
  3. %
  4. %%%%%%%%%%%%%%%%%%%%%%%%%%%%% Draw manifold and tangent sapce %%%%%%%%%%%
  5. \newcommand{\ManAndTan}[6]{%
  6. \rput(#1){%
  7. % Manifold と Tangent Space はそれぞれ二回描画してるので変更の時は注意
  8. % Manifold
  9. \psccurve[framearc=0.3,
  10. fillstyle=solid,
  11. fillcolor=lightgray]%背景色
  12. (-1,-1)(0,-1.5)(2,-1.2)(2.6,-0.4)(1,2)(-1,1)
  13. % Tangent Space
  14. \pspolygon[fillstyle=solid,
  15. fillcolor=white,%背景色
  16. linestyle=none]
  17. (-1,0)(0,-1)(2.5,1.5)(1.5,2.5)
  18. % Draw curve on the manifold
  19. \begin{psclip}{% No background and no line
  20. \psccurve[framearc=0.3,
  21. linestyle=none]
  22. (-1,-1)(0,-1.5)(2,-1.2)(2.6,-0.4)(1,2)(-1,1)
  23. }
  24. \psbezier[linecolor=gray](-1,-1)(0,0)(2,2)(2,-2)% cliped curve
  25. \end{psclip}
  26. % Tangent Space
  27. \pspolygon(-1,0)(0,-1)(2.5,1.5)(1.5,2.5)
  28. % Tangent Vector
  29. \psline[linewidth=2pt]{*->}(0,0)(1.5,1.5)
  30. % 文字
  31. \rput(-0.8, 1.7){#2}% M
  32. \rput( 2.5, 2.2){#3}% T_m M
  33. \rput( 1 , 1.4){#4}% v
  34. \rput( 1.6,-0.5){#5}% c(t)
  35. \rput(-0.4, 0 ){#6}% m
  36. }
  37. }%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  38. %%%%%%%%%%%%%%%%%%%%%%%%%%%%% Draw chat on Euclid space %%%%%%%%%%%%%%%%%
  39. \newcommand{\EuclidSpace}[4]{%
  40. \rput(#1){%
  41. \psline{->}(-1,0)(2,0)
  42. \psline{->}(0,-1)(0,2)
  43. \begin{psclip}{% No background and no line
  44. \psccurve[framearc=0.3](-0.5,-0.5)(0.5,-0.8)(1.5,0)(1.1,1.4)(-0.5,1)
  45. }
  46. \psbezier[linecolor=lightgray](-1,-1)(0,0)(2,2)(2,-2)% cliped curve
  47. \end{psclip}
  48. \rput(0.4,2.2){#2}
  49. \rput(1.5,1.5){#3}
  50. \rput(0.7,0.7){#4}
  51. }
  52. }%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  53. \pagestyle{empty}
  54. \begin{document}
  55.  
  56. \psset{linewidth=1pt,arrowsize=0.2}%,showpoints=true}
  57.  
  58. \begin{pspicture}*(-2,-2)(11,11)
  59. % TM
  60. \ManAndTan{0,3}{$M$}{$T_m M$}{$v$}{$c(t)$}{$m$}
  61. \ManAndTan{5,7}{$N$}{$T_n N$}{$w$}{$f \circ c(t)$}{$n$}
  62. \ManAndTan{8,3}{$P$}{$T_p P$}{}{$g \circ f \circ c(t)$}{$p$}
  63. % R^m
  64. \EuclidSpace{0,8}{$R^m$}{$U$}{$\varphi(c(t))$}
  65. % R
  66. \psline{->}(-1,0)(2,0)
  67. \rput(2.2,0.3){$t \in R$}
  68. % 線種をdashedに設定. 以下で描く矢印に適用
  69. \psset{linestyle=dashed}
  70. % -> \phi
  71. \pscurve{->}(0,3)(-0.5,5.5)(0,8)
  72. \rput(-0.2,6){$\varphi$}
  73. % c(t)
  74. \pscurve{->}(0,0)(-0.2,1)(0,3)
  75. \rput(0.1,1){$c$}
  76. % f
  77. \pscurve{->}(0,3)(4,4)(5,7)
  78. \pscurve{->}(5,7)(6.5,5)(8,3)
  79. \rput(4,3.5){$f$}
  80. \rput(6.5,4.6){$g$}
  81. % g
  82. \pscurve{->}(1,4)(3,7)(6,8)
  83. \pscurve{->}(6,8)(8.4,6.5)(9,4)
  84. \rput(2.3,7){$T_m f$}
  85. \rput(8.2,6){$T_n g$}
  86. % グリッドを描く
  87. %\psgrid(0,0)(-2,-2)(11,11)
  88. \end{pspicture}
  89.  
  90. \end{document}

Report this snippet 

You need to login to post a comment.