%
%tmtmath.sty <'04--'16/06/11> by H.TOMITA (better require 'pict2e')
%Encoding: Unicode(UTF-8)
%
%------------------------------------------------------------------------------------------------
%<!<< 変数とスイッチの定義 >>>
%（座標関連）
\newcount\POS \newcount\LEN                          %[位置変数、軸の長さ]
\newcount\C   \newcount\T     \newcount\ANG          %[カウンタ変数、目盛変数、角度変数]
\newcount\gx  \newcount\gy                           %[dotsgrid用]
\def\sw@null{}
\def\sw@g{g}                                         %[グリッド]
\def\sw@A{A}  \def\sw@Ag{Ag}  \def\sw@gA{gA}         %[原点O、軸名称x,yのみ]
\def\sw@R{R}  \def\sw@Rg{Rg}  \def\sw@gR{gR}         %[実数目盛]
\def\sw@I{I}  \def\sw@Ig{Ig}  \def\sw@gI{gI}         %[虚数目盛]
\def\sw@P{P}  \def\sw@Pg{Pg}  \def\sw@gP{gP}         %[実radian目盛]
\def\sw@d{d}  \def\sw@dg{dg}  \def\sw@gd{gd}         %[degree目盛]
\def\sw@r{r}  \def\sw@rg{rg}  \def\sw@gr{gr}         %[radian目盛]
\def\sw@p{+}  \def\sw@m{-}                           %[2次曲線などの正、負]
\def\sw@x{x}  \def\sw@cln{:}                         %[交差破線、破線オプション]
\def\sw@b{b}  \def\sw@xb{xb}  \def\sw@bx{bx}         %[黒丸(for location)]
\def\sw@w{w}  \def\sw@xw{xw}  \def\sw@wx{wx}         %[白丸(for location)]
\def\sw@B{B}  \def\sw@xB{xB}  \def\sw@Bx{Bx}
\def\sw@W{W}  \def\sw@xW{xW}  \def\sw@Wx{Wx}
%（実数計算）
\newcount\Cnt \newcount\sgn   \newcount\Tms          %[除算カウンタ、符号、繰返し回数]
\newdimen\@prevx                                     %[直前のx]
%（関数計算）
\newcount\deg  \newcount\degc \newcount\bdeg         %[度、位相、基本角]
\newcount\anti                                       %[基本真数]
\newdimen\@a \newdimen\@b \newdimen\@c \newdimen\@d  %[係数・定数]
\newdimen\@tempx \newdimen\@tempy \newdimen\@tempq   %[臨時変数（x,~y座標、平方根）]
\newdimen\@steps \newdimen\@cyc                      %[区間幅、sin, tan周期]
\newdimen\@lx  \newdimen\@ly                         %[左座標(lx, ly)]
\newdimen\@rx  \newdimen\@ry                         %[右座標(rx, ry)]
\newdimen\@mx  \newdimen\@my  \newdimen\@ex          %[中点(mx, my)、終点x座標]
\newdimen\@ut  \newdimen\@vt  \newdimen\@et          %[parameter値（前、後、終）、退避変数]
\newdimen\@one \newdimen\@two \newdimen\@thr         %[係数・定数(for TaylorSeries)]
\newdimen\@fou \newdimen\@fiv \newdimen\@six         %[係数・定数(for TaylorSeries)]
\newdimen\@xBGN\newdimen\@yBGN                       %[破線始点座標(lx, ly)]
\newdimen\@xCUR\newdimen\@yCUR\newdimen\@dLEN        %[破線現座標(rx, ry)、破線の線分長]
%（座標計算）
\newdimen\@Xa  \newdimen\@Ya                         %[分点、交点等の座標1]
\newdimen\@Xb  \newdimen\@Yb                         %[分点、交点等の座標2]
\newdimen\@Xc  \newdimen\@Yc                         %[分点、交点等の座標3]
\newdimen\@Xd  \newdimen\@Yd                         %[分点、交点等の座標4]
\newdimen\@Xe  \newdimen\@Ye                         %[分点、交点等の座標5]
\newdimen\@Xf  \newdimen\@Yf                         %[分点、交点等の座標6]
\newdimen\@Xg  \newdimen\@Yg                         %[分点、交点等の座標7]
\newdimen\@Xh  \newdimen\@Yh                         %[分点、交点等の座標8]
\newdimen\@Xi  \newdimen\@Yi                         %[分点、交点等の座標9]
\newdimen\@XZ  \newdimen\@YZ                         %[\X0, \Y0用レジスタ]
\newdimen\@Da  \newdimen\@Db  \newdimen\@DZ          %[2点間の距離D1、D2、\D0用レジスタ]
\newdimen\@VXa \newdimen\@VYa                        %[vparade用レジスタ1]
\newdimen\@VXb \newdimen\@VYb                        %[vparade用レジスタ2]
\newdimen\@VXc \newdimen\@VYc                        %[vparade用レジスタ3]
\newdimen\@VXd \newdimen\@VYd                        %[vparade用レジスタ4]
\newdimen\@pushxa\newdimen\@pushya                   %[退避用レジスタ1(for vparade)]
\newdimen\@pushxb\newdimen\@pushyb                   %[退避用レジスタ2(for vparade)]
\newdimen\@pushxc\newdimen\@pushyc                   %[退避用レジスタ3(for vparade)]
\newdimen\@pushxd\newdimen\@pushyd                   %[退避用レジスタ4(for vparade)]
%（3D座標軸）
\newdimen\@tanth \newdimen\@costh                    %[水平回転値]
\newdimen\@tanph \newdimen\@cosph                    %[垂直回転値]
\newdimen\@guidex\newdimen\@guidey                   %[3Dガイド用レジスタ]

%------------------------------------------------------------------------------------------------
%<!<< 実数計算ルーティン >>>
\def\dimensum(#1,#2){{%
  \@tempdima=#1\p@ \@tempdimb=#2\p@
  \dimen@=\@tempdima
  \global\advance\dimen@\@tempdimb
}}
\def\dimenmul(#1,#2){{%
  \@tempdima=#1\p@ \@tempdimb=#2\p@
  \dimen@=\@tempdima
  \global\dimen@=\strip@pt\dimen@\@tempdimb
}}
\def\dimendiv(#1,#2){{%
  \@tempdima=#1\p@ \@tempdimb=#2\p@ \@tempdimc=0\p@
  \sgn=0
  \ifdim\@tempdima<0\p@\@tempdima=-#1\p@\advance\sgn1\fi
  \ifdim\@tempdimb<0\p@\@tempdimb=-#2\p@\advance\sgn1\fi
  \Cnt=0
  \@whilenum\Cnt<6\do{%
    \loop\ifdim\@tempdima<\@tempdimb\relax
    \else
      \advance\@tempdima-\@tempdimb
      \advance\@tempdimc\ifcase\Cnt1\or.1\or.01\or.001\or.0001\or.00001\fi\p@
    \repeat
    \multiply\@tempdima10
    \advance\Cnt1
  }%
  \ifnum\sgn=1\global\dimen@=-\@tempdimc
  \else\global\dimen@=\@tempdimc\fi
}}
\def\dimensqrt#1{{%ニュートン法
  \@prevx=1\p@
  \Tms=0
  \@whilenum\Tms<10\do{%
    \dimenmul(\strip@pt\@prevx, \strip@pt\@prevx)%
    \dimensum(\strip@pt\dimen@, #1)%
    \dimendiv(\strip@pt\dimen@, 2)%
    \dimendiv(\strip@pt\dimen@, \strip@pt\@prevx)%
    \@prevx=\dimen@
    \advance\Tms1
  }%
}}
\def\dimencbrt#1{{%ニュートン法
  \@prevx=\ifdim#1\p@<0\p@-\fi1\p@                   %(#1<0なら-1から)
  \Tms=0
  \@whilenum\Tms<10\do{%
    \dimenmul(\strip@pt\@prevx, \strip@pt\@prevx)%
    \dimenmul(\strip@pt\dimen@, \strip@pt\@prevx)%
    \dimenmul(\strip@pt\dimen@, 2)%
    \dimensum(\strip@pt\dimen@, #1)%
    \dimendiv(\strip@pt\dimen@, \strip@pt\@prevx)%
    \dimendiv(\strip@pt\dimen@, \strip@pt\@prevx)%
    \dimendiv(\strip@pt\dimen@, 3)%
    \@prevx=\dimen@
    \advance\Tms1
  }%
}}

%------------------------------------------------------------------------------------------------
%<!<< xy座標、θy座標の描画 >>>
\def\coordinate{\@testopt\@coordinate{}}
\def\@coordinate[#1](#2,#3)(#4,#5){\def\op@{#1}%      [オプション]
  \def\CalcLEN{%軸の長さの計算
    \advance\LEN-\POS
  }
  \def\DrawAxis{%横軸と縦軸の描画
    %横軸
    \POS=#2  \LEN=#3  \CalcLEN
    \put(\POS, 0){\vector(1,0){\LEN}}
    \advance\POS\LEN
    \put(\POS, -.1){\makebox(0, 0)[rt]{\HAxis}}
    %縦軸
    \POS=#4  \LEN=#5  \CalcLEN
    \put(0, \POS){\vector(0,1){\LEN}}
    \advance\POS\LEN
    \put(-.1, \POS){\makebox(0, 0)[rt]{\VAxis}}
    %原点
    \put(-.1, -.1){\makebox(0, 0)[rt]{\OAxis}}
  }
  %
  \def\CalcC{%目盛の刻み数の計算
    \advance\POS1
    \advance\C-\POS
  }
  \def\DrawScale{%軸に目盛を刻む
    %横軸
    \POS=#2  \C=#3  \CalcC
    \multiput(\POS, -.05)(1, 0){\C}{\line(0,1){.1}}
    \loop\ifnum \C>0
      \put(\POS, -.1){\makebox(0, 0)[t]{\footnotesize\HScale}}
      \advance\POS1
      \advance\C-1
    \repeat
    %縦軸
    \POS=#4  \C=#5  \CalcC
    \multiput(-.05, \POS)(0, 1){\C}{\line(1,0){.1}}
    \loop\ifnum \C>0
      \put(-.1, \POS){\makebox(0, 0)[r]{\footnotesize\VScale\iAxis}}
      \advance\POS1
      \advance\C-1
    \repeat
  }
  %
  \def\ScaleFive{%5ごとに目盛値を付加（横・縦軸共通）
    \T=\POS
    %5の整数倍にする処置
    \divide\T5  \multiply\T5
    \ifnum \T=0
      \relax
    \else\ifnum \T=\POS
      \number\POS%
    \fi\fi
  }
  \def\iAxis{%オプションが[I][Ig][gI]のときは虚軸の数値にiを付加する
    \ifnum \T=0
      \relax
    \else\ifnum \T=\POS
      \ifx \op@\sw@I{$i$}\fi
      \ifx \op@\sw@Ig{$i$}\fi
      \ifx \op@\sw@gI{$i$}\fi
    \fi\fi
  }
  \def\ScaleDegree{%90度ごとに目盛値を付加
    \T=\POS
    %3の整数倍にする処置
    \divide\T3  \multiply\T3
    \ifnum \T=0
      \relax
    \else\ifnum \T=\POS
      \ANG=\POS
      \multiply\ANG30
      \number\ANG$^\circ$%
    \fi\fi
  }
  \def\ScaleRadian{%(pi/2)ごとに目盛値を付加
    \T=\POS
    %3の整数倍にする処置
    \divide\T3  \multiply\T3
    \ifnum \T=0
      \relax
    \else\ifnum \T=\POS
      \ANG=\POS
      \divide\ANG3
      \ifnum \ANG>0
        \ifcase\ANG \relax\or $\frac{\pi}{2}$\or $\pi$\or $\frac{3}{2}\pi$\or $2\pi$\or $\frac{5}{2}\pi$\or $3\pi$\or $\frac{7}{2}\pi$\or $4\pi$\fi
      \else\ifnum -\ANG>0
        \ifcase-\ANG \relax\or -$\frac{\pi}{2}$\or -$\pi$\or -$\frac{3}{2}\pi$\or -$2\pi$\or -$\frac{5}{2}\pi$\or -$3\pi$\or -$\frac{7}{2}\pi$\or -$4\pi$\fi
    \fi\fi\fi\fi
  }
  \def\ScaleHalf{%1.0ごとに目盛値を付加
    \T=\POS
    %2の整数倍にする処置
    \divide\T2  \multiply\T2
    \ifnum \T=0
      \relax
    \else\ifnum \T=\POS
      \ANG=\POS
      \divide\ANG2
      \number\ANG%
    \fi\fi
  }
  %
  \def\DrawGrid{%グリッド描画
    %縦線
    \POS=#2  \C=#3  \CalcC
    \LEN=#5  \advance\LEN-#4
    \multiput(\POS, #4)(1, 0){\C}{\dashbox{.1}(0, \LEN){}}
    %横線
    \POS=#4  \C=#5  \CalcC
    \LEN=#3  \advance\LEN-#2
    \multiput(#2, \POS)(0, 1){\C}{\dashbox{.1}(\LEN, 0){}}
  }
  %
  \newdimen\@rad \newdimen\@dxp \@dxp=.523598pt      %rad.xレジスタ、dx値、pi/6 
  \newdimen\@hfy                                     %num.yレジスタ（dy値=0.5）
  \newdimen\@len                                     %長さレジスタ
  \def\DrawAxisForRad{%実Radian目盛を刻み、目盛値を付加
    %x-ラジアン軸
    \def\putPosRadVal{\ifcase\C\relax \or\or\or $\frac{\pi}{2}$\or\or\or $\pi$\or\or\or $\frac{3}{2}\pi$\or\or\or $2\pi$\or\or\or $\frac{5}{2}\pi$\or\or\or $3\pi$\or\or\or $\frac{7}{2}\pi$\or\or\or $4\pi$\or\or\or $\frac{9}{2}\pi$\or\or\or $5\pi$\or\or\or $\frac{11}{2}\pi$\or\or\or $6\pi$\fi}
    \def\putNegRadVal{\ifcase\C\relax \or\or\or-$\frac{\pi}{2}$\or\or\or-$\pi$\or\or\or-$\frac{3}{2}\pi$\or\or\or-$2\pi$\or\or\or-$\frac{5}{2}\pi$\or\or\or-$3\pi$\or\or\or-$\frac{7}{2}\pi$\or\or\or-$4\pi$\or\or\or-$\frac{9}{2}\pi$\or\or\or-$5\pi$\or\or\or-$\frac{11}{2}\pi$\or\or\or-$6\pi$\fi}
    %%縦グリッド定義
    \def\GridXForRad{%
      \@len=#5pt \advance\@len-#4pt
      \put( \strip@pt\@rad, #4){\dashbox{.1}(0, \strip@pt\@len){}}
    }%%
    \def\scalePosX{%x目盛・正
      \put(\strip@pt\@rad, -.05){\line(0,1){.1}}
      \put(\strip@pt\@rad, -.35){\makebox(0, 0){\putPosRadVal}}
      \ifx \op@\sw@Pg \GridXForRad\fi%グリッド
      \ifx \op@\sw@gP \GridXForRad\fi
    }
    \def\scaleNegX{%x目盛・負
      \put(\strip@pt\@rad, -.05){\line(0,1){.1}}
      \put(\strip@pt\@rad, -.35){\makebox(0, 0){\putNegRadVal}}
      \ifx \op@\sw@Pg \GridXForRad\fi%グリッド
      \ifx \op@\sw@gP \GridXForRad\fi
    }
    \C=0
    \ifdim #2pt>0pt
      \@whiledim \@rad<#2pt \do{\advance\@rad\@dxp \advance\C1}
      \@whiledim \@rad<#3pt \do{\scalePosX \advance\@rad\@dxp \advance\C1}
    \else\ifdim #3pt<0pt
      \@whiledim \@rad>#3pt \do{\advance\@rad-\@dxp \advance\C1}
      \@whiledim \@rad>#2pt \do{\scaleNegX \advance\@rad-\@dxp \advance\C1}
    \else
      \@whiledim \@rad<#3pt \do{\scalePosX \advance\@rad\@dxp \advance\C1}
      \C=0 \@rad=0pt
      \@whiledim \@rad>#2pt \do{\scaleNegX \advance\@rad-\@dxp \advance\C1}
    \fi\fi
    %y-実数軸
    \def\putPosNumVal{\makebox(0, 0){\footnotesize\ifcase\C\relax \or\or $1$\or\or $2$\or\or $3$\or\or $4$\or\or $5$\or\or $6$\fi}}
    \def\putNegNumVal{\makebox(0, 0){\footnotesize\ifcase\C\relax \or\or-$1$\or\or-$2$\or\or-$3$\or\or-$4$\or\or-$5$\or\or-$6$\fi}}
    %%横グリッド定義
    \def\GridYForRad{%
      \@len=#3pt \advance\@len-#2pt
      \put(#2,  \strip@pt\@hfy){\dashbox{.1}(\strip@pt\@len, 0){}}
    }%%
    \def\scalePosY{%y目盛・正
      \put(-.05, \strip@pt\@hfy){\line(1,0){.1}}
      \put(-.25, \strip@pt\@hfy){\makebox(0, 0){\putPosNumVal}}
      \ifx \op@\sw@Pg \GridYForRad\fi%グリッド
      \ifx \op@\sw@gP \GridYForRad\fi
    }
    \def\scaleNegY{%y目盛・負
      \put(-.05, \strip@pt\@hfy){\line(1,0){.1}}
      \put(-.25, \strip@pt\@hfy){\makebox(0, 0){\putNegNumVal}}
      \ifx \op@\sw@Pg \GridYForRad\fi%グリッド
      \ifx \op@\sw@gP \GridYForRad\fi
    }
    \C=0
    \ifdim #4pt>0pt
      \@whiledim \@hfy<#4pt \do{\advance\@hfy.5pt \advance\C1}
      \@whiledim \@hfy<#5pt \do{\scalePosY \advance\@hfy.5pt \advance\C1}
    \else\ifdim #5pt<0pt
      \@whiledim \@hfy>#5pt \do{\advance\@hfy-.5pt \advance\C1}
      \@whiledim \@hfy>#4pt \do{\scaleNegY \advance\@hfy-.5pt \advance\C1}
    \else
      \@whiledim \@hfy<#5pt \do{\scalePosY \advance\@hfy.5pt \advance\C1}
      \C=0 \@hfy=0pt
      \@whiledim \@hfy>#4pt \do{\scaleNegY \advance\@hfy-.5pt \advance\C1}
    \fi\fi
  }
  %
  \def\HAxis{%横軸名称(x,θ)の付加
    \ifx \op@\sw@A  $x$\fi                           %($x$\ を出力)
    \ifx \op@\sw@Ag $x$\fi
    \ifx \op@\sw@gA $x$\fi
    \ifx \op@\sw@R  $x$\fi
    \ifx \op@\sw@Rg $x$\fi
    \ifx \op@\sw@gR $x$\fi
    \ifx \op@\sw@I  $x$\fi
    \ifx \op@\sw@Ig $x$\fi
    \ifx \op@\sw@gI $x$\fi
    \ifx \op@\sw@P  $x$\fi
    \ifx \op@\sw@Pg $x$\fi
    \ifx \op@\sw@gP $x$\fi
    \ifx \op@\sw@d  $\theta$\fi                      %($\theta$\ を出力)
    \ifx \op@\sw@dg $\theta$\fi
    \ifx \op@\sw@gd $\theta$\fi
    \ifx \op@\sw@r  $\theta$\fi
    \ifx \op@\sw@rg $\theta$\fi
    \ifx \op@\sw@gr $\theta$\fi
  }
  \def\VAxis{%縦軸名称の付加
    \ifx \op@\sw@null \relax
    \else\ifx \op@\sw@g \relax
    \else $y$\fi\fi                                  %($y$\ を出力)
  }
  \def\OAxis{%原点名称の付加
    \ifx \op@\sw@null \relax
    \else\ifx \op@\sw@g \relax
    \else \scriptsize$O$\fi\fi
  }
  \def\HScale{%x軸目盛値の付加
    \ifx \op@\sw@R  \ScaleFive\fi
    \ifx \op@\sw@Rg \ScaleFive\fi
    \ifx \op@\sw@gR \ScaleFive\fi
    \ifx \op@\sw@I  \ScaleFive\fi
    \ifx \op@\sw@Ig \ScaleFive\fi
    \ifx \op@\sw@gI \ScaleFive\fi
    \ifx \op@\sw@d  \ScaleDegree\fi
    \ifx \op@\sw@dg \ScaleDegree\fi
    \ifx \op@\sw@gd \ScaleDegree\fi
    \ifx \op@\sw@r  \ScaleRadian\fi
    \ifx \op@\sw@rg \ScaleRadian\fi
    \ifx \op@\sw@gr \ScaleRadian\fi
  }
  \def\VScale{%y軸目盛値の付加
    \ifx \op@\sw@R  \ScaleFive\fi
    \ifx \op@\sw@Rg \ScaleFive\fi
    \ifx \op@\sw@gR \ScaleFive\fi
    \ifx \op@\sw@I  \ScaleFive\fi
    \ifx \op@\sw@Ig \ScaleFive\fi
    \ifx \op@\sw@gI \ScaleFive\fi
    \ifx \op@\sw@d  \ScaleHalf\fi
    \ifx \op@\sw@dg \ScaleHalf\fi
    \ifx \op@\sw@gd \ScaleHalf\fi
    \ifx \op@\sw@r  \ScaleHalf\fi
    \ifx \op@\sw@rg \ScaleHalf\fi
    \ifx \op@\sw@gr \ScaleHalf\fi
  }
  %座標軸の描画
  %横軸、縦軸の描画 [規定値]
  \DrawAxis
  %[規定値]にグリッドのみ描画
  \ifx \op@\sw@g  \DrawGrid\fi
  \ifx \op@\sw@Ag \DrawGrid\fi
  \ifx \op@\sw@gA \DrawGrid\fi
  %[規定値]に軸目盛のみを刻む
  \ifx \op@\sw@R  \DrawScale\fi
  \ifx \op@\sw@I  \DrawScale\fi
  \ifx \op@\sw@d  \DrawScale\fi
  \ifx \op@\sw@r  \DrawScale\fi
  %[規定値]に目盛値を付加し、グリッドも描画
  \ifx \op@\sw@Rg \DrawScale\DrawGrid\fi
  \ifx \op@\sw@gR \DrawScale\DrawGrid\fi
  \ifx \op@\sw@Ig \DrawScale\DrawGrid\fi
  \ifx \op@\sw@gI \DrawScale\DrawGrid\fi
  \ifx \op@\sw@dg \DrawScale\DrawGrid\fi
  \ifx \op@\sw@gd \DrawScale\DrawGrid\fi
  \ifx \op@\sw@rg \DrawScale\DrawGrid\fi
  \ifx \op@\sw@gr \DrawScale\DrawGrid\fi
  %[規定値]に実Radian目盛を刻み、目盛値を付加（グリッドの有無は\DrawAxisForRad内で）
  \ifx \op@\sw@P  \DrawAxisForRad\fi
  \ifx \op@\sw@Pg \DrawAxisForRad\fi
  \ifx \op@\sw@gP \DrawAxisForRad\fi
}

%<!<< 座標位置表示 >>>
\def\locate[#1](#2,#3){\def\op@{#1}%                  [sw@オプション]
  \ifx \op@\sw@x  \xycross(#2,#3)\fi
  \ifx \op@\sw@b  \blcirc(#2,#3)\fi
  \ifx \op@\sw@w  \whcirc(#2,#3)\fi
  \ifx \op@\sw@B  \Blcirc(#2,#3)\fi
  \ifx \op@\sw@W  \Whcirc(#2,#3)\fi
  \ifx \op@\sw@xb \xycross(#2,#3) \blcirc(#2,#3)\fi
  \ifx \op@\sw@bx \xycross(#2,#3) \blcirc(#2,#3)\fi
  \ifx \op@\sw@xw \xycross(#2,#3) \whcirc(#2,#3)\fi
  \ifx \op@\sw@wx \xycross(#2,#3) \whcirc(#2,#3)\fi
  \ifx \op@\sw@xB \xycross(#2,#3) \Blcirc(#2,#3)\fi
  \ifx \op@\sw@Bx \xycross(#2,#3) \Blcirc(#2,#3)\fi
  \ifx \op@\sw@xW \xycross(#2,#3) \Whcirc(#2,#3)\fi
  \ifx \op@\sw@Wx \xycross(#2,#3) \Whcirc(#2,#3)\fi
}
\def\xycross(#1,#2){%
\@rx=#1\p@ \@ry=#2\p@
  \ifdim \@rx>0\p@ \@ex=\@rx\fi \abline[0, #2]:(0, #1)
  \ifdim \@rx<0\p@ \@ex=0\p@\fi \abline[0, #2]:(#1, 0)
  \ifdim \@ry>0\p@ \linexis{#1}:(0, #2)\fi
  \ifdim \@ry<0\p@ \linexis{#1}:(#2, 0)\fi
}
\def\blcirc(#1,#2){\put(#1,#2){\circle*{.15}}}
\def\whcirc(#1,#2){\put(#1,#2){\circle{.17}}}
\def\Blcirc(#1,#2){\put(#1,#2){\circle*{.27}}}
\def\Whcirc(#1,#2){\put(#1,#2){\circle{.3}}}

%<!<< 目盛値1を置く >>>
\def\putone{\put(1, -.05){\line(0,1){.1}} \put(1, -.1){\makebox(0, 0)[t]{\footnotesize$1$}}}
\def\putyone{\put(-.05, 1){\line(1,0){.1}} \put(-.1, 1){\makebox(0, 0)[r]{\footnotesize$1$}}}
\def\putones{\putone\putyone}

%------------------------------------------------------------------------------------------------
%<!<< 関数y=f(x)描画用ルーティン >>>
\def\drawline{%qbezierによる直線描画
  \qbezier(\strip@pt\@lx, \strip@pt\@ly)(\strip@pt\@lx, \strip@pt\@ly)(\strip@pt\@rx, \strip@pt\@ry)
}
\def\drawgline{%実線または破線の描画
  \ifx \brkn\sw@null
    \drawline\fi
  \ifx \brkn\sw@cln
    \@xCUR=\@rx \@yCUR=\@ry \calcdLEN
    \ifdim\@dLEN<.25\p@ \drawline
    \else\ifdim\@dLEN<.75\p@ \relax
    \else \@dLEN=0\p@ \@xBGN=\@lx \@yBGN=\@ly\fi\fi
  \fi
}
\def\calcdLEN{%破線の線分長計算
  \dimensum(\strip@pt\@xCUR, -\strip@pt\@xBGN)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\dimen@)%
  \advance\@dLEN\dimen@
  \dimensum(\strip@pt\@yCUR, -\strip@pt\@yBGN)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\dimen@)%
  \advance\@dLEN\dimen@
}
%
\def\calcmidxy{%xy座標の中点計算
  \dimensum(\strip@pt\@lx, \strip@pt\@rx)%
  \dimendiv(\strip@pt\dimen@, 2)%
  \global\@mx=\dimen@
  \dimensum(\strip@pt\@ly, \strip@pt\@ry)%
  \dimendiv(\strip@pt\dimen@, 2)%
  \global\@my=\dimen@
}

%------------------------------------------------------------------------------------------------
%<!<< 1次関数 y=ax+b >>>
\def\abline[#1,#2]#3(#4,#5){{\def\brkn{#3}%           [破線オプション]
\ifx \brkn\sw@cln \@steps=.02\p@ \else \@steps=.1\p@\fi
\@a=#1\p@ \@b=#2\p@ \@rx=#4\p@ \@ex=#5\p@
  \Cnt=0
  \@whiledim \@rx<\@ex \do{%
    %座標(lx, ly)の計算
    \@lx=\@rx
    \@tempx=\@lx \calclinear \@ly=\@tempy
    %座標(rx, ry)の計算
    \@rx=\@lx \advance\@rx\@steps \ifdim\@rx>\@ex \@rx=\@ex\fi
    \@tempx=\@rx \calclinear \@ry=\@tempy
  \drawgline}%
}}
\def\calclinear{%1次関数y座標計算
  \dimenmul(\strip@pt\@a, \strip@pt\@tempx)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@b)%
  \global\@tempy=\dimen@
}
%<!<< 直線x=a >>>
\def\linexis#1#2(#3,#4){{\def\brkn{#2}%               [破線オプション]
  \@ry=#4\p@ \advance\@ry-#3\p@
  \ifx \brkn\sw@null \put(#1, #3){\line(0,1){\strip@pt\@ry}}\fi
  \ifx \brkn\sw@cln \put(#1, #3){\dashbox{.15}(0, \strip@pt\@ry){}}\fi
}}

%<!<< 2次関数 y=ax^2+bx+c >>>
\def\parabola[#1,#2,#3]#4(#5,#6){{\def\brkn{#4}%      [破線オプション]
\ifx \brkn\sw@cln \@steps=.02\p@ \else \@steps=.05\p@\fi
\@a=#1\p@ \@b=#2\p@ \@c=#3\p@ \@rx=#5\p@ \@ex=#6\p@
  \@whiledim \@rx<\@ex \do{%
    %座標(lx, ly)の計算
    \@lx=\@rx
    \@tempx=\@lx \calcpolysq \@ly=\@tempy
    %座標(rx, ry)の計算
    \@rx=\@lx \advance\@rx\@steps \ifdim\@rx>\@ex \@rx=\@ex\fi
    \@tempx=\@rx \calcpolysq \@ry=\@tempy
  \drawgline}
}}
\def\calcpolysq{%2次関数y座標計算
  \dimenmul(\strip@pt\@a, \strip@pt\@tempx)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@b)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\@tempx)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@c)%
  \global\@tempy=\dimen@
}

%<!<< 3次関数 y=ax^3+bx^2+cx+d >>>
\def\cubecurve[#1,#2,#3,#4]#5(#6,#7){{\def\brkn{#5}%  [破線オプション]
\ifx \brkn\sw@cln \@steps=.02\p@ \else \@steps=.05\p@\fi
\@a=#1\p@ \@b=#2\p@ \@c=#3\p@ \@d=#4\p@ \@rx=#6\p@ \@ex=#7\p@
  \@whiledim \@rx<\@ex \do{%
    %座標(lx, ly)の計算
    \@lx=\@rx
    \@tempx=\@lx \calcpolycb \@ly=\@tempy
    %座標(rx, ry)の計算
    \@rx=\@lx \advance\@rx\@steps \ifdim\@rx>\@ex \@rx=\@ex\fi
    \@tempx=\@rx \calcpolycb \@ry=\@tempy
  \drawgline}
}}
\def\calcpolycb{%3次関数y座標計算
  \dimenmul(\strip@pt\@a, \strip@pt\@tempx)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@b)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\@tempx)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@c)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\@tempx)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@d)%
  \global\@tempy=\dimen@
}

%<!<< 無理関数 y=a sqrt(bx+c)+d >>>
\def\sqrtcurve[#1,#2,#3,#4]#5(#6,#7){{\def\brkn{#5}%  [破線オプション]
\ifx \brkn\sw@cln \@steps=.05\p@ \else \@steps=.1\p@\fi
\@a=#1\p@ \@b=#2\p@ \@c=#3\p@ \@d=#4\p@ \@rx=#6\p@ \@ex=#7\p@
  \@whiledim \@rx<\@ex \do{%
    %座標(lx, ly)の計算
    \@lx=\@rx
    \@tempx=\@lx \calcsqrt \@ly=\@tempy
    %座標(rx, ry)の計算
    \@rx=\@lx \advance\@rx\@steps \ifdim\@rx>\@ex \@rx=\@ex\fi
    \@tempx=\@rx \calcsqrt \@ry=\@tempy
  \drawgline}
}}
\def\calcsqrt{%平方根関数y座標計算
  \dimenmul(\strip@pt\@b, \strip@pt\@tempx)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@c)%
  \@tempx=\dimen@
  \dimensqrt{\strip@pt\@tempx}%
  \dimenmul(\strip@pt\dimen@, \strip@pt\@a)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@d)%
  \global\@tempy=\dimen@
}

%<!<< 分数関数 y=a/(bx+c)+d >>>
\def\fraccurve[#1,#2,#3,#4]#5(#6,#7){{\def\brkn{#5}%  [破線オプション]
\ifx \brkn\sw@cln \@steps=.02\p@ \else \@steps=.03\p@\fi
\@a=#1\p@ \@b=#2\p@ \@c=#3\p@ \@d=#4\p@ \@rx=#6\p@ \@ex=#7\p@
  \@whiledim \@rx<\@ex \do{%
    %座標(lx, ly)の計算
    \@lx=\@rx
    \@tempx=\@lx \calcinverse \@ly=\@tempy
    %座標(rx, ry)の計算
    \@rx=\@lx \advance\@rx\@steps \ifdim\@rx>\@ex \@rx=\@ex\fi
    \@tempx=\@rx \calcinverse \@ry=\@tempy
  \drawgline}
}}
\def\calcinverse{%逆数関数y座標計算
  \dimenmul(\strip@pt\@b, \strip@pt\@tempx)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@c)%
  \@tempy=\dimen@
  \dimendiv(\strip@pt\@a, \strip@pt\@tempy)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@d)%
  \global\@tempy=\dimen@
}

%<!<< 指数・対数関数 y=a b^(cx)+d >>>
\def\expcurve#1[#2,#3,#4,#5]#6(#7,#8){{\def\brkn{#6}% [破線オプション]
\ifx \brkn\sw@cln \@steps=.05\p@ \else \@steps=.1\p@\fi
\@a=#2\p@ \@b=#3\p@ \@c=#4\p@ \@d=#5\p@ \@rx=#7\p@ \@ex=#8\p@
  \@whiledim \@rx<\@ex \do{%
    %座標(lx, ly)の計算
    \@lx=\@rx
    \@tempx=\@lx \calcexp \@ly=\@tempy
    %座標(rx, ry)の計算
    \@rx=\@lx \advance\@rx\@steps \ifdim\@rx>\@ex \@rx=\@ex\fi
    \@tempx=\@rx \calcexp \@ry=\@tempy
  %#1が-でy=a b^(cx)+d(指数関数の範囲)の逆関数
  \ifx#1-\swapxy\fi
  \drawgline
  \ifx#1-\swapxy\fi}%
}}
\def\calcexp{%指数関数y座標計算
  \dimenmul(\strip@pt\@c, \strip@pt\@tempx)%
  \@tempy=\dimen@
  %x^yの計算（b^(cx)の計算）
  \calcxsupy
  %
  \dimenmul(\strip@pt\dimen@, \strip@pt\@a)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@d)%
  \global\@tempy=\dimen@
}
\def\calcxsupy{%
  \@tempx=\@b \dimensqrt{\strip@pt\@tempx}%
  \@tempx=\dimen@ \dimensqrt{\strip@pt\@tempx}%
  \@tempx=\dimen@ \dimensqrt{\strip@pt\@tempx}%
  \@tempx=\dimen@ \dimensqrt{\strip@pt\@tempx}%
  \@tempx=\dimen@ \dimensqrt{\strip@pt\@tempx}%
  \@tempx=\dimen@ \dimensqrt{\strip@pt\@tempx}%
  \@tempx=\dimen@ \dimensqrt{\strip@pt\@tempx}%
  \@tempx=\dimen@ \dimensqrt{\strip@pt\@tempx}%
  \dimensum(\strip@pt\dimen@, 1)%
  \dimendiv(2, \strip@pt\dimen@)%
  \dimensum(\strip@pt\dimen@,-1)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\@tempy)%
  \dimensum(\strip@pt\dimen@, 1)%
  \dimendiv(2, \strip@pt\dimen@)%
  \dimensum(\strip@pt\dimen@,-1)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\dimen@)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\dimen@)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\dimen@)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\dimen@)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\dimen@)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\dimen@)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\dimen@)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\dimen@)%
}
\def\swapxy{%
  \@tempdima=\@lx \@lx=\@ly \@ly=\@tempdima
  \@tempdima=\@rx \@rx=\@ry \@ry=\@tempdima
}

%<!<< 正弦・余弦関数 y=a sin(bx+c)+d >>>
%（数表\getsinvalは末尾）
\def\sindegree[#1,#2,#3,#4]#5(#6,#7){{\def\brkn{#5}%  [破線オプション]
\@a=#1\p@ \@cyc=#2\p@ \degc=#3 \@d=#4\p@ \deg=#6
  \@whilenum \deg<#7 \do{%
    %座標(lx, ly)の計算
    \@lx=\deg\p@
    \tobasedeg{360} \@ly=\getsinval
    \dimenmul(\strip@pt\@ly, \strip@pt\@a)\@ly=\dimen@
    \advance\@ly\@d
    %座標(rx, ry)の計算
    \advance\deg1
    \@rx=\deg\p@
    \tobasedeg{360} \@ry=\getsinval
    \dimenmul(\strip@pt\@ry, \strip@pt\@a)\@ry=\dimen@
    \advance\@ry\@d
    %scale変換
    \changescale
  \drawgline}%
}}
\def\changescale{%30度 -> 1x, 1/2値 -> 1y
  \dimendiv(\strip@pt\@lx,30)\@lx=\dimen@
  \dimendiv(\strip@pt\@rx,30)\@rx=\dimen@
  \dimenmul(\strip@pt\@ly, 2)\@ly=\dimen@
  \dimenmul(\strip@pt\@ry, 2)\@ry=\dimen@
}
\def\tobasedeg#1{%基本角(sin=360, tan=180)変換
  \bdeg=\deg
  \ifdim\@cyc=2\p@\multiply\bdeg2\fi
  \ifdim\@cyc=3\p@\multiply\bdeg3\fi
  \ifdim\@cyc=4\p@\multiply\bdeg4\fi
  \ifdim\@cyc=.50\p@\divide\bdeg2\fi
  \ifdim\@cyc=.33\p@\divide\bdeg3\fi
  \ifdim\@cyc=.25\p@\divide\bdeg4\fi
  \advance\bdeg\degc
  \ifnum\bdeg>0%
    \@whilenum \bdeg>#1 \do{\advance\bdeg-#1}%
  \else
    \@whilenum \bdeg<0 \do{\advance\bdeg#1}%
  \fi
}

%<!<< 正接関数 y=a tan(bx+c)+d >>>
%（数表\gettanvalは末尾）
\def\tandegree[#1,#2,#3,#4]#5(#6,#7){{\def\brkn{#5}%  [破線オプション]
\@a=#1\p@ \@cyc=#2\p@ \degc=#3 \@d=#4\p@ \deg=#6
  \@whilenum \deg<#7 \do{%
    %座標(lx, ly)の計算
    \@lx=\deg\p@
    \tobasedeg{180} \@ly=\gettanval
    \dimenmul(\strip@pt\@ly, \strip@pt\@a)\@ly=\dimen@
    \advance\@ly\@d
    %座標(rx, ry)の計算
    \advance\deg1
    \@rx=\deg\p@
    \tobasedeg{180} \@ry=\gettanval
    \dimenmul(\strip@pt\@ry, \strip@pt\@a)\@ry=\dimen@
    \advance\@ry\@d
    %scale変換
    \changescale
  \drawgline}%
}}

%<!<< 楕円・双曲線 (x-a)^2/C+(y-b)^2/D=1 >>>           %[C,D>0で楕円、C*D<0で双曲線]
\def\hyperoval#1[#2,#3,#4,#5]#6(#7,#8){{\def\brkn{#6}%[破線オプション]
\ifx \brkn\sw@cln \@steps=.01\p@ \else \@steps=.02\p@\fi
\@a=#2\p@ \@b=#3\p@ \@c=#4\p@ \@d=#5\p@
  \def\op@{#1}%                                       [オプション]
  \Tms=2
  \@whilenum \Tms>0 \do{%
  \@rx=#7\p@ \@ex=#8\p@
    \@whiledim \@rx<\@ex \do{%
      %座標(lx, ly)の計算
      \@lx=\@rx
      \@tempx=\@lx \calchyoval \@ly=\@tempy  
      %座標(rx, ry)の計算
      \@rx=\@lx \advance\@rx\@steps \ifdim\@rx>\@ex \@rx=\@ex\fi
      \@tempx=\@rx \calchyoval \@ry=\@tempy
    \drawgline}
  \ifx\op@\sw@null\def\op@{-}\advance\Tms-1\else\Tms=0\fi}%
}}
\def\calchyoval{%楕円・双曲線y座標計算
  \dimensum(\strip@pt\@tempx,-\strip@pt\@a)%
  \@tempx=\dimen@
  \dimenmul(\strip@pt\@tempx, \strip@pt\@tempx)%
  \dimendiv(\strip@pt\dimen@,-\strip@pt\@c)%
  \dimensum(\strip@pt\dimen@, 1)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\@d)%
  \@tempx=\dimen@
  \dimensqrt{\strip@pt\@tempx}%
  \ifx\op@\sw@m\dimenmul(\strip@pt\dimen@,-1)\fi     %(\op@が-なら負値に)
  \dimensum(\strip@pt\dimen@, \strip@pt\@b)%
  \global\@tempy=\dimen@
}

%<!<< Taylor級数 [ a1+x(a2+x(a3+x(a4+x(a5+x*a6)))) ] >>>
\def\Taylor[#1,#2,#3,#4,#5,#6]#7(#8,#9){{\def\brkn{#7}%[破線オプション]
\ifx \brkn\sw@cln \@steps=.02\p@ \else \@steps=.05\p@\fi
\@one=#1\p@ \@two=#2\p@ \@thr=#3\p@ \@fou=#4\p@ \@fiv=#5\p@ \@six=#6\p@ \@rx=#8\p@ \@ex=#9\p@
  \@whiledim \@rx<\@ex \do{%
    %座標(lx, ly)の計算
    \@lx=\@rx
    \@tempx=\@lx \calcseries \@ly=\@tempy
    %座標(rx, ry)の計算
    \@rx=\@lx \advance\@rx\@steps \ifdim\@rx>\@ex \@rx=\@ex\fi
    \@tempx=\@rx \calcseries \@ry=\@tempy
  \drawgline}
}}
\def\calcseries{%級数y座標計算
  \dimenmul(\strip@pt\@six, \strip@pt\@tempx)%
  \dimendiv(\strip@pt\dimen@, 5)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@fiv)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\@tempx)%
  \dimendiv(\strip@pt\dimen@, 4)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@fou)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\@tempx)%
  \dimendiv(\strip@pt\dimen@, 3)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@thr)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\@tempx)%
  \dimendiv(\strip@pt\dimen@, 2)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@two)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\@tempx)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@one)%
  \global\@tempy=\dimen@
}

%------------------------------------------------------------------------------------------------
%<!<< e^xの計算 >>>
\def\dimenexp{{%
  \@b=2.71828\p@
  \@tempy=\dimen@
  \calcxsupy
}}

%<!<< loge(x)の計算 >>>
\def\dimenlog{{%（数表\getlogvalは末尾）
  \ifdim\dimen@<1\p@
    \dimenmul(\strip@pt\dimen@, 1000)%
    \calclog
    \dimensum(\strip@pt\dimen@, -3)%
  \else\ifdim\dimen@<10\p@
    \dimenmul(\strip@pt\dimen@, 100)%
    \calclog
    \dimensum(\strip@pt\dimen@, -2)%
  \else\ifdim\dimen@<100\p@
    \dimenmul(\strip@pt\dimen@, 10)%
    \calclog
    \dimensum(\strip@pt\dimen@, -1)%
  \else
    \calclog
  \fi\fi\fi
  \dimendiv(\strip@pt\dimen@, .43429)%log10(x) -> loge(x)
}}
\def\calclog{%
  \anti=\dimen@
  %sp単位をpt単位に
  \divide\anti256 \divide\anti256
  \global\dimen@=\getlogval
}

%<!<< sin xの計算 >>
\def\dimensin{{%
  \dimenmul(\strip@pt\dimen@, 180)%
  \dimendiv(\strip@pt\dimen@, 3.14159)%
  \deg=\dimen@
  \divide\deg256 \divide\deg256
  \tobasedeg{360}%
  \global\dimen@=\getsinval
}}
%<!<< cos xの計算 >>
\def\dimencos{%
  \dimensum(\strip@pt\dimen@, 1.57079)\dimensin%
}
%<!<< tan xの計算 >>
\def\dimentan{{%
  \dimenmul(\strip@pt\dimen@, 180)%
  \dimendiv(\strip@pt\dimen@, 3.14159)%
  \deg=\dimen@
  \divide\deg256 \divide\deg256
  \tobasedeg{180}%
  \global\dimen@=\gettanval
}}
%<!<< SIN x（補間sin x）の計算 >>
\def\dimenSIN{{%
  \loop\ifdim\dimen@> 6.28318pt\dplus{-6.28318}\repeat
  \loop\ifdim\dimen@<-6.28318pt\dplus{ 6.28318}\repeat
  \dtimes{180}\dover{3.14159}%
  \deg=\dimen@
    \divide\deg256 \divide\deg256
    \dplus{-\deg}\temp@a=\dimen@
  \tobasedeg{360}\temp@b=\getsinval
  \advance\deg1
  \tobasedeg{360}\temp@c=\getsinval
  \dimensum(\strip@pt\temp@c,-\strip@pt\temp@b)
  \dimenmul(\strip@pt\temp@a, \strip@pt\dimen@)
  \dimensum(\strip@pt\temp@b, \strip@pt\dimen@)
}}

%------------------------------------------------------------------------------------------------
%<!<< 簡易計算式再（多重）定義 >>>
\newdimen\temp@a \newdimen\temp@b \newdimen\temp@c   %[\calcdimen/x/y用臨時変数]
%
\def\pusha{\temp@a=\dimen@}  \def\popa{\dimen@=\temp@a}
\def\pushb{\temp@b=\dimen@}  \def\popb{\dimen@=\temp@b}
\def\pushc{\temp@c=\dimen@}  \def\popc{\dimen@=\temp@c}
%(\dimen@ + something -> \dimen@)
\def\dplus#1{\dimensum(\strip@pt\dimen@,#1)}
\def\dplusa{\dimensum(\strip@pt\dimen@, \strip@pt\temp@a)}
\def\dplusb{\dimensum(\strip@pt\dimen@, \strip@pt\temp@b)}
\def\dplusc{\dimensum(\strip@pt\dimen@, \strip@pt\temp@c)}
%(\dimen@ - something -> \dimen@)
\def\dminusa{\dimensum(\strip@pt\dimen@,-\strip@pt\temp@a)}
\def\dminusb{\dimensum(\strip@pt\dimen@,-\strip@pt\temp@b)}
\def\dminusc{\dimensum(\strip@pt\dimen@,-\strip@pt\temp@c)}
%(\dimen@ * something -> \dimen@)
\def\dtimes#1{\dimenmul(\strip@pt\dimen@,#1)}
\def\dtimesa{\dimenmul(\strip@pt\dimen@, \strip@pt\temp@a)}
\def\dtimesb{\dimenmul(\strip@pt\dimen@, \strip@pt\temp@b)}
\def\dtimesc{\dimenmul(\strip@pt\dimen@, \strip@pt\temp@c)}
\def\dsquare{\dimenmul(\strip@pt\dimen@, \strip@pt\dimen@)}
%(\dimen@ / something -> \dimen@)
\def\dover#1{\dimendiv(\strip@pt\dimen@,#1)}
\def\dovera{\dimendiv(\strip@pt\dimen@, \strip@pt\temp@a)}
\def\doverb{\dimendiv(\strip@pt\dimen@, \strip@pt\temp@b)}
\def\doverc{\dimendiv(\strip@pt\dimen@, \strip@pt\temp@c)}
%(something / \dimen@ -> \dimen@)
\def\dunder#1{\dimendiv(#1,\strip@pt\dimen@)}
\def\dundera{\dimendiv(\strip@pt\temp@a, \strip@pt\dimen@)}
\def\dunderb{\dimendiv(\strip@pt\temp@b, \strip@pt\dimen@)}
\def\dunderc{\dimendiv(\strip@pt\temp@c, \strip@pt\dimen@)}
%(squareroot\dimen@ -> \dimen@)
\def\dsqrt{\@tempq=\dimen@\dimensqrt{\strip@pt\@tempq}}

%------------------------------------------------------------------------------------------------
%<!<< 関数グラフ描画 \easyfx[RPN](xl,xr) >>>
%（変数の定義）
\newcount\StackPtr
\newdimen\reg@A   \newdimen\reg@B
\newdimen\stack@a \newdimen\stack@b \newdimen\stack@c \newdimen\stack@d
\newdimen\stack@e \newdimen\stack@f%\newdimen\stack@g...(if needed)
%（演算子の定義）
\def\opp{+} \def\opm{-} \def\opa{*} \def\opd{/}      %2toks operator
\def\opr{r} \def\opq{q} \def\ope{e} \def\opl{l}      %1tok operator
\def\ops{s} \def\opS{S} \def\opc{c} \def\opt{t}
\def\opb{|}
\def\opx{x} %valiable
%（グラフ描画ルーティン）
\def\easyfx[#1]#2(#3,#4){{\def\brkn{#2}%              [破線オプション]
\ifx \brkn\sw@cln \@steps=.02\p@ \else \@steps=.05\p@\fi
\@rx=#3\p@ \@ex=#4\p@
  \Cnt=0
  \@whiledim \@rx<\@ex \do{%
    %座標(lx, ly)の計算
    \@lx=\@rx
    \@tempx=\@lx \RPNCalc[#1]\@ly=\@tempy
    %座標(rx, ry)の計算
    \@rx=\@lx \advance\@rx\@steps \ifdim\@rx>\@ex \@rx=\@ex\fi
    \@tempx=\@rx \RPNCalc[#1]\@ry=\@tempy
  \drawgline}%
}}
%（逆ポーランド記法による計算）
\def\RPNCalc[#1]{%RPN計算ルーティン
  \StackPtr=0
  \@tfor\member:=#1\do{%
    \ifx\member\sw@null\relax
    \else\ifx\member\opp \APlusB
    \else\ifx\member\opm \AMinusB
    \else\ifx\member\opa \ATimesB
    \else\ifx\member\opd \ADivideB
    \else\ifx\member\opr \SqrtA
    \else\ifx\member\opq \CbrtA
    \else\ifx\member\ope \EPowA
    \else\ifx\member\opl \LogeA
    \else\ifx\member\ops \SinA
    \else\ifx\member\opS \SINA
    \else\ifx\member\opc \CosA
    \else\ifx\member\opt \TanA
    \else\ifx\member\opb \AbsA
    \else\ifx\member\opx \PushVal=\@tempx
    \else
      \ifcase\StackPtr \stack@a\member\p@
        \or\stack@b\member\p@ \or\stack@c\member\p@ \or\stack@d\member\p@
        \or\stack@e\member\p@ \or\stack@f\member\p@%\or\stack@g\member\p@...(if needed)
      \fi
      \advance\StackPtr1
    \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
    \@tempy=\dimen@
  }%
}
\def\PopVal{%
  \ifcase\StackPtr \relax
    \or\stack@a \or\stack@b \or\stack@c \or\stack@d \or\stack@e \or\stack@f
   %\or\stack@g...(if needed)
  \fi
  \advance\StackPtr-1
}
\def\PushVal{%
  \advance\StackPtr1
  \ifcase\StackPtr \relax
    \or\stack@a \or\stack@b \or\stack@c \or\stack@d \or\stack@e \or\stack@f
   %\or\stack@g...(if needed)
  \fi
}
\def\APlusB{%A+B
  \reg@B=\PopVal \reg@A=\PopVal
  \dimensum(\strip@pt\reg@A, \strip@pt\reg@B)%
  \PushVal=\dimen@
}
\def\AMinusB{%A-B
  \reg@B=\PopVal \reg@A=\PopVal
  \dimensum(\strip@pt\reg@A,-\strip@pt\reg@B)%
  \PushVal=\dimen@
}
\def\ATimesB{%A*B
  \reg@B=\PopVal \reg@A=\PopVal
  \dimenmul(\strip@pt\reg@A, \strip@pt\reg@B)%
  \PushVal=\dimen@
}
\def\ADivideB{%A/B
  \reg@B=\PopVal \reg@A=\PopVal
  \dimendiv(\strip@pt\reg@A, \strip@pt\reg@B)%
  \PushVal=\dimen@
}
\def\SqrtA{%√A
  \reg@A=\PopVal
  \dimensqrt{\strip@pt\reg@A}%
  \PushVal=\dimen@
}
\def\CbrtA{%3]√A
  \reg@A=\PopVal
  \dimencbrt{\strip@pt\reg@A}%
  \PushVal=\dimen@
}
\def\EPowA{%e^A
  \dimen@=\PopVal \dimenexp \PushVal=\dimen@
}
\def\LogeA{%logeA
  \dimen@=\PopVal \dimenlog \PushVal=\dimen@
}
\def\SinA{%sinA
  \dimen@=\PopVal \dimensin \PushVal=\dimen@
}
\def\SINA{%SINA
  \dimen@=\PopVal \dimenSIN \PushVal=\dimen@
}
\def\CosA{%cosA
  \dimen@=\PopVal \dimencos \PushVal=\dimen@
}
\def\TanA{%tanA
  \dimen@=\PopVal \dimentan \PushVal=\dimen@
}
\def\AbsA{%|A|
  \reg@A=\PopVal
  \ifdim\reg@A<0\p@ \dimen@=-\reg@A\else \dimen@=\reg@A\fi
  \PushVal=\dimen@
}
%drawfuncp環境、drawfinv環境、drawfinvp環境用
\def\RPNfx[#1]{\@tempx=\dimen@\RPNCalc[#1]}
\def\RPNgx[#1]{\@tempy=\dimen@\RPNCalc[#1]}

%------------------------------------------------------------------------------------------------
%<!<< drawpict環境 >>>
\def\baseskip#1{\begin{picture}(#1, 0)\end{picture}}
\def\drawpict[#1](#2,#3)(#4,#5){
  \begin{center}
  \unitlength=#1
  \begin{picture}(#2,#3)(#4,#5)}
\def\enddrawpict{
  \end{picture}
  \end{center}
}

%<!<< drawfunc環境 : y=f(x) >>>
\def\drawfunc#1(#2,#3){\def\brkn{#1}%                 [破線オプション]
\makeatletter  
  \@rx=#2\p@
  \@ex=#3\p@
  \ifx \brkn\sw@cln \@steps=.02\p@ \else \@steps=.05\p@\fi}
\def\enddrawfunc{
  \@whiledim \@rx<\@ex \do{%
    \@lx=\@rx
      \dimen@=\@lx \calcdimen \@ly=\dimen@
    \@rx=\@lx \advance\@rx\@steps \ifdim\@rx>\@ex \@rx=\@ex\fi
      \dimen@=\@rx \calcdimen \@ry=\dimen@
    \drawgline
  }\makeatother
}

%<!<< drawfuncp環境 : x=f(t), y=g(t) >>>
\def\drawfuncp#1(#2,#3){\def\brkn{#1}%                [破線オプション]
\makeatletter
  \@vt=#2\p@
  \@et=#3\p@
  \ifx \brkn\sw@cln \@steps=.02\p@ \else \@steps=.05\p@\fi}
\def\enddrawfuncp{
  \@whiledim \@ut<\@et \do{%
    \@ut=\@vt
      \dimen@=\@ut \calcdimenx \@lx=\dimen@
      \dimen@=\@ut \calcdimeny \@ly=\dimen@
    \@vt=\@ut \advance\@vt\@steps \ifdim\@vt>\@et \@vt=\@et\fi
      \dimen@=\@vt \calcdimenx \@rx=\dimen@
      \dimen@=\@vt \calcdimeny \@ry=\dimen@
    \drawgline
  }\makeatother
}

%<!<< drawfinv環境 : y=f^(-1)(x) >>>
\def\drawfinv#1(#2,#3){\def\brkn{#1}%                 [破線オプション]
\makeatletter  
  \@rx=#2\p@
  \@ex=#3\p@
  \ifx \brkn\sw@cln \@steps=.02\p@ \else \@steps=.05\p@\fi}
\def\enddrawfinv{
  \@whiledim \@rx<\@ex \do{%
    \@lx=\@rx
      \dimen@=\@lx \calcdimen \@ly=\dimen@
    \@rx=\@lx \advance\@rx\@steps \ifdim\@rx>\@ex \@rx=\@ex\fi
      \dimen@=\@rx \calcdimen \@ry=\dimen@
    \swapxy \drawgline \swapxy
  }\makeatother
}

%<!<< drawfinvp環境 : g(t)=h^(-1)(f(t)) >>>
\def\drawfinvp#1(#2,#3){\def\brkn{#1}%                [破線オプション]
\makeatletter
  \@vt=#2\p@
  \@et=#3\p@
  \ifx \brkn\sw@cln \@steps=.02\p@ \else \@steps=.05\p@\fi}
\def\enddrawfinvp{
  \@whiledim \@ut<\@et \do{%
    \@ut=\@vt
      \dimen@=\@ut \calcdimenx \@lx=\dimen@
      \dimen@=\@ut \calcdimeny \@ly=\dimen@
    \@vt=\@ut \advance\@vt\@steps \ifdim\@vt>\@et \@vt=\@et\fi
      \dimen@=\@vt \calcdimenx \@rx=\dimen@
      \dimen@=\@vt \calcdimeny \@ry=\dimen@
    \swapxy \drawgline \swapxy
  }\makeatother
}

%------------------------------------------------------------------------------------------------
%<!<< 単位円の描画 >>>
\def\unitcircle{\@testopt\@unitcircle{}}
\def\@unitcircle[#1]{
  \def\DrawAxisCircle{
    \put(-1.2, 0){\vector(1,0){2.4}}%x軸
    \put(1.2, -.05){\makebox(0,0)[rt]{$x$}}
    \put(0, -1.2){\vector(0,1){2.4}}%y軸
    \put(-.05, 1.2){\makebox(0,0)[rt]{$y$}}
    \put(-.05, -.05){\makebox(0,0)[rt]{\small$O$}}%原点
    %
    \put(0, 0){\circle{2}}%pict2eパッケージが利用できない場合は、\hyperovalで円を描画する
  }
  \def\DrawScale{%x軸、y軸に 1/2, 1/sqrt{2}, sqrt{3}/2 の目盛 (+/-) を入れる
    \put(.5, -.015){\line(0,1){.03}}  \put(.707, -.015){\line(0,1){.03}}  \put(.866, -.015){\line(0,1){.03}}  \put(1.05, .05){\makebox(0, 0)[lb]{\footnotesize1}}%x>0目盛
    \put(-.015, .5){\line(1,0){.03}}  \put(-.015, .707){\line(1,0){.03}}  \put(-.015, .866){\line(1,0){.03}}  \put(.05, 1.05){\makebox(0, 0)[lb]{\footnotesize1}}%y>0目盛
    \put(-.5, -.015){\line(0,1){.03}} \put(-.707, -.015){\line(0,1){.03}} \put(-.866, -.015){\line(0,1){.03}} \put(-1.05, .05){\makebox(0, 0)[rb]{\footnotesize-$1$}}%x<0目盛
    \put(-.015, -.5){\line(1,0){.03}} \put(-.015, -.707){\line(1,0){.03}} \put(-.015, -.866){\line(1,0){.03}} \put(.05, -1.05){\makebox(0, 0)[lt]{\footnotesize-$1$}}%y<0目盛
  }
  \def\DrawTanScale{%接線 x=1 に 1/sqrt{3}, sqrt{3} の目盛 (+/-) を入れる
    \put(1, -2){\line(0,1){4}}
    \put(.985,-1.73){\line(1,0){.03}} \put(.985,-1){\line(1,0){.03}} \put(.985,-.577){\line(1,0){.03}}
    \put(.985, .577){\line(1,0){.03}} \put(.985, 1){\line(1,0){.03}} \put(.985, 1.73){\line(1,0){.03}}
  }
  %単位円の描画
  \DrawAxisCircle \DrawScale
  \ifx#1t \DrawTanScale \fi
}

%<!<< 数直線の描画 >>>
\def\numline{\@testopt\@numline{}}
\def\@numline[#1](#2,#3){
  \def\CalcC{
    \advance\POS1
    \advance\C-\POS
  }
  \def\ScaleFive{%5ごとに目盛値を付加
    \T=\POS
    \divide\T5  \multiply\T5
    \ifnum \POS=0
      0%
    \else\ifnum \T=\POS
      \number\POS{\ifx#1I{$i$}\fi}%虚数直線のオプション
    \fi\fi
  }
  \def\DrawScale{
    %目盛の描画
    \POS=#2  \C=#3  \CalcC
    \multiput(\POS, -.05)(1, 0){\C}{\line(0,1){.1}}
    %5ずつの数値
    \loop\ifnum \C>0
      \put(\POS, -.1){\makebox(0, 0)[t]{\footnotesize\ScaleFive}}
      \advance\POS1
      \advance\C-1
    \repeat
  }
  %数直線の描画
  \POS=#2  \LEN=#3  \advance\LEN-\POS
  \put(\POS, 0){\line(1,0){\LEN}}
  \DrawScale
}

%<!<<  数直線上での領域表示 >>>
\def\rangeline(#1,#2)#3{{%数直線
  \LEN=#2
  \advance\LEN-#1
  \put(#1, 0){\vector(1,0){\LEN}}
  \put(#2, -.35){\makebox(0, 0)[r]{\scriptsize#3}}
}}
\def\brange#1(#2,#3)#4{{%閉区間（黒丸）の線
  \put(#2, 0){\circle*{.2}}
  \apex(#2, -.5){#4}
  \siiide(#2, 0)(#2, \ifcase#1.6\or.8\or1\or1.2\or1.4\fi)(#3, \ifcase#1.6\or.8\or1\or1.2\or1.4\fi)%#1の値で線の高さを調整
}}
\def\wrange#1(#2,#3)#4{{%開区間（白丸）の線
  \put(#2, 0){\circle{.2}}
  \apex(#2, -.5){#4}
  \C=#1%siiideの中間点を、x:y=(±0.3):(0.6)の斜線に上乗せする措置（↓\repeatまで）
  \dimen@=#2\p@
  \loop\ifnum\C>-3
    \advance\dimen@\ifdim#2\p@>#3\p@-\fi.1\p@
    \advance\C-1
  \repeat
  \@prevx=\dimen@
  \siiide(#2, .1)(\strip@pt\@prevx, \ifcase#1.6\or.8\or1\or1.2\or1.4\fi)(#3, \ifcase#1.6\or.8\or1\or1.2\or1.4\fi)
}}

%------------------------------------------------------------------------------------------------
%<!<< 図形描画のためのdotsgrid >>>
\def\dotsgrid#1(#2,#3)(#4,#5){{%
  \gy=#3
  \@whilenum \gy<#5 \do{%
    \gx=#2
    \put(\gx, \gy){\makebox(0, 0)[r]{\tiny\number\gy}}
    \@whilenum \gx<#4 \do{%
      \put(\gx, \gy){\makebox(0, 0){$\cdot$}}
      \ifnum\gy=#3\put(\gx, \gy){\makebox(0, 0)[t]{\tiny\number\gx}}\fi
    \advance\gx#1}%
  \advance\gy#1}%
}}

%<!<< 連鎖線分、ベクトル線の描画 >>>
\def\siide#1(#2,#3)(#4,#5){{%2点をつなぐ線分
  \ifdim#2\p@=#4\p@
    \ifdim#3\p@<#5\p@ \linexis{#2}#1(#3,#5)\fi
    \ifdim#3\p@>#5\p@ \linexis{#2}#1(#5,#3)\fi
  \else
    \dimensum(#4,-#2)\@tempx=\dimen@
    \dimensum(#5,-#3)\@tempy=\dimen@
    \dimendiv(\strip@pt\@tempy, \strip@pt\@tempx)
    \@a=\dimen@
    \dimenmul(\strip@pt\dimen@,-#2)
    \dimensum(\strip@pt\dimen@, #3)
    \@b=\dimen@
    \ifdim#2\p@<#4\p@ \abline[\strip@pt\@a,\strip@pt\@b]#1(#2,#4)\fi
    \ifdim#2\p@>#4\p@ \abline[\strip@pt\@a,\strip@pt\@b]#1(#4,#2)\fi
  \fi
  }%
  \@VXa=#2\p@ \@VYa=#3\p@ \@VXb=#4\p@ \@VYb=#5\p@ %for \vparade
}
\def\siiide#1(#2,#3)(#4,#5)(#6,#7){%3点をつなぐ線分
  \siide#1(#4,#5)(#6,#7)
  \siide#1(#2,#3)(#4,#5)%
  \@VXc=#6\p@ \@VYc=#7\p@ %for \vparade
}
\def\siiiide#1(#2,#3)(#4,#5)(#6,#7)(#8,#9){%4点をつなぐ線分
  \siide#1(#6,#7)(#8,#9)
  \siide#1(#4,#5)(#6,#7)
  \siide#1(#2,#3)(#4,#5)%
  \@VXc=#6\p@ \@VYc=#7\p@ \@VXd=#8\p@ \@VYd=#9\p@ %for \vparade
}
\def\vsiide#1(#2,#3)(#4,#5){%2点をつなぐ線分片ベクトル
  \dimensum(#4,-#2)\C=\dimen@
  \dimensum(#5,-#3)\T=\dimen@
  \loop\ifnum\C>1000  \divide\C10\divide\T10\repeat
  \loop\ifnum\T>1000  \divide\C10\divide\T10\repeat
  \loop\ifnum\C<-1000 \divide\C10\divide\T10\repeat
  \loop\ifnum\T<-1000 \divide\C10\divide\T10\repeat
  \siide#1(#2,#3)(#4,#5) \put(#4,#5){\vector(\C,\T){0}}
  \@VXa=#2\p@ \@VYa=#3\p@ \@VXb=#4\p@ \@VYb=#5\p@ %for \vparade
}
\def\wsiide#1(#2,#3)(#4,#5){%2点をつなぐ線分両ベクトル
  \vsiide#1(#4,#5)(#2,#3)\vsiide#1(#2,#3)(#4,#5)
}

%<!<< 三角形、四角形の描画 >>>
\def\poooly#1(#2,#3)(#4,#5)(#6,#7){%三角形
  \siide#1(#6,#7)(#2,#3)
  \siiide#1(#2,#3)(#4,#5)(#6,#7)%
}
\def\pooooly#1(#2,#3)(#4,#5)(#6,#7)(#8,#9){%四角形
  \siide#1(#8,#9)(#2,#3)
  \siiiide#1(#2,#3)(#4,#5)(#6,#7)(#8,#9)%
}

%<!<< 2点より延ばす線分の描画 >>>
\def\extendline#1(#2,#3)(#4,#5)#6{%
  \dimensum(#4,-#2)\@a=\dimen@
  \dimensum(#5,-#3)\@b=\dimen@
  \@d=#1\p@ \calcuv
  \dimensum(#2,-\strip@pt\@ut)\@lx=\dimen@
  \dimensum(#3,-\strip@pt\@vt)\@ly=\dimen@
  \@d=#6\p@ \calcuv
  \dimensum(#4, \strip@pt\@ut)\@rx=\dimen@
  \dimensum(#5, \strip@pt\@vt)\@ry=\dimen@
  \qbezier(\strip@pt\@lx, \strip@pt\@ly)(\strip@pt\@lx, \strip@pt\@ly)(\strip@pt\@rx, \strip@pt\@ry)%
  \@VXa=#2\p@ \@VYa=#3\p@ \@VXb=#4\p@ \@VYb=#5\p@ %for \vparade
}

%<!<< 弧の描画 >>>
\def\arcdegree#1(#2,#3,#4)(#5,#6){{%(中心(c, d), 半径a)(描画角α, β)
\@c=#2\p@ \@d=#3\p@ \@a=#4\p@ \deg=#5
  \@whilenum \deg<#6 \do{%
    \calcarcpos
    %2点をつなぐ
    \drawline}%
  \ifx#1+\vsiide(\strip@pt\@lx,\strip@pt\@ly)(\strip@pt\@rx,\strip@pt\@ry)\fi
  \ifx#1-\deg=#5 \calcarcpos
         \vsiide(\strip@pt\@rx,\strip@pt\@ry)(\strip@pt\@lx,\strip@pt\@ly)\fi
  \ifx#1*\vsiide(\strip@pt\@lx,\strip@pt\@ly)(\strip@pt\@rx,\strip@pt\@ry)
         \deg=#5 \calcarcpos
         \vsiide(\strip@pt\@rx,\strip@pt\@ry)(\strip@pt\@lx,\strip@pt\@ly)\fi
}}
\def\calcarcpos{%
  %座標(lx, ly)の計算
  \tobasedeg{360} \@ly=\getsinval%sinの値
  \dimenmul(\strip@pt\@ly, \strip@pt\@a)\@ly=\dimen@
  \advance\@ly\@d
  \advance\deg90
  \tobasedeg{360} \@lx=\getsinval%cosの値
  \dimenmul(\strip@pt\@lx, \strip@pt\@a)\@lx=\dimen@
  \advance\@lx\@c
  %座標(rx, ry)の計算
  \advance\deg1
  \tobasedeg{360} \@rx=\getsinval%cosの値
  \dimenmul(\strip@pt\@rx, \strip@pt\@a)\@rx=\dimen@
  \advance\@rx\@c
  \advance\deg-90
  \tobasedeg{360} \@ry=\getsinval%sinの値
  \dimenmul(\strip@pt\@ry, \strip@pt\@a)\@ry=\dimen@
  \advance\@ry\@d
}

%<!<< 頂点・辺などの名称を置く >>>
\def\apex(#1,#2)#3{{%名称1つ
  \put(#1,#2){\makebox(0, 0){\small#3}}
}}
\def\apeex(#1,#2)#3(#4,#5)#6{{%名称2つ
  \put(#1,#2){\makebox(0, 0){\small#3}}
  \put(#4,#5){\makebox(0, 0){\small#6}}
}}
\def\apeeex(#1,#2)#3(#4,#5)#6(#7,#8)#9{{%名称3つ
  \put(#1,#2){\makebox(0, 0){\small#3}}
  \put(#4,#5){\makebox(0, 0){\small#6}}
  \put(#7,#8){\makebox(0, 0){\small#9}}
}}
\def\vertex(#1,#2,#3)#4#5{{%主に頂点の名称を精密に置く
  \ORBIT0(#1,#2,#3){#4}
  \put(\strip@pt\@XZ,\strip@pt\@YZ){\makebox(0, 0){\small#5}}
}}
\def\vparade[#1]#2#3#4#5;#6#7#8#9{{%vertexの行進列
  \vertex(\strip@pt\@VXa,\strip@pt\@VYa,#1){#6}{#2}%
  \vertex(\strip@pt\@VXb,\strip@pt\@VYb,#1){#7}{#3}%
  \vertex(\strip@pt\@VXc,\strip@pt\@VYc,#1){#8}{#4}%
  \vertex(\strip@pt\@VXd,\strip@pt\@VYd,#1){#9}{#5}%
}}
\def\vato#1{%\@VXa,\@VYaレジスタの値を退避する
  \global\ifcase#1\relax\or \@pushxa\or \@pushxb\or \@pushxc\or \@pushxd\fi=\@VXa
  \global\ifcase#1\relax\or \@pushya\or \@pushyb\or \@pushyc\or \@pushyd\fi=\@VYa}
\def\vbto#1{%\@VXb,\@VYbレジスタの値を退避する
  \global\ifcase#1\relax\or \@pushxa\or \@pushxb\or \@pushxc\or \@pushxd\fi=\@VXb
  \global\ifcase#1\relax\or \@pushya\or \@pushyb\or \@pushyc\or \@pushyd\fi=\@VYb}
\def\vcto#1{%\@VXc,\@VYcレジスタの値を退避する
  \global\ifcase#1\relax\or \@pushxa\or \@pushxb\or \@pushxc\or \@pushxd\fi=\@VXc
  \global\ifcase#1\relax\or \@pushya\or \@pushyb\or \@pushyc\or \@pushyd\fi=\@VYc}
\def\vdto#1{%\@VXd,\@VYdレジスタの値を退避する
  \global\ifcase#1\relax\or \@pushxa\or \@pushxb\or \@pushxc\or \@pushxd\fi=\@VXd
  \global\ifcase#1\relax\or \@pushya\or \@pushyb\or \@pushyc\or \@pushyd\fi=\@VYd}
\def\vpop{%退避した全ての値をvparade用レジスタに格納する
  \global\@VXa=\@pushxa \global\@VYa=\@pushya
  \global\@VXb=\@pushxb \global\@VYb=\@pushyb
  \global\@VXc=\@pushxc \global\@VYc=\@pushyc
  \global\@VXd=\@pushxd \global\@VYd=\@pushyd
}

%<!<< スラー線を引き値を置く >>>
\def\slur{\@testopt\@slur{}}
\def\@slur[#1]#2(#3,#4)(#5,#6)#7{{\def\op@{#1}%       [点線オプション]
  \@lx=#3\p@ \@ly=#4\p@ \@rx=#5\p@ \@ry=#6\p@
  \calcmidxy
  \ifx#2-
    \dimensum(\strip@pt\@ly, -\strip@pt\@my)\dimendiv(\strip@pt\dimen@, 3)\dimensum(\strip@pt\dimen@, \strip@pt\@mx)\@mx=\dimen@
    \dimensum(\strip@pt\@mx, -\strip@pt\@lx)\dimendiv(\strip@pt\dimen@, 3)\dimensum(\strip@pt\dimen@, \strip@pt\@my)\@my=\dimen@
  \else\ifx#2+
    \dimensum(\strip@pt\@my, -\strip@pt\@ly)\dimendiv(\strip@pt\dimen@, 3)\dimensum(\strip@pt\dimen@, \strip@pt\@mx)\@mx=\dimen@
    \dimensum(\strip@pt\@lx, -\strip@pt\@mx)\dimendiv(\strip@pt\dimen@, 3)\dimensum(\strip@pt\dimen@, \strip@pt\@my)\@my=\dimen@
  \fi\fi
  \put(\strip@pt\@mx, \strip@pt\@my){\makebox(0, 0){\footnotesize#7}}
  
  \ifx \op@\sw@null \qbezier(\strip@pt\@lx, \strip@pt\@ly)(\strip@pt\@mx, \strip@pt\@my)(\strip@pt\@rx, \strip@pt\@ry)
  \else \qbezier[#1](\strip@pt\@lx, \strip@pt\@ly)(\strip@pt\@mx, \strip@pt\@my)(\strip@pt\@rx, \strip@pt\@ry)\fi
}}

%<!<< 線分上の直角記号、等辺記号、平行記号 >>>
\def\putsymbol[#1]#2(#3,#4)(#5,#6)#7{%線長dの記号を2点(lx, ly)(rx, ry)のt分点に置く)
  \dimensum(#5,-#3)\@tempdima=\dimen@
  \dimensum(#6,-#4)\@tempdimb=\dimen@
  \DIVIDE0(#3,#4)(#5,#6){#7}
  \symbol[#1](\strip@pt\@XZ,\strip@pt\@YZ)(\strip@pt\@tempdima,\strip@pt\@tempdimb){#2}%
}

%<!<< \putsymbolのサブルーティン（単独使用可） >>>
\newdimen\aa \newdimen\bb \newdimen\uu \newdimen\vv  %[ΔcosΔsin再計算用退避変数]
\def\symbol[#1](#2,#3)(#4,#5)#6{{%(中心(x, y)、傾き(a, b)、線長d)
\@tempx=#2\p@ \@tempy=#3\p@ \@a=#4\p@ \@b=#5\p@ \@d=#6\p@
\ifx#1r%直角記号(中心から傾き方向へ長さdの位置から左回りに)
  \calcuv
  \drawL\fi
\ifx#1e%等辺記号(中心から直交する単線)
  \calcuv
  \drawI\fi
\ifx#1E%等辺記号(中心から直交する複線)
  \calcuv
  \drawI
  \@tempx=#2\p@ \@tempy=#3\p@
  \advance\@tempx\@ut \advance\@tempy\@vt
  \drawI\fi
\ifx#1p%平行記号(中心から傾き方向への単線)
  \calcuvnew
  \drawL\fi
\ifx#1P%平行記号(中心から傾き方向への複線)
  \calcuvnew
  \drawL
  \@tempx=#2\p@ \@tempy=#3\p@
  \drawL\fi
}}
\def\calcuv{%
  %sqrt{a^2+b^2}値計算
  \dimenmul(\strip@pt\@a, \strip@pt\@a)%
  \@c=\dimen@
  \dimenmul(\strip@pt\@b, \strip@pt\@b)%
  \dimensum(\strip@pt\@c, \strip@pt\dimen@)%
  \@c=\dimen@\dimensqrt{\strip@pt\@c}\@c=\dimen@
  %Δcos値計算
  \dimendiv(\strip@pt\@a, \strip@pt\@c)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\@d)%
  \@ut=\dimen@
  %Δsin値計算
  \dimendiv(\strip@pt\@b, \strip@pt\@c)%
  \dimenmul(\strip@pt\dimen@, \strip@pt\@d)%
  \@vt=\dimen@
}
\def\calcuvnew{%
  \calcuv
  \uu=\@ut \vv=\@vt
  \advance\@tempx-\uu \advance\@tempy-\vv
  \aa=\@a \advance\aa\@b
  \bb=\@a \advance\bb-\@b
  \@a=\aa \@b=-\bb
  \calcuv
}
\def\drawL{%L線描画
  \advance\@tempx\@ut \advance\@tempy\@vt
  \@lx=\@tempx \@ly=\@tempy
  \advance\@tempx-\@vt \advance\@tempy\@ut
  \@mx=\@tempx \@my=\@tempy
  \advance\@tempx-\@ut \advance\@tempy-\@vt
  \@rx=\@tempx \@ry=\@tempy
  \qbezier(\strip@pt\@lx, \strip@pt\@ly)(\strip@pt\@lx, \strip@pt\@ly)(\strip@pt\@mx, \strip@pt\@my)%
  \qbezier(\strip@pt\@mx, \strip@pt\@my)(\strip@pt\@rx, \strip@pt\@ry)(\strip@pt\@rx, \strip@pt\@ry)%
}
\def\drawI{%I線描画
  \@mx=\@tempx \@my=\@tempy
  \advance\@tempx\@vt \advance\@tempy-\@ut
  \@lx=\@tempx \@ly=\@tempy
  \advance\@tempx-\@vt \advance\@tempy\@ut
  \advance\@tempx-\@vt \advance\@tempy\@ut
  \@rx=\@tempx \@ry=\@tempy
  \qbezier(\strip@pt\@lx, \strip@pt\@ly)(\strip@pt\@mx, \strip@pt\@my)(\strip@pt\@rx, \strip@pt\@ry)%
}

%------------------------------------------------------------------------------------------------
%<!<< 1点からの回転軌道点の計算 >>>
\def\ORBIT#1(#2,#3,#4)#5{%(中心(a, b), 半径r){回転角θ}
  \bdeg=#5{}%
  \ifnum\bdeg<0 \advance\bdeg360\fi
  \dimen@=\getsinval
  \dimenmul(\strip@pt\dimen@, #4)%
  \dimensum(\strip@pt\dimen@, #3)%
  \ifcase#1\@YZ\or \@Ya\or \@Yb\or \@Yc\or \@Yd\or \@Ye\or \@Yf\or \@Yg\or \@Yh\or \@Yi\fi=\dimen@
  %
  \advance\bdeg90
  \ifnum\bdeg>360 \advance\bdeg-360\fi
  \dimen@=\getsinval
  \dimenmul(\strip@pt\dimen@, #4)%
  \dimensum(\strip@pt\dimen@, #2)%
  \ifcase#1\@XZ\or \@Xa\or \@Xb\or \@Xc\or \@Xd\or \@Xe\or \@Xf\or \@Xg\or \@Xh\or \@Xi\fi=\dimen@
}

%<!<< 2点間の内・外分点の計算 >>>
\def\DIVIDE#1(#2,#3)(#4,#5)#6{%点(x1, y1)から点(x2, y2)へのt分点
  \dimensum(#4,-#2)%
  \dimenmul(\strip@pt\dimen@, #6)%
  \dimensum(\strip@pt\dimen@, #2)%
  \ifcase#1\@XZ\or \@Xa\or \@Xb\or \@Xc\or \@Xd\or \@Xe\or \@Xf\or \@Xg\or \@Xh\or \@Xi\fi=\dimen@
  %
  \dimensum(#5,-#3)%
  \dimenmul(\strip@pt\dimen@, #6)%
  \dimensum(\strip@pt\dimen@, #3)%
  \ifcase#1\@YZ\or \@Ya\or \@Yb\or \@Yc\or \@Yd\or \@Ye\or \@Yf\or \@Yg\or \@Yh\or \@Yi\fi=\dimen@
}

%<!<< 2点間上にある一定長線分の終端点の計算 >>>
\def\CUTLINE#1(#2,#3)(#4,#5)#6{%線分(x1, y1)(x2, y2)上の長さlの線分
  \DISTANCE0(#2,#3)(#4,#5)
  \dimendiv(#6, \strip@pt\@DZ)
  \@steps=\dimen@
  \DIVIDE#1(#2,#3)(#4,#5){\strip@pt\@steps}
}

%<!<< 2直線の交点の計算 >>>
\def\XPOINT#1(#2,#3)(#4,#5)(#6,#7)(#8,#9){%直線(x1, y1)(x2, y2)、(x3, y3)(x4, y4)の交点
  \dimensum(#4,-#2)\@ut=\dimen@                                    %(x2-x1)
  \dimensum(#9,-#7)\@vt=\dimen@                                    %(y4-y3)
  \dimenmul(\strip@pt\@ut, \strip@pt\@vt)\@et=\dimen@              %(x2-x1)(y4-y3)
  %
  \dimensum(#8,-#6)\@ut=\dimen@                                    %(x4-x3)
  \dimensum(#5,-#3)\@vt=\dimen@                                    %(y2-y1) 
  \dimenmul(\strip@pt\@ut, \strip@pt\@vt)%\                        %(x4-x3)(y2-y1)
  \dimensum(\strip@pt\@et,-\strip@pt\dimen@)\@et=\dimen@           %(x2-x1)(y4-y3)-(x4-x3)(y2-y1)
  %
  \ifdim\@et=0\p@
    \ifcase#1\relax\or \@Xa\or \@Xb\or \@Xc\or \@Xd\or \@Xe\or \@Xf\or \@Xg\or \@Xh\or \@Xi\fi=#2\p@
    \ifcase#1\relax\or \@Ya\or \@Yb\or \@Yc\or \@Yd\or \@Ye\or \@Yf\or \@Yg\or \@Yh\or \@Yi\fi=#3\p@
  \else
    \dimensum(#6,-#2)\@ut=\dimen@                                  %(x3-x1)
    \dimensum(#9,-#7)\@vt=\dimen@                                  %(y4-y3)
    \dimenmul(\strip@pt\@ut, \strip@pt\@vt)\@steps=\dimen@         %(x3-x1)(y4-y3)
    %
    \dimensum(#8,-#6)\@ut=\dimen@                                  %(x4-x3)
    \dimensum(#7,-#3)\@vt=\dimen@                                  %(y3-y1) 
    \dimenmul(\strip@pt\@ut, \strip@pt\@vt)%\                      %(x4-x3)(y3-y1)
    \dimensum(\strip@pt\@steps,-\strip@pt\dimen@)\@steps=\dimen@   %(x3-x1)(y4-y3)-(x4-x3)(y3-y1)
    %
    \dimendiv(\strip@pt\@steps, \strip@pt\@et)\@steps=\dimen@      %t
    %
    \dimensum(#4,-#2)%
    \dimenmul(\strip@pt\dimen@, \strip@pt\@steps)%
    \dimensum(\strip@pt\dimen@, #2)%
    \ifcase#1\relax\or \@Xa\or \@Xb\or \@Xc\or \@Xd\or \@Xe\or \@Xf\or \@Xg\or \@Xh\or \@Xi\fi=\dimen@
    %
    \dimensum(#5,-#3)%
    \dimenmul(\strip@pt\dimen@, \strip@pt\@steps)%
    \dimensum(\strip@pt\dimen@, #3)%
    \ifcase#1\relax\or \@Ya\or \@Yb\or \@Yc\or \@Yd\or \@Ye\or \@Yf\or \@Yg\or \@Yh\or \@Yi\fi=\dimen@
  \fi
}

%<!<< 垂線の足の座標計算 >>>
\def\PLFOOT#1(#2,#3)(#4,#5)(#6,#7){%点(x1, y1)から直線(x2, y2)(x3, y3)へ下ろした垂線の足
  \dimensum(#6,-#4)\@ut=\dimen@                                    %(x3-x2)
  \dimensum(#7,-#5)\@vt=\dimen@                                    %(y3-y2)
  \dimensum(#2,-\strip@pt\@vt)\@tempx=\dimen@                      %(x1+Δx)
  \dimensum(#3, \strip@pt\@ut)\@tempy=\dimen@                      %(y1+Δy)
  \XPOINT#1(\strip@pt\@tempx, \strip@pt\@tempy)(#2,#3)(#4,#5)(#6,#7)%\
}

%<!<< 垂線の頭の座標計算 >>>
\def\PLHEAD#1(#2,#3)(#4,#5){%線分(x1, y1)(x2, y2)の終点から延びる垂線の頭
  \dimensum(#4,-#2)\@ut=\dimen@                                    %(x2-x1)
  \dimensum(#5,-#3)\@vt=\dimen@                                    %(y2-y1)
  \dimensum(#4,-\strip@pt\@vt)                                     %(x1-Δy)
  \ifcase#1\relax\or \@Xa\or \@Xb\or \@Xc\or \@Xd\or \@Xe\or \@Xf\or \@Xg\or \@Xh\or \@Xi\fi=\dimen@
  \dimensum(#5, \strip@pt\@ut)                                     %(y1+Δx)
  \ifcase#1\relax\or \@Ya\or \@Yb\or \@Yc\or \@Yd\or \@Ye\or \@Yf\or \@Yg\or \@Yh\or \@Yi\fi=\dimen@
}

%<!<< 平行移動先の座標計算 >>>
\def\PARALLEL#1(#2,#3)(#4,#5){%点(x1,y1)を(dx,dy)方向へ平行移動した点
  \dimensum(#2, #4)
  \ifcase#1\relax\or \@Xa\or \@Xb\or \@Xc\or \@Xd\or \@Xe\or \@Xf\or \@Xg\or \@Xh\or \@Xi\fi=\dimen@
  \dimensum(#3, #5)
  \ifcase#1\relax\or \@Ya\or \@Yb\or \@Yc\or \@Yd\or \@Ye\or \@Yf\or \@Yg\or \@Yh\or \@Yi\fi=\dimen@
}

%<!<< 線対称移動先の座標計算 >>>
\def\SYMMETRY#1(#2,#3)(#4,#5)(#6,#7){%点(x1,y1)を直線(ax,ay)-(bx,by)について対称移動した点
  \PLFOOT#1(#2,#3)(#4,#5)(#6,#7)
  \dimen@=\ifcase#1\relax\or \@Xa\or \@Xb\or \@Xc\or \@Xd\or \@Xe\or \@Xf\or \@Xg\or \@Xh\or \@Xi\fi
  \dimenmul(\strip@pt\dimen@,  2)
  \dimensum(\strip@pt\dimen@,-#2)
  \ifcase#1\relax\or \@Xa\or \@Xb\or \@Xc\or \@Xd\or \@Xe\or \@Xf\or \@Xg\or \@Xh\or \@Xi\fi=\dimen@
  %
  \dimen@=\ifcase#1\relax\or \@Ya\or \@Yb\or \@Yc\or \@Yd\or \@Ye\or \@Yf\or \@Yg\or \@Yh\or \@Yi\fi
  \dimenmul(\strip@pt\dimen@,  2)
  \dimensum(\strip@pt\dimen@,-#3)
  \ifcase#1\relax\or \@Ya\or \@Yb\or \@Yc\or \@Yd\or \@Ye\or \@Yf\or \@Yg\or \@Yh\or \@Yi\fi=\dimen@
}

%<!<< 回転移動先の座標計算 >>>
\def\ROTATION#1(#2,#3)(#4,#5)#6{%点(x1,y1)を(cx,cy)を中心にしてθ回転移動した点
  \PARALLEL#1(#2,#3)(-#4,-#5)
  \bdeg=#6{}%
  \ifnum\bdeg<0 \advance\bdeg360\fi
  \@tempy=\getsinval
  \advance\bdeg90
  \ifnum\bdeg>360 \advance\bdeg-360\fi
  \@tempx=\getsinval
  %
  \@a=\ifcase#1\relax\or \@Xa\or \@Xb\or \@Xc\or \@Xd\or \@Xe\or \@Xf\or \@Xg\or \@Xh\or \@Xi\fi
  \dimenmul(\strip@pt\@a, \strip@pt\@tempx)
  \@a=\dimen@
  \@b=\ifcase#1\relax\or \@Ya\or \@Yb\or \@Yc\or \@Yd\or \@Ye\or \@Yf\or \@Yg\or \@Yh\or \@Yi\fi
  \dimenmul(\strip@pt\@b, \strip@pt\@tempy)
  \@b=\dimen@
  \@c=\ifcase#1\relax\or \@Xa\or \@Xb\or \@Xc\or \@Xd\or \@Xe\or \@Xf\or \@Xg\or \@Xh\or \@Xi\fi
  \dimenmul(\strip@pt\@c, \strip@pt\@tempy)
  \@c=\dimen@
  \@d=\ifcase#1\relax\or \@Ya\or \@Yb\or \@Yc\or \@Yd\or \@Ye\or \@Yf\or \@Yg\or \@Yh\or \@Yi\fi
  \dimenmul(\strip@pt\@d, \strip@pt\@tempx)
  \@d=\dimen@
  %
  \dimensum(\strip@pt\@a,-\strip@pt\@b)
  \dimensum(\strip@pt\dimen@, #4)
  \ifcase#1\relax\or \@Xa\or \@Xb\or \@Xc\or \@Xd\or \@Xe\or \@Xf\or \@Xg\or \@Xh\or \@Xi\fi=\dimen@
  \dimensum(\strip@pt\@c, \strip@pt\@d)
  \dimensum(\strip@pt\dimen@, #5)
  \ifcase#1\relax\or \@Ya\or \@Yb\or \@Yc\or \@Yd\or \@Ye\or \@Yf\or \@Yg\or \@Yh\or \@Yi\fi=\dimen@
}

%<!<< 2点間の距離計算 >>>
\def\DISTANCE#1(#2,#3)(#4,#5){%2点(x1, y1)、(x2, y2)間の距離
  \dimensum(#4,-#2)\dimenmul(\strip@pt\dimen@, \strip@pt\dimen@)%
  \@ut=\dimen@
  \dimensum(#5,-#3)\dimenmul(\strip@pt\dimen@, \strip@pt\dimen@)%
  \@vt=\dimen@
  \dimensum(\strip@pt\@ut, \strip@pt\@vt)%
  \dsqrt
  \ifcase#1\@DZ\or \@Da\or \@Db\fi=\dimen@
}

%<!<< 直線と円の交点の座標計算 >>>
\def\IOCROSSES#1(#2,#3)(#4,#5)(#6,#7,#8){%直線(x1, y1)(x2, y2)と円(c, d, r)の交点
  \PLFOOT#1(#6, #7)(#2, #3)(#4, #5)%\
  \@a=\X_#1\p@ \@b=\Y_#1\p@
  \DISTANCE0(#6, #7)(\strip@pt\@a, \strip@pt\@b)%\
  \dimenmul(\strip@pt\@DZ, \strip@pt\@DZ)\@c=\dimen@
  \dimenmul(#8, #8)%
  \dimensum(\strip@pt\dimen@,-\strip@pt\@c)%
  \dsqrt
  \@c=\dimen@
  \DISTANCE0(#2, #3)(#4, #5)%\
  \dimendiv(\strip@pt\@c, \strip@pt\@DZ)\@d=\dimen@
  %
  \dimensum(#2,-#4)\@tempx=\dimen@
  \dimensum(#3,-#5)\@tempy=\dimen@
  %
  \dimenmul(\strip@pt\@tempx, \strip@pt\@d)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@a)%
  \ifcase#1\relax\or \@Xa\or \@Xb\or \@Xc\or \@Xd\or \@Xe\or \@Xf\or \@Xg\or \@Xh\or \@Xi\fi=\dimen@
  \dimenmul(\strip@pt\@tempy, \strip@pt\@d)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@b)%
  \ifcase#1\relax\or \@Ya\or \@Yb\or \@Yc\or \@Yd\or \@Ye\or \@Yf\or \@Yg\or \@Yh\or \@Yi\fi=\dimen@
  \dimenmul(\strip@pt\@tempx,-\strip@pt\@d)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@a)%
  \ifcase#1\relax\or \@Xb\or \@Xc\or \@Xd\or \@Xe\or \@Xf\or \@Xg\or \@Xh\or \@Xi\or \@Xa\fi=\dimen@
  \dimenmul(\strip@pt\@tempy,-\strip@pt\@d)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@b)%
  \ifcase#1\relax\or \@Yb\or \@Yc\or \@Yd\or \@Ye\or \@Yf\or \@Yg\or \@Yh\or \@Yi\or \@Ya\fi=\dimen@
}

%<!<< 円と円の交点の座標計算 >>>
\def\@rccos#1{%arccos for \OOCROSSES
  \ifdim#1\p@<0\p@\bdeg=181 \else\bdeg=90\fi
  \@tempdima=\getsinval
  \@whiledim#1\p@<\@tempdima\do{\advance\bdeg1 \@tempdima=\getsinval}%
  \advance\bdeg-90
}%
\def\@rctan#1{%arctan for \OOCROSSES
  \ifdim#1\p@<0\p@\bdeg=91 \else\bdeg=0\fi
  \@tempdima=\gettanval
  \@whiledim#1\p@>\@tempdima\do{\advance\bdeg1 \@tempdima=\gettanval}%
}%
\def\OOCROSSES#1(#2,#3,#4)(#5,#6,#7){%円(c1, d1, r1)と円(c2, d2, r2)の交点
  \DISTANCE0(#2, #3)(#5, #6)%cosθ => arccos
  \dimenmul(\strip@pt\@DZ, \strip@pt\@DZ)\@tempdima=\dimen@
  \dimenmul(#4, #4)%
  \dimensum(\strip@pt\@tempdima, \strip@pt\dimen@)\@tempdima=\dimen@
  \dimenmul(#7, #7)%
  \dimensum(\strip@pt\@tempdima,-\strip@pt\dimen@)%
  \dimendiv(\strip@pt\dimen@, 2)%
  \dimendiv(\strip@pt\dimen@, \strip@pt\@DZ)%
  \dimendiv(\strip@pt\dimen@, #4)%
  \@rccos{\strip@pt\dimen@}%
  \T=\bdeg
  %
  \ifdim#3\p@=#6\p@ \ifdim#2\p@<#5\p@\ANG=0 \else\ANG=180\fi       %d1=d2
  \else
    \ifdim#2\p@=#5\p@ \ifdim#3\p@<#6\p@\ANG=90 \else\ANG=-90\fi    %c1=c2
    \else
    \dimensum(#2,-#5)\@tempx=\dimen@
    \dimensum(#3,-#6)%
    \dimendiv(\strip@pt\dimen@, \strip@pt\@tempx)%
    \@rctan{\strip@pt\dimen@}\ifdim#3\p@>#6\p@\advance\bdeg-180\fi %arctan => -180<θ<180
    \ANG=\bdeg
  \fi\fi
  %
  \advance\ANG-\T
  \ORBIT\ifcase#1\relax\or1\or2\or3\or4\fi(#2, #3, #4){\ANG}%
  \advance\ANG\T\advance\ANG\T
  \ORBIT\ifcase#1\relax\or2\or3\or4\or1\fi(#2, #3, #4){\ANG}%
}

%<!<< 2つのベクトルの共通始点 >>>
\def\PINON(#1,#2){%(x0, y0) for \VECSCROSS
  \@XZ=#1\p@ \@YZ=#2\p@
}

%<!<< 2つのベクトルの対角頂点の座標計算 >>>
\def\VECSCROSS#1(#2,#3)#4(#5,#6)#7{%s,tを実数として、vec{a}*s+vec{b}*tの交点
  \dimensum(#2,-\strip@pt\@XZ)%
  \dimenmul(\strip@pt\dimen@, #4)%
  \@tempx=\dimen@
  \dimensum(#5,-\strip@pt\@XZ)%
  \dimenmul(\strip@pt\dimen@, #7)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@tempx)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@XZ)%
  \ifcase#1\@XZ\or \@Xa\or \@Xb\or \@Xc\or \@Xd\or \@Xe\or \@Xf\or \@Xg\or \@Xh\or \@Xi\fi=\dimen@
  %
  \dimensum(#3,-\strip@pt\@YZ)%
  \dimenmul(\strip@pt\dimen@, #4)%
  \@tempy=\dimen@
  \dimensum(#6,-\strip@pt\@YZ)%
  \dimenmul(\strip@pt\dimen@, #7)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@tempy)%
  \dimensum(\strip@pt\dimen@, \strip@pt\@YZ)%
  \ifcase#1\@YZ\or \@Ya\or \@Yb\or \@Yc\or \@Yd\or \@Ye\or \@Yf\or \@Yg\or \@Yh\or \@Yi\fi=\dimen@
}

%<!<< 生成したx座標, y座標, 距離Dの選択 >>>
\def\X_#1{\strip@pt\ifcase#1\relax\or \@Xa\or \@Xb\or \@Xc\or \@Xd\or \@Xe\or \@Xf\or \@Xg\or \@Xh\or \@Xi\fi}
\def\Y_#1{\strip@pt\ifcase#1\relax\or \@Ya\or \@Yb\or \@Yc\or \@Yd\or \@Ye\or \@Yf\or \@Yg\or \@Yh\or \@Yi\fi}
\def\D_#1{\strip@pt\ifcase#1\relax\or \@Da\or \@Db\fi}

%------------------------------------------------------------------------------------------------
%<!<< 水平回転量sinθ,cosθ、垂直回転量sinφ,cosφの計算 >>>
\def\Rotate(#1,#2){%
  \deg=#1        \tobasedeg{180} \@tanth=\gettanval
  \advance\deg90 \tobasedeg{360} \@costh=\getsinval
  \deg=#2        \tobasedeg{180} \@tanph=\gettanval
  \advance\deg90 \tobasedeg{360} \@cosph=\getsinval
}

%<!<< 3D座標を2D座標に変換 >>>
\def\DOWNSIZE#1#2(#3,#4,#5){\def\brkn{#2}%                          [ガイド破線オプション]
%(x, y, z) to (-x*sth+y*cth, -x*cth*sph-y*sth*sph+z*cph)を、(-x*\tth+y)*cth, {(-y*tth-x)*cth*tph+z}*cphで計算!!
  \dimenmul(-#3, \strip@pt\@tanth)
  \dimensum(\strip@pt\dimen@, #4)
  \dimenmul(\strip@pt\dimen@, \strip@pt\@costh)
  \ifcase#1\@XZ\or \@Xa\or \@Xb\or \@Xc\or \@Xd\or \@Xe\or \@Xf\or \@Xg\or \@Xh\or \@Xi\fi=\dimen@
  \@XZ=\dimen@%(x, y, z) -> (\@XZ, *)
  %
  \dimenmul(-#4, \strip@pt\@tanth)
  \dimensum(\strip@pt\dimen@,-#3)
  \dimenmul(\strip@pt\dimen@, \strip@pt\@costh)
  \dimenmul(\strip@pt\dimen@, \strip@pt\@tanph)
  \dimensum(\strip@pt\dimen@, #5)
  \dimenmul(\strip@pt\dimen@, \strip@pt\@cosph)
  \ifcase#1\@YZ\or \@Ya\or \@Yb\or \@Yc\or \@Yd\or \@Ye\or \@Yf\or \@Yg\or \@Yh\or \@Yi\fi=\dimen@
  \@YZ=\dimen@%(x, y, z) -> (*, \@YZ)
  %
  \ifx \brkn\sw@cln%PLOTGUIDE(option)
    %(x, y, 0) -> (\@guidex, \@guidey)
    \dimenmul(-#3, \strip@pt\@tanth)
    \dimensum(\strip@pt\dimen@, #4)
    \dimenmul(\strip@pt\dimen@, \strip@pt\@costh)
    \@guidex=\dimen@
    \dimenmul(-#4, \strip@pt\@tanth)
    \dimensum(\strip@pt\dimen@,-#3)
    \dimenmul(\strip@pt\dimen@, \strip@pt\@costh)
    \dimenmul(\strip@pt\dimen@, \strip@pt\@tanph)
    \dimenmul(\strip@pt\dimen@, \strip@pt\@cosph)
    \@guidey=\dimen@
    \siide:(\strip@pt\@guidex, \strip@pt\@guidey)(\strip@pt\@XZ, \strip@pt\@YZ)
    %(x, 0, 0) -> (\@XZ, \@YZ)
    \dimenmul(-#3, \strip@pt\@tanth)
    \dimenmul(\strip@pt\dimen@, \strip@pt\@costh)
    \@XZ=\dimen@
    \dimenmul(-#3, \strip@pt\@costh)
    \dimenmul(\strip@pt\dimen@, \strip@pt\@tanph)
    \dimenmul(\strip@pt\dimen@, \strip@pt\@cosph)
    \@YZ=\dimen@
    \siide:(\strip@pt\@guidex, \strip@pt\@guidey)(\strip@pt\@XZ, \strip@pt\@YZ)
    %(0, y, 0) -> (\@XZ, \@YZ)
    \dimenmul( #4, \strip@pt\@costh)
    \@XZ=\dimen@
    \dimenmul(-#4, \strip@pt\@tanth)
    \dimenmul(\strip@pt\dimen@, \strip@pt\@costh)
    \dimenmul(\strip@pt\dimen@, \strip@pt\@tanph)
    \dimenmul(\strip@pt\dimen@, \strip@pt\@cosph)
    \@YZ=\dimen@
    \siide:(\strip@pt\@guidex, \strip@pt\@guidey)(\strip@pt\@XZ, \strip@pt\@YZ)
  \fi
}

%<!<< 3D空間座標の描画 >>>
\def\ThreeDimAxis(#1,#2,#3)(#4,#5){%
  \Rotate(#4, #5)
  \DOWNSIZE0(#1, 0, 0) {\thicklines\vsiide(0, 0)(\strip@pt\@XZ, \strip@pt\@YZ)}
  \vertex(\strip@pt\@XZ, \strip@pt\@YZ, .15){-#4}{\makebox(0, 0)[lt]{$x$}}
  \DOWNSIZE0(0, #2, 0) {\thicklines\vsiide(0, 0)(\strip@pt\@XZ, \strip@pt\@YZ)}
  \vertex(\strip@pt\@XZ, \strip@pt\@YZ, .15){-#4}{\makebox(0, 0)[t]{$y$}}
  \DOWNSIZE0(0, 0, #3) {\thicklines\vsiide(0, 0)(\strip@pt\@XZ, \strip@pt\@YZ)}
  \vertex(\strip@pt\@XZ, \strip@pt\@YZ, .15){#5}{\makebox(0, 0)[lt]{$z$}}
  \apex(0, -.2){\footnotesize$O$}
}

%------------------------------------------------------------------------------------------------
%<!<< 領域斜線の描画 >>>
\def\neobliqs#1(#2,#3)(#4,#5)(#6,#7)(#8,#9){{%0.5間隔の右上がり斜線
  \@b=#1\p@         \abline[1, \strip@pt\@b](#2,#3)%
  \advance\@b-.5\p@ \abline[1, \strip@pt\@b](#4,#5)%
  \advance\@b-.5\p@ \abline[1, \strip@pt\@b](#6,#7)%
  \advance\@b-.5\p@ \abline[1, \strip@pt\@b](#8,#9)%
}}
\def\seobliqs#1(#2,#3)(#4,#5)(#6,#7)(#8,#9){{%0.5間隔の右下がり斜線
  \@b=#1\p@        \abline[-1, \strip@pt\@b](#2,#3)%
  \advance\@b.5\p@ \abline[-1, \strip@pt\@b](#4,#5)%
  \advance\@b.5\p@ \abline[-1, \strip@pt\@b](#6,#7)%
  \advance\@b.5\p@ \abline[-1, \strip@pt\@b](#8,#9)%
}}
\def\NEobliqs#1(#2,#3)(#4,#5)(#6,#7)(#8,#9){{%20間隔の右上がり斜線
  \@b=#1\p@         \abline[1, \strip@pt\@b](#2,#3)%
  \advance\@b-20\p@ \abline[1, \strip@pt\@b](#4,#5)%
  \advance\@b-20\p@ \abline[1, \strip@pt\@b](#6,#7)%
  \advance\@b-20\p@ \abline[1, \strip@pt\@b](#8,#9)%
}}
\def\SEobliqs#1(#2,#3)(#4,#5)(#6,#7)(#8,#9){{%20間隔の右下がり斜線
  \@b=#1\p@        \abline[-1, \strip@pt\@b](#2,#3)%
  \advance\@b20\p@ \abline[-1, \strip@pt\@b](#4,#5)%
  \advance\@b20\p@ \abline[-1, \strip@pt\@b](#6,#7)%
  \advance\@b20\p@ \abline[-1, \strip@pt\@b](#8,#9)%
}}

%------------------------------------------------------------------------------------------------
%<!<< 連分数を表示する\cfrac#1#2の定義 >>>
\def\cfrac#1#2{\dfrac{\mathstrut #1}{#2}}
\def\dfrac#1#2{{\displaystyle\frac{#1}{#2}}}

%<!<< 日本式等号つき不等号（\leq, \geqの再定義） >>>
\def\leq{\mathrel{\mathpalette\gl@align<}}
\def\geq{\mathrel{\mathpalette\gl@align>}}
\def\gl@align#1#2{\lower.6ex\vbox{\baselineskip\z@skip\lineskip\z@\ialign{$\m@th#1\hfil##\hfil$\crcr#2\crcr=\crcr}}}

%------------------------------------------------------------------------------------------------
%<!<< 数表sin >>>
\def\getsinval{%sin値(0-360degree)
\ifcase\bdeg 0
\or 0.0175 \or 0.0349 \or 0.0523 \or 0.0698 \or 0.0872 \or 0.1045 \or 0.1219 \or 0.1392 \or 0.1564 \or 0.1736
\or 0.1908 \or 0.2079 \or 0.225  \or 0.2419 \or 0.2588 \or 0.2756 \or 0.2924 \or 0.309  \or 0.3256 \or 0.342
\or 0.3584 \or 0.3746 \or 0.3907 \or 0.4067 \or 0.4226 \or 0.4384 \or 0.454  \or 0.4695 \or 0.4848 \or 0.5
\or 0.515  \or 0.5299 \or 0.5446 \or 0.5592 \or 0.5736 \or 0.5878 \or 0.6018 \or 0.6157 \or 0.6293 \or 0.6428
\or 0.6561 \or 0.6691 \or 0.682  \or 0.6947 \or 0.7071 \or 0.7193 \or 0.7314 \or 0.7431 \or 0.7547 \or 0.766
\or 0.7771 \or 0.788  \or 0.7986 \or 0.809  \or 0.8192 \or 0.829  \or 0.8387 \or 0.848  \or 0.8572 \or 0.866
\or 0.8746 \or 0.8829 \or 0.891  \or 0.8988 \or 0.9063 \or 0.9135 \or 0.9205 \or 0.9272 \or 0.9336 \or 0.9397
\or 0.9455 \or 0.9511 \or 0.9563 \or 0.9613 \or 0.9659 \or 0.9703 \or 0.9744 \or 0.9781 \or 0.9816 \or 0.9848
\or 0.9877 \or 0.9903 \or 0.9925 \or 0.9945 \or 0.9962 \or 0.9976 \or 0.9986 \or 0.9994 \or 0.9998 \or 1
\or 0.9998 \or 0.9994 \or 0.9986 \or 0.9976 \or 0.9962 \or 0.9945 \or 0.9925 \or 0.9903 \or 0.9877 \or 0.9848
\or 0.9816 \or 0.9781 \or 0.9744 \or 0.9703 \or 0.9659 \or 0.9613 \or 0.9563 \or 0.9511 \or 0.9455 \or 0.9397
\or 0.9336 \or 0.9272 \or 0.9205 \or 0.9135 \or 0.9063 \or 0.8988 \or 0.891  \or 0.8829 \or 0.8746 \or 0.866
\or 0.8572 \or 0.848  \or 0.8387 \or 0.829  \or 0.8192 \or 0.809  \or 0.7986 \or 0.788  \or 0.7771 \or 0.766
\or 0.7547 \or 0.7431 \or 0.7314 \or 0.7193 \or 0.7071 \or 0.6947 \or 0.682  \or 0.6691 \or 0.6561 \or 0.6428
\or 0.6293 \or 0.6157 \or 0.6018 \or 0.5878 \or 0.5736 \or 0.5592 \or 0.5446 \or 0.5299 \or 0.515  \or 0.5
\or 0.4848 \or 0.4695 \or 0.454  \or 0.4384 \or 0.4226 \or 0.4067 \or 0.3907 \or 0.3746 \or 0.3584 \or 0.342
\or 0.3256 \or 0.309  \or 0.2924 \or 0.2756 \or 0.2588 \or 0.2419 \or 0.225  \or 0.2079 \or 0.1908 \or 0.1736
\or 0.1564 \or 0.1392 \or 0.1219 \or 0.1045 \or 0.0872 \or 0.069  \or 0.0523 \or 0.0349 \or 0.0175 \or 0
\or-0.0175 \or-0.0349 \or-0.0523 \or-0.0698 \or-0.0872 \or-0.1045 \or-0.1219 \or-0.1392 \or-0.1564 \or-0.1736
\or-0.1908 \or-0.2079 \or-0.225  \or-0.2419 \or-0.2588 \or-0.2756 \or-0.2924 \or-0.309  \or-0.3256 \or-0.342
\or-0.3584 \or-0.3746 \or-0.3907 \or-0.4067 \or-0.4226 \or-0.4384 \or-0.454  \or-0.4695 \or-0.4848 \or-0.5
\or-0.515  \or-0.5299 \or-0.5446 \or-0.5592 \or-0.5736 \or-0.5878 \or-0.6018 \or-0.6157 \or-0.6293 \or-0.6428
\or-0.6561 \or-0.6691 \or-0.682  \or-0.6947 \or-0.7071 \or-0.7193 \or-0.7314 \or-0.7431 \or-0.7547 \or-0.766
\or-0.7771 \or-0.788  \or-0.7986 \or-0.809  \or-0.8192 \or-0.829  \or-0.8387 \or-0.848  \or-0.8572 \or-0.866
\or-0.8746 \or-0.8829 \or-0.891  \or-0.8988 \or-0.9063 \or-0.9135 \or-0.9205 \or-0.9272 \or-0.9336 \or-0.9397
\or-0.9455 \or-0.9511 \or-0.9563 \or-0.9613 \or-0.9659 \or-0.9703 \or-0.9744 \or-0.9781 \or-0.9816 \or-0.9848
\or-0.9877 \or-0.9903 \or-0.9925 \or-0.9945 \or-0.9962 \or-0.9976 \or-0.9986 \or-0.9994 \or-0.9998 \or-1
\or-0.9998 \or-0.9994 \or-0.9986 \or-0.9976 \or-0.9962 \or-0.9945 \or-0.9925 \or-0.9903 \or-0.9877 \or-0.9848
\or-0.9816 \or-0.9781 \or-0.9744 \or-0.9703 \or-0.9659 \or-0.9613 \or-0.9563 \or-0.9511 \or-0.9455 \or-0.9397
\or-0.9336 \or-0.9272 \or-0.9205 \or-0.9135 \or-0.9063 \or-0.8988 \or-0.891  \or-0.8829 \or-0.8746 \or-0.866
\or-0.8572 \or-0.848  \or-0.8387 \or-0.829  \or-0.8192 \or-0.809  \or-0.7986 \or-0.788  \or-0.7771 \or-0.766
\or-0.7547 \or-0.7431 \or-0.7314 \or-0.7193 \or-0.7071 \or-0.6947 \or-0.682  \or-0.6691 \or-0.6561 \or-0.6428
\or-0.6293 \or-0.6157 \or-0.6018 \or-0.5878 \or-0.5736 \or-0.5592 \or-0.5446 \or-0.5299 \or-0.515  \or-0.5
\or-0.4848 \or-0.4695 \or-0.454  \or-0.4384 \or-0.4226 \or-0.4067 \or-0.3907 \or-0.3746 \or-0.3584 \or-0.342
\or-0.3256 \or-0.309  \or-0.2924 \or-0.2756 \or-0.2588 \or-0.2419 \or-0.225  \or-0.2079 \or-0.1908 \or-0.1736
\or-0.1564 \or-0.1392 \or-0.1219 \or-0.1045 \or-0.0872 \or-0.0698 \or-0.0523 \or-0.0349 \or-0.0175 \or 0
\fi\p@}
%
%<!<< 数表tan >>>
\def\gettanval{%tan値(0-180degree)
\ifcase\bdeg 0
\or 0.0175 \or 0.0349 \or 0.0524 \or 0.0699 \or 0.0875 \or 0.1051 \or 0.1228 \or 0.1405 \or 0.1584 \or 0.1763
\or 0.1944 \or 0.2126 \or 0.2309 \or 0.2493 \or 0.2679 \or 0.2867 \or 0.3057 \or 0.3249 \or 0.3443 \or 0.364
\or 0.3839 \or 0.404  \or 0.4245 \or 0.4452 \or 0.4663 \or 0.4877 \or 0.5095 \or 0.5317 \or 0.5543 \or 0.5774
\or 0.6009 \or 0.6249 \or 0.6494 \or 0.6745 \or 0.7002 \or 0.7265 \or 0.7536 \or 0.7813 \or 0.8098 \or 0.8391
\or 0.8693 \or 0.9004 \or 0.9325 \or 0.9657 \or 1      \or 1.0355 \or 1.0724 \or 1.1106 \or 1.1504 \or 1.1918
\or 1.2349 \or 1.2799 \or 1.327  \or 1.3764 \or 1.4281 \or 1.4826 \or 1.5399 \or 1.6003 \or 1.6643 \or 1.7321
\or 1.804  \or 1.8807 \or 1.9626 \or 2.0503 \or 2.1445 \or 2.246  \or 2.3559 \or 2.4751 \or 2.6051 \or 2.7475
\or 2.9042 \or 3.0777 \or 3.2709 \or 3.4874 \or 3.7321 \or 4.0108 \or 4.3315 \or 4.7046 \or 5.1446 \or 5.6713
\or 6.3138 \or 7.1154 \or 8.1443 \or 9.5144 \or11.4301 \or14.3007 \or19.0811 \or28.6363 \or57.29   \or1000
\or-57.29  \or-28.6363\or-19.0811\or-14.3007\or-11.4301\or-9.5144 \or-8.1443 \or-7.1154 \or-6.3138 \or-5.6713
\or-5.1446 \or-4.7046 \or-4.3315 \or-4.0108 \or-3.7321 \or-3.4874 \or-3.2709 \or-3.0777 \or-2.9042 \or-2.7475
\or-2.6051 \or-2.4751 \or-2.3559 \or-2.246  \or-2.1445 \or-2.0503 \or-1.9626 \or-1.8807 \or-1.804  \or-1.7321
\or-1.6643 \or-1.6003 \or-1.5399 \or-1.4826 \or-1.4281 \or-1.3764 \or-1.327  \or-1.2799 \or-1.2349 \or-1.1918
\or-1.1504 \or-1.1106 \or-1.0724 \or-1.0355 \or-1      \or-0.9657 \or-0.9325 \or-0.9004 \or-0.8693 \or-0.8391
\or-0.8098 \or-0.7813 \or-0.7536 \or-0.7265 \or-0.7002 \or-0.6745 \or-0.6494 \or-0.6249 \or-0.6009 \or-0.5774
\or-0.5543 \or-0.5317 \or-0.5095 \or-0.4877 \or-0.4663 \or-0.4452 \or-0.4245 \or-0.404  \or-0.3839 \or-0.364
\or-0.3443 \or-0.3249 \or-0.3057 \or-0.2867 \or-0.2679 \or-0.2493 \or-0.2309 \or-0.2126 \or-0.1944 \or-0.1763
\or-0.1584 \or-0.1405 \or-0.1228 \or-0.1051 \or-0.0875 \or-0.0699 \or-0.0524 \or-0.0349 \or-0.0175 \or 0
\fi\p@}
%
%%<!<< 数表loge >>>
\def\getlogval{%常用対数値(0-1000真数)
\ifcase\anti -100
\or 0      \or 0.301  \or 0.4771 \or 0.6021 \or 0.699  \or 0.7782 \or 0.8451 \or 0.9031 \or 0.9542 \or 1
\or 1.0414 \or 1.0792 \or 1.1139 \or 1.1461 \or 1.1761 \or 1.2041 \or 1.2304 \or 1.2553 \or 1.2788 \or 1.301
\or 1.3222 \or 1.3424 \or 1.3617 \or 1.3802 \or 1.3979 \or 1.415  \or 1.4314 \or 1.4472 \or 1.4624 \or 1.4771
\or 1.4914 \or 1.5051 \or 1.5185 \or 1.5315 \or 1.5441 \or 1.5563 \or 1.5682 \or 1.5798 \or 1.5911 \or 1.6021
\or 1.6128 \or 1.6232 \or 1.6335 \or 1.6435 \or 1.6532 \or 1.6628 \or 1.6721 \or 1.6812 \or 1.6902 \or 1.699
\or 1.7076 \or 1.716  \or 1.7243 \or 1.7324 \or 1.7404 \or 1.7482 \or 1.7559 \or 1.7634 \or 1.7709 \or 1.7782
\or 1.7853 \or 1.7924 \or 1.7993 \or 1.8062 \or 1.8129 \or 1.8195 \or 1.8261 \or 1.8325 \or 1.8388 \or 1.8451
\or 1.8513 \or 1.8573 \or 1.8633 \or 1.8692 \or 1.8751 \or 1.8808 \or 1.8865 \or 1.8921 \or 1.8976 \or 1.9031
\or 1.9085 \or 1.9138 \or 1.9191 \or 1.9243 \or 1.9294 \or 1.9345 \or 1.9395 \or 1.9445 \or 1.9494 \or 1.9542
\or 1.959  \or 1.9638 \or 1.9685 \or 1.9731 \or 1.9777 \or 1.9823 \or 1.9868 \or 1.9912 \or 1.9956 \or 2
\or 2.0043 \or 2.0086 \or 2.0128 \or 2.017  \or 2.0212 \or 2.0253 \or 2.0294 \or 2.0334 \or 2.0374 \or 2.0414
\or 2.0453 \or 2.0492 \or 2.0531 \or 2.0569 \or 2.0607 \or 2.0645 \or 2.0682 \or 2.0719 \or 2.0755 \or 2.0792
\or 2.0828 \or 2.0864 \or 2.0899 \or 2.0934 \or 2.0969 \or 2.1004 \or 2.1038 \or 2.1072 \or 2.1106 \or 2.1139
\or 2.1173 \or 2.1206 \or 2.1239 \or 2.1271 \or 2.1303 \or 2.1335 \or 2.1367 \or 2.1399 \or 2.143  \or 2.1461
\or 2.1492 \or 2.1523 \or 2.1553 \or 2.1584 \or 2.1614 \or 2.1644 \or 2.1673 \or 2.1703 \or 2.1732 \or 2.1761
\or 2.179  \or 2.1818 \or 2.1847 \or 2.1875 \or 2.1903 \or 2.1931 \or 2.1959 \or 2.1987 \or 2.2014 \or 2.2041
\or 2.2068 \or 2.2095 \or 2.2122 \or 2.2148 \or 2.2175 \or 2.2201 \or 2.2227 \or 2.2253 \or 2.2279 \or 2.2304
\or 2.233  \or 2.2355 \or 2.238  \or 2.2405 \or 2.243  \or 2.2455 \or 2.248  \or 2.2504 \or 2.2529 \or 2.2553
\or 2.2577 \or 2.2601 \or 2.2625 \or 2.2648 \or 2.2672 \or 2.2695 \or 2.2718 \or 2.2742 \or 2.2765 \or 2.2788
\or 2.281  \or 2.2833 \or 2.2856 \or 2.2878 \or 2.29   \or 2.2923 \or 2.2945 \or 2.2967 \or 2.2989 \or 2.301
\or 2.3032 \or 2.3054 \or 2.3075 \or 2.3096 \or 2.3118 \or 2.3139 \or 2.316  \or 2.3181 \or 2.3201 \or 2.3222
\or 2.3243 \or 2.3263 \or 2.3284 \or 2.3304 \or 2.3324 \or 2.3345 \or 2.3365 \or 2.3385 \or 2.3404 \or 2.3424
\or 2.3444 \or 2.3464 \or 2.3483 \or 2.3502 \or 2.3522 \or 2.3541 \or 2.356  \or 2.3579 \or 2.3598 \or 2.3617
\or 2.3636 \or 2.3655 \or 2.3674 \or 2.3692 \or 2.3711 \or 2.3729 \or 2.3747 \or 2.3766 \or 2.3784 \or 2.3802
\or 2.382  \or 2.3838 \or 2.3856 \or 2.3874 \or 2.3892 \or 2.3909 \or 2.3927 \or 2.3945 \or 2.3962 \or 2.3979
\or 2.3997 \or 2.4014 \or 2.4031 \or 2.4048 \or 2.4065 \or 2.4082 \or 2.4099 \or 2.4116 \or 2.4133 \or 2.415
\or 2.4166 \or 2.4183 \or 2.42   \or 2.4216 \or 2.4232 \or 2.4249 \or 2.4265 \or 2.4281 \or 2.4298 \or 2.4314
\or 2.433  \or 2.4346 \or 2.4362 \or 2.4378 \or 2.4393 \or 2.4409 \or 2.4425 \or 2.444  \or 2.4456 \or 2.4472
\or 2.4487 \or 2.4502 \or 2.4518 \or 2.4533 \or 2.4548 \or 2.4564 \or 2.4579 \or 2.4594 \or 2.4609 \or 2.4624
\or 2.4639 \or 2.4654 \or 2.4669 \or 2.4683 \or 2.4698 \or 2.4713 \or 2.4728 \or 2.4742 \or 2.4757 \or 2.4771
\or 2.4786 \or 2.48   \or 2.4814 \or 2.4829 \or 2.4843 \or 2.4857 \or 2.4871 \or 2.4886 \or 2.49   \or 2.4914
\or 2.4928 \or 2.4942 \or 2.4955 \or 2.4969 \or 2.4983 \or 2.4997 \or 2.5011 \or 2.5024 \or 2.5038 \or 2.5051
\or 2.5065 \or 2.5079 \or 2.5092 \or 2.5105 \or 2.5119 \or 2.5132 \or 2.5145 \or 2.5159 \or 2.5172 \or 2.5185
\or 2.5198 \or 2.5211 \or 2.5224 \or 2.5237 \or 2.525  \or 2.5263 \or 2.5276 \or 2.5289 \or 2.5302 \or 2.5315
\or 2.5328 \or 2.534  \or 2.5353 \or 2.5366 \or 2.5378 \or 2.5391 \or 2.5403 \or 2.5416 \or 2.5428 \or 2.5441
\or 2.5453 \or 2.5465 \or 2.5478 \or 2.549  \or 2.5502 \or 2.5514 \or 2.5527 \or 2.5539 \or 2.5551 \or 2.5563
\or 2.5575 \or 2.5587 \or 2.5599 \or 2.5611 \or 2.5623 \or 2.5635 \or 2.5647 \or 2.5658 \or 2.567  \or 2.5682
\or 2.5694 \or 2.5705 \or 2.5717 \or 2.5729 \or 2.574  \or 2.5752 \or 2.5763 \or 2.5775 \or 2.5786 \or 2.5798
\or 2.5809 \or 2.5821 \or 2.5832 \or 2.5843 \or 2.5855 \or 2.5866 \or 2.5877 \or 2.5888 \or 2.5899 \or 2.5911
\or 2.5922 \or 2.5933 \or 2.5944 \or 2.5955 \or 2.5966 \or 2.5977 \or 2.5988 \or 2.5999 \or 2.601  \or 2.6021
\or 2.6031 \or 2.6042 \or 2.6053 \or 2.6064 \or 2.6075 \or 2.6085 \or 2.6096 \or 2.6107 \or 2.6117 \or 2.6128
\or 2.6138 \or 2.6149 \or 2.616  \or 2.617  \or 2.618  \or 2.6191 \or 2.6201 \or 2.6212 \or 2.6222 \or 2.6232
\or 2.6243 \or 2.6253 \or 2.6263 \or 2.6274 \or 2.6284 \or 2.6294 \or 2.6304 \or 2.6314 \or 2.6325 \or 2.6335
\or 2.6345 \or 2.6355 \or 2.6365 \or 2.6375 \or 2.6385 \or 2.6395 \or 2.6405 \or 2.6415 \or 2.6425 \or 2.6435
\or 2.6444 \or 2.6454 \or 2.6464 \or 2.6474 \or 2.6484 \or 2.6493 \or 2.6503 \or 2.6513 \or 2.6522 \or 2.6532
\or 2.6542 \or 2.6551 \or 2.6561 \or 2.6571 \or 2.658  \or 2.659  \or 2.6599 \or 2.6609 \or 2.6618 \or 2.6628
\or 2.6637 \or 2.6646 \or 2.6656 \or 2.6665 \or 2.6675 \or 2.6684 \or 2.6693 \or 2.6702 \or 2.6712 \or 2.6721
\or 2.673  \or 2.6739 \or 2.6749 \or 2.6758 \or 2.6767 \or 2.6776 \or 2.6785 \or 2.6794 \or 2.6803 \or 2.6812
\or 2.6821 \or 2.683  \or 2.6839 \or 2.6848 \or 2.6857 \or 2.6866 \or 2.6875 \or 2.6884 \or 2.6893 \or 2.6902
\or 2.6911 \or 2.692  \or 2.6928 \or 2.6937 \or 2.6946 \or 2.6955 \or 2.6964 \or 2.6972 \or 2.6981 \or 2.699
\or 2.6998 \or 2.7007 \or 2.7016 \or 2.7024 \or 2.7033 \or 2.7042 \or 2.705  \or 2.7059 \or 2.7067 \or 2.7076
\or 2.7084 \or 2.7093 \or 2.7101 \or 2.711  \or 2.7118 \or 2.7126 \or 2.7135 \or 2.7143 \or 2.7152 \or 2.716
\or 2.7168 \or 2.7177 \or 2.7185 \or 2.7193 \or 2.7202 \or 2.721  \or 2.7218 \or 2.7226 \or 2.7235 \or 2.7243
\or 2.7251 \or 2.7259 \or 2.7267 \or 2.7275 \or 2.7284 \or 2.7292 \or 2.73   \or 2.7308 \or 2.7316 \or 2.7324
\or 2.7332 \or 2.734  \or 2.7348 \or 2.7356 \or 2.7364 \or 2.7372 \or 2.738  \or 2.7388 \or 2.7396 \or 2.7404
\or 2.7412 \or 2.7419 \or 2.7427 \or 2.7435 \or 2.7443 \or 2.7451 \or 2.7459 \or 2.7466 \or 2.7474 \or 2.7482
\or 2.749  \or 2.7497 \or 2.7505 \or 2.7513 \or 2.752  \or 2.7528 \or 2.7536 \or 2.7543 \or 2.7551 \or 2.7559
\or 2.7566 \or 2.7574 \or 2.7582 \or 2.7589 \or 2.7597 \or 2.7604 \or 2.7612 \or 2.7619 \or 2.7627 \or 2.7634
\or 2.7642 \or 2.7649 \or 2.7657 \or 2.7664 \or 2.7672 \or 2.7679 \or 2.7686 \or 2.7694 \or 2.7701 \or 2.7709
\or 2.7716 \or 2.7723 \or 2.7731 \or 2.7738 \or 2.7745 \or 2.7752 \or 2.776  \or 2.7767 \or 2.7774 \or 2.7782
\or 2.7789 \or 2.7796 \or 2.7803 \or 2.781  \or 2.7818 \or 2.7825 \or 2.7832 \or 2.7839 \or 2.7846 \or 2.7853
\or 2.786  \or 2.7868 \or 2.7875 \or 2.7882 \or 2.7889 \or 2.7896 \or 2.7903 \or 2.791  \or 2.7917 \or 2.7924
\or 2.7931 \or 2.7938 \or 2.7945 \or 2.7952 \or 2.7959 \or 2.7966 \or 2.7973 \or 2.798  \or 2.7987 \or 2.7993
\or 2.8    \or 2.8007 \or 2.8014 \or 2.8021 \or 2.8028 \or 2.8035 \or 2.8041 \or 2.8048 \or 2.8055 \or 2.8062
\or 2.8069 \or 2.8075 \or 2.8082 \or 2.8089 \or 2.8096 \or 2.8102 \or 2.8109 \or 2.8116 \or 2.8122 \or 2.8129
\or 2.8136 \or 2.8142 \or 2.8149 \or 2.8156 \or 2.8162 \or 2.8169 \or 2.8176 \or 2.8182 \or 2.8189 \or 2.8195
\or 2.8202 \or 2.8209 \or 2.8215 \or 2.8222 \or 2.8228 \or 2.8235 \or 2.8241 \or 2.8248 \or 2.8254 \or 2.8261
\or 2.8267 \or 2.8274 \or 2.828  \or 2.8287 \or 2.8293 \or 2.8299 \or 2.8306 \or 2.8312 \or 2.8319 \or 2.8325
\or 2.8331 \or 2.8338 \or 2.8344 \or 2.8351 \or 2.8357 \or 2.8363 \or 2.837  \or 2.8376 \or 2.8382 \or 2.8388
\or 2.8395 \or 2.8401 \or 2.8407 \or 2.8414 \or 2.842  \or 2.8426 \or 2.8432 \or 2.8439 \or 2.8445 \or 2.8451
\or 2.8457 \or 2.8463 \or 2.847  \or 2.8476 \or 2.8482 \or 2.8488 \or 2.8494 \or 2.85   \or 2.8506 \or 2.8513
\or 2.8519 \or 2.8525 \or 2.8531 \or 2.8537 \or 2.8543 \or 2.8549 \or 2.8555 \or 2.8561 \or 2.8567 \or 2.8573
\or 2.8579 \or 2.8585 \or 2.8591 \or 2.8597 \or 2.8603 \or 2.8609 \or 2.8615 \or 2.8621 \or 2.8627 \or 2.8633
\or 2.8639 \or 2.8645 \or 2.8651 \or 2.8657 \or 2.8663 \or 2.8669 \or 2.8675 \or 2.8681 \or 2.8686 \or 2.8692
\or 2.8698 \or 2.8704 \or 2.871  \or 2.8716 \or 2.8722 \or 2.8727 \or 2.8733 \or 2.8739 \or 2.8745 \or 2.8751
\or 2.8756 \or 2.8762 \or 2.8768 \or 2.8774 \or 2.8779 \or 2.8785 \or 2.8791 \or 2.8797 \or 2.8802 \or 2.8808
\or 2.8814 \or 2.882  \or 2.8825 \or 2.8831 \or 2.8837 \or 2.8842 \or 2.8848 \or 2.8854 \or 2.8859 \or 2.8865
\or 2.8871 \or 2.8876 \or 2.8882 \or 2.8887 \or 2.8893 \or 2.8899 \or 2.8904 \or 2.891  \or 2.8915 \or 2.8921
\or 2.8927 \or 2.8932 \or 2.8938 \or 2.8943 \or 2.8949 \or 2.8954 \or 2.896  \or 2.8965 \or 2.8971 \or 2.8976
\or 2.8982 \or 2.8987 \or 2.8993 \or 2.8998 \or 2.9004 \or 2.9009 \or 2.9015 \or 2.902  \or 2.9025 \or 2.9031
\or 2.9036 \or 2.9042 \or 2.9047 \or 2.9053 \or 2.9058 \or 2.9063 \or 2.9069 \or 2.9074 \or 2.9079 \or 2.9085
\or 2.909  \or 2.9096 \or 2.9101 \or 2.9106 \or 2.9112 \or 2.9117 \or 2.9122 \or 2.9128 \or 2.9133 \or 2.9138
\or 2.9143 \or 2.9149 \or 2.9154 \or 2.9159 \or 2.9165 \or 2.917  \or 2.9175 \or 2.918  \or 2.9186 \or 2.9191
\or 2.9196 \or 2.9201 \or 2.9206 \or 2.9212 \or 2.9217 \or 2.9222 \or 2.9227 \or 2.9232 \or 2.9238 \or 2.9243
\or 2.9248 \or 2.9253 \or 2.9258 \or 2.9263 \or 2.9269 \or 2.9274 \or 2.9279 \or 2.9284 \or 2.9289 \or 2.9294
\or 2.9299 \or 2.9304 \or 2.9309 \or 2.9315 \or 2.932  \or 2.9325 \or 2.933  \or 2.9335 \or 2.934  \or 2.9345
\or 2.935  \or 2.9355 \or 2.936  \or 2.9365 \or 2.937  \or 2.9375 \or 2.938  \or 2.9385 \or 2.939  \or 2.9395
\or 2.94   \or 2.9405 \or 2.941  \or 2.9415 \or 2.942  \or 2.9425 \or 2.943  \or 2.9435 \or 2.944  \or 2.9445
\or 2.945  \or 2.9455 \or 2.946  \or 2.9465 \or 2.9469 \or 2.9474 \or 2.9479 \or 2.9484 \or 2.9489 \or 2.9494
\or 2.9499 \or 2.9504 \or 2.9509 \or 2.9513 \or 2.9518 \or 2.9523 \or 2.9528 \or 2.9533 \or 2.9538 \or 2.9542
\or 2.9547 \or 2.9552 \or 2.9557 \or 2.9562 \or 2.9566 \or 2.9571 \or 2.9576 \or 2.9581 \or 2.9586 \or 2.959
\or 2.9595 \or 2.96   \or 2.9605 \or 2.9609 \or 2.9614 \or 2.9619 \or 2.9624 \or 2.9628 \or 2.9633 \or 2.9638
\or 2.9643 \or 2.9647 \or 2.9652 \or 2.9657 \or 2.9661 \or 2.9666 \or 2.9671 \or 2.9675 \or 2.968  \or 2.9685
\or 2.9689 \or 2.9694 \or 2.9699 \or 2.9703 \or 2.9708 \or 2.9713 \or 2.9717 \or 2.9722 \or 2.9727 \or 2.9731
\or 2.9736 \or 2.9741 \or 2.9745 \or 2.975  \or 2.9754 \or 2.9759 \or 2.9763 \or 2.9768 \or 2.9773 \or 2.9777
\or 2.9782 \or 2.9786 \or 2.9791 \or 2.9795 \or 2.98   \or 2.9805 \or 2.9809 \or 2.9814 \or 2.9818 \or 2.9823
\or 2.9827 \or 2.9832 \or 2.9836 \or 2.9841 \or 2.9845 \or 2.985  \or 2.9854 \or 2.9859 \or 2.9863 \or 2.9868
\or 2.9872 \or 2.9877 \or 2.9881 \or 2.9886 \or 2.989  \or 2.9894 \or 2.9899 \or 2.9903 \or 2.9908 \or 2.9912
\or 2.9917 \or 2.9921 \or 2.9926 \or 2.993  \or 2.9934 \or 2.9939 \or 2.9943 \or 2.9948 \or 2.9952 \or 2.9956
\or 2.9961 \or 2.9965 \or 2.9969 \or 2.9974 \or 2.9978 \or 2.9983 \or 2.9987 \or 2.9991 \or 2.9996 \or 3
\fi\p@}

%------------------------------------------------------------------------------------------------
%<!<< 簡易マニュアル >>>
\def\man{\par
  {\small
  \begin{tabular}{ll}
    ---------------------------------------------\\
    $\backslash$baseskip\{$x$\}                            & $x$だけ右へ移動（負の値なら左）\\
    $\backslash$coordinate[$ax$]($x_l$, $x_r$)($y_b$, $y_t$)& $ax$ $\to$ (A, R, I, P)+(g) \\
                                                           & $ax$ $\to$ d or r では $1x = 30^\circ$, $1y = 0.5$ \\
    $\backslash$locate[$circ$]($x$, $y$)                   & $circ$ $\to$ (b, w, B, W)+(x) \\
    $\backslash$linexis\{a\}\{op\}($y_b$, $y_t$)           & $x = a$（op $\to$ : で破線） \\
    $\backslash$easyfx[RPN]\{op\}($x_l$, $x_r$)            & $y = $ [RPNで記述した関数]（op $\to$ : で破線） \\
    $\backslash$sindegree[a, b, c, d]($x_l$, $x_r$)        & $y = a\sin(bx+c)+d$;\quad c, $x_l$, $x_r$ は整数度 \\
    （$\backslash$tandegree[a, b, c, d]($x_l$, $x_r$)も同様）& b $\to$ (1, 2, 3, 4, 0.5, 0.33, 0.25) \\
    $\backslash$hyperoval\{op\}[a, b, C, D]($x_l$, $x_r$)  & $(x-a)^2/C+(y-b)^2/D = 1$ \\
    {\scriptsize（$C,~D>0$ $\to$ 楕円;\quad $C*D<0$ $\to$ 双曲線）} & op $\to$ (なし) or + or - \\
    ---------------------------------------------\\
    $\backslash$unitcircle[$t$-$ax$]                       & $t$-$ax$ $\to$ t \\
    $\backslash$rangeline($l$, $r$)\{$ax$\}                & $l$から$r$までの数直線;\quad $ax$ $\to$ 数直線の名称 \\
    $\backslash$brange\{$n$\}($s$, $e$)\{$v$\}             & 始点$s$（黒丸）から$e$まで伸びる数直線線分 \\
    （$\backslash$wrange\{$n$\}($s$, $e$)\{$v$\}も同様）     & $n$ $\to$ $0$, $1$, $2$, $3$, $4$;\quad $v$ $\to$ 丸位置の値 \\
    ---------------------------------------------\\
    $\backslash$dotsgrid\{$d$\}($x_1$, $y_1$)($x_2$, $y_2$)& $d$間隔の格子点を左下座標-右上座標まで描画 \\
    $\backslash$siiide\{op\}($x_1$, $y_1$)($x_2$, $y_2$)($x_3$, $y_3$) & 連鎖線分の描画\ （他に$\backslash$siide、$\backslash$siiiide） \\
    $\backslash$vsiide\{op\}($x_s$, $y_s$)($x_e$, $y_e$)   & 2点間の線分ベクトルの描画 \\
    $\backslash$poooly\{op\}($x_1$, $y_1$)($x_2$, $y_2$)($x_3$, $y_3$) & 三角形の描画\ （四角形は$\backslash$pooooly） \\
                                                           & （以上、op $\to$ : で破線）\\
    $\backslash$apeeex($x_1$, $y_1$)X($x_2$, $y_2$)Y($x_3$, $y_3$)Z & 頂点X, Y, Zの表示\ （他に$\backslash$apex、$\backslash$apeex） \\
    $\backslash$vertex(c, d, r)\{$\theta$\}X               & 中心$(c, d)$、半径$r$を$\theta$回転した位置にXを表示 \\
    $\backslash$slur[$dots$]\{op\}($x_1$, $y_1$)($x_2$, $y_2$)X    & 2点間にスラー線を引きXを表示 \\
                                                           & $dots$ $\to$ 点線の数、op $\to$ + or - \\
    $\backslash$arcdegree\{op\}(c, d, r)($\alpha$, $\beta$)& 中心$(c, d)$、半径$r$、整数度[$\alpha^\circ$, $\beta^\circ$]の弧（$\alpha < \beta$）\\
                                                           & op $\to$ + or - or * \\
    $\backslash$extendline\{$l$\}($x_l$, $y_l$)($x_r$, $y_r$)\{$r$\}& $(x_l,~y_l)$-$(x_r,~y_r)$の左$\cdot$右を長さ$l\cdot r$延ばした線分 \\
    $\backslash$putsymbol[$sym$]$l$($x_1$, $y_1$)($x_2$, $y_2$)$t$  & 2点$(x_1,~y_1)$、$(x_2,~y_2)$の$t$分点に線長$l$の記号類 \\
                                                           & $sym$ $\to$ r（直角） or e/E（等辺） or p/P（平行） \\
    $\backslash$vparade[$r$]V$_1$V$_2$V$_3$V$_4$;$\theta_1\theta_2\theta_3\theta_4$  & 主に頂点名称をまとめて表示 \\
    $\backslash$v*to$n$（*はa,b,c,d）、$\backslash$vpop  & 頂点の値の退避、全頂点の値呼び出し \\
    ---------------------------------------------\\
    $\backslash$ORBIT$n$($x$, $y$, $r$)$\theta$            & 1点からの半径$r$、角$\theta$の点($\backslash$X\_n, $\backslash$Y\_n)を計算 \\
    $\backslash$DIVIDE$n$($x_1$, $y_1$)($x_2$, $y_2$)$t$   & 2点の$t:(1-t)$分点($\backslash$X\_n, $\backslash$Y\_n)を計算 \\
    $\backslash$CUTLINE$n$($x_1$, $y_1$)($x_2$, $y_2$)$l$  & 線分上の長さ$l$の終点($\backslash$X\_n, $\backslash$Y\_n)を計算 \\
    $\backslash$XPOINT$n$($x_1$, $y_1$)($x_2$, $y_2$)($x_3$, $y_3$)($x_4$, $y_4$) & $2$線分の交点($\backslash$X\_n, $\backslash$Y\_n)を計算 \\
    $\backslash$PLFOOT$n$($x_1$, $y_1$)($x_2$, $y_2$)($x_3$, $y_3$) & 垂線の足($\backslash$X\_n, $\backslash$Y\_n)を計算 \\
    $\backslash$PLHEAD$n$($x_1$, $y_1$)($x_2$, $y_2$)      & 垂線の頭($\backslash$X\_n, $\backslash$Y\_n)を計算 \\
    $\backslash$PARALLEL$n$($x_0$, $y_0$)($d_x$, $d_y$)      & 平行移動した点($\backslash$X\_n, $\backslash$Y\_n)を計算 \\
    $\backslash$SYMMETRY$n$($x_0$, $y_0$)($p_1$, $p_2$)($q_1$, $q_2$)& 線対称移動した点($\backslash$X\_n, $\backslash$Y\_n)を計算 \\
    $\backslash$ROTATION$n$($x_0$, $y_0$)($c$, $d$)$\theta$  & 回転移動した点($\backslash$X\_n, $\backslash$Y\_n)を計算 \\
    $\backslash$DOWNSIZE$n$\{op\}($x_1$, $y_1$, $z_1$)     & 3D座標を2D位置($\backslash$X\_n, $\backslash$Y\_n)に変換 \\
    {\scriptsize（$\backslash$ThreeDimAxis($x_{len}$, $y_{len}$,$z_{len}$)($\theta$, $\varphi$)} & （op $\to$ : で2D位置を破線で補助）\\
    {\qquad\scriptsize および、$\backslash$Rotate($\theta$, $\varphi$)と併用）} & {\scriptsize（$x$-$y$-$z$座標軸描画、および、空間座標の視点を固定）}\\
    $\backslash$VECSCROSS$n$($x_1$, $y_1$)$s$($x_2$, $y_2$)$t$   & $(x_1,y_1)s+(x_2,y_2)t$の対角($\backslash$X\_n, $\backslash$Y\_n)を計算 \\
    {\scriptsize（$\backslash$PINON($x_0$,~$y_0$)と併用）}   & {\scriptsize（2つのベクトルの始点を固定）}\\
    $\backslash$IOCROSSES$n$($x_1$, $y_1$)($x_2$, $y_2$)(c, d, r)& 直線と円の2交点を計算 \\
    $\backslash$OOCROSSES$n$(c$_1$, d$_1$, r$_1$)(c$_2$, d$_2$, r$_2$)& 円と円の2交点を計算 \\
                                                           & （以上、$n$ $\to$ 1 or 2 or 3 or 4）\\
    $\backslash$DISTANCE$n$($x_1$, $y_1$)($x_2$, $y_2$)    & 2点間の距離$\backslash$D\_nを計算（$n$ $\to$ 1 or 2） \\
  \end{tabular}
}}
%dman
\def\s@pt{$\backslash$strip@pt}  \def\dmn@{$\backslash$dimen@}
\def\tmpa{$\backslash$tempa}  \def\tmpb{$\backslash$tempb}  \def\tmpc{$\backslash$tempc}
\def\dman{\par
  {\small
  \begin{tabular}{ll}
    \#1, \#2 & \s@pt\dmn@ \\
        & \s@pt\tmpa, \s@pt\tmpb, \s@pt\tmpc \\
        & 数値 \\
    $\backslash$dimensum(\#1,\#2) & $(\#1)+(\#2) \to$ \dmn@ \\
    $\backslash$dimensum(\#1,-\#2)& $(\#1)-(\#2) \to$ \dmn@ \\
    $\backslash$dimenmul(\#1,\#2) & $(\#1)*(\#2) \to$ \dmn@ \\
    $\backslash$dimendiv(\#1,\#2) & $(\#1)/(\#2) \to$ \dmn@ \\
    $\backslash$dimensqrt\{\#1\}  & $\sqrt{\#1} \to$ \dmn@ \\
        & 必ず\tmpa=\dmn@ $\backslash$dimensqrt\{\s@pt\tmpa\} \\
    $\backslash$dimencbrt\{\#1\}  & $\sqrt[3]{\#1} \to$ \dmn@ \\
        & 必ず\tmpa=\dmn@ $\backslash$dimencbrt\{\s@pt\tmpa\} \\
    $\backslash$dimenexp & $e^{(\backslash\textrm{dimen@})} \to$ \dmn@ \\
    $\backslash$dimenlog & $\log_e(\backslash\textrm{dimen@}) \to$ \dmn@ \\
    $\backslash$dimensin & $\sin(\backslash\textrm{dimen@}) \to$ \dmn@ \\
    $\backslash$dimencos & $\cos(\backslash\textrm{dimen@}) \to$ \dmn@
  \end{tabular}
}}