\catcode`@=11%
%
% number of decimals to present to pstricks
\def\VDDd@psdecs{5}%
\def\VDDd@infty{50}% maxlength of halfline
%
\def\VDDdpsarrows@#1&#2&#3:#4 {%
  {%
    \VDDround@ #1&#2&
    \psline[#4]{<->}(\VDDx{#1},\VDDy{#1})(\VDDx{#2},\VDDy{#2})%
  }%
  \ifx\end#3\end\else\VDDdpsline@#2&#3:#4 \fi
}%
\def\VDDdpsarrows#1:#2 {%
  \VDDparse@\VDDdef@\VDDparsetmp@#1
  \expandafter\VDDdpsarrows@\VDDparsetmp@&:#2
}%
\def\VDDdpsvec@#1&#2&#3:#4 {%
  {%
    \VDDround@ #1&#2&
    \psline[#4]{c->}(\VDDx{#1},\VDDy{#1})(\VDDx{#2},\VDDy{#2})%
  }%
  \ifx\end#3\end\else\VDDdpsvec@#2&#3:#4 \fi
}%
\def\VDDdpsline@#1&#2&#3:#4 {%
  {%
    \VDDround@ #1&#2&
    \psline[#4]{c-c}(\VDDx{#1},\VDDy{#1})(\VDDx{#2},\VDDy{#2})%
  }%
  \ifx\end#3\end\else\VDDdpsline@#2&#3:#4 \fi
}%
\def\VDDdpsvec#1:#2 {%
  \VDDparse@\VDDdef@\VDDparsetmp@#1
  \expandafter\VDDdpsvec@\VDDparsetmp@&:#2
}%
\def\VDDdpsline#1:#2 {%
  \VDDparse@\VDDdef@\VDDparsetmp@#1
  \expandafter\VDDdpsline@\VDDparsetmp@&:#2
}%
\def\VDDdellips@#1&#2:#3 {%
  {%
    \edef\ti{#3}\FPset\dist{\ti}%
    \VDDcopy@ ti&A&tii&B&:#1&ti&#2&tii&
    \VDDcavg M:AB
    \VDDcsub@ dir:B&A&
    \VDDclength@\fdist:dir
    \ifFPgt\dist\fdist\then
       %\VDDmessage M
       \FPdiv\a\dist{2}%
       \FPupn\b{2 dist dist mul fdist fdist mul sub root 2 div}%
       %\VDDmessage@ dir&
       \VDDcanglehatx@\angle:dir
       %\message{angle=\angle}%
       \VDDround@ M&
       \FPround\a\a{\VDDd@psdecs}%
       \FPround\b\b{\VDDd@psdecs}%
       \FPround\angle\angle{\VDDd@psdecs}%
       \psellipse[dimen=middle,rot=\angle](\VDDx{M},\VDDy{M})(\a,\b)%
       %\message{a=\a b=\b}%
       %\message{ok}%
    \else
       \errmessage{distance of ellips \dist < distance of focal points \fdist}%
    \fi
  }%
}%
\def\VDDdellipspoint@#1&#2:#3& {%
  {%
    \VDDcplength@\leni:#1&#3&
    \VDDcplength@\lenii:#2&#3&
    \FPadd\r{\leni}{\lenii}%
    \VDDdellips@#1&#2:\r{}
  }%
}%
\def\VDDdellipspoint#1:#2 {%
  \def\VDDparse@tmp{}%
  \VDDparse@letter\VDDdef@\VDDparse@tmp#1
  \edef\VDDparse@tmp{\VDDparse@tmp:}%
  \VDDparse@letter\VDDdef@\VDDparse@tmp#2
  \expandafter\VDDdellipspoint@\VDDparse@tmp&
}%
\def\VDDdellips#1:#2 {%
  \def\VDDparse@tmp{}%
  \VDDparse@letter\VDDdef@\VDDparse@tmp#1
  \expandafter\VDDdellips@\VDDparse@tmp:#2
}%
\def\VDDdparabola@#1:#2:{%
  {%
    \VDDcopy@ ti&F&tii&ld&tiii&lp&:#1&ti&#2d&tii&#2p&tiii&
    \VDDcleadline@ k&:l&:F&
    \VDDcintersect@ B:l&k:
    \VDDcavg@ T:F&B&
    \VDDcplength@\length:F&B&
    \FPmul\length2\length
    \VDDcpanglehaty@\angle:F&B
    \FPneg\angle\angle
    \FPround{\angle}{\angle}{\VDDd@psdecs}%
    \rput[b]{\angle}(\VDDx{T},\VDDy{T}){%
      \FPiflt\length\VDDd@infty
        \FPupn\x{2 \VDDd@infty{} \length{} mul root \VDDd@psdecs{} round}%
        \parabola{c-c}(\x,\VDDd@infty)(0,0)%
      \else
	\FPupn\y{2 \VDDd@infty{} pow \length{} div \VDDd@psdecs{} round}%
        \parabola{c-c}(\VDDd@infty,\y)(0,0)%
      \fi
    }%
  }%
}%
\def\VDDdparabola#1:#2 {%
  \def\VDDparse@tmp{}%
  \VDDparse@letter\VDDdef@\VDDparse@tmp#1
  \edef\VDDparse@tmp{\VDDparse@tmp:}%
  \VDDparse@letter\VDDdef@dontcare\VDDparse@tmp#2
  \expandafter\VDDdparabola@\VDDparse@tmp:
}%
\def\VDDdstar@#1&#2:#3& {%
  \VDDdpsline@#1&#3&:
  \ifx\end#2\end\else\VDDdstar@#2:#3& \fi
}%
\def\VDDdstar#1:#2 {%
  \VDDparse@\VDDdef@\VDDparsetmp@#1
  \edef\VDDparsetmp@{\VDDparsetmp@&:}%
  \VDDparse@letter\VDDdef@\VDDparsetmp@#2
  \expandafter\VDDdstar@\VDDparsetmp@&
}%
\def\VDDdfillpolygon@@#1&#2 {%
  \FPround\VDDdfillpolygon@@tmpx{\VDDx{#1}}{\VDDd@psdecs}%
  \FPround\VDDdfillpolygon@@tmpy{\VDDy{#1}}{\VDDd@psdecs}%
  \edef\VDDdfillpolygon@tmp{%
    \VDDdfillpolygon@tmp(\VDDdfillpolygon@@tmpx,\VDDdfillpolygon@@tmpy)}%
  \ifx\end#2\end\else\VDDdfillpolygon@@#2 \fi
}%
\def\VDDdfillpolygon@#1#2 {%
  \def\VDDdfillpolygon@tmp{[#1,linestyle=none]}%
  \VDDdfillpolygon@@#2
  \expandafter\pspolygon\VDDdfillpolygon@tmp
}%
\def\VDDdncarc@#1&#2&#3 {%
  {%
    \VDDround@#1&#2&
    \ncarc(\VDDx{#1},\VDDy{#1})(\VDDx{#2},\VDDy{#2})%
  }%
}%
\def\VDDdncarc#1 {%
  \VDDparse@\VDDdef@\VDDparse@tmp#1
  \expandafter\VDDdncarc@\VDDparse@tmp&
}%
\def\VDDdfillpolygon#1#2 {%
  \edef\VDDparse@tmp{{#1}}%
  \VDDparse@letter\VDDdef@\VDDparse@tmp#2
  \expandafter\VDDdfillpolygon@\VDDparse@tmp&
}%
\def\VDDdfillcircle@#1#2&:#3 {%
  {%
    \VDDround@#2&
    \FPround{\bla}{#3}{\VDDd@psdecs}%
    \pscircle[#1,linestyle=none,dimen=middle](\VDDx{#2},\VDDy{#2}){\bla}%
  }%
}%
\def\VDDdfillellipseradii@#1#2&:#3,#4 {%
  {%
    \VDDround@#2&
    \FPround{\ri}{#3}{\VDDd@psdecs}%
    \FPround{\rii}{#4}{\VDDd@psdecs}%
    \psellipse[#1,linestyle=none,dimen=middle](\VDDx{#2},\VDDy{#2})(\ri,\rii)%
  }%
}% 
\def\VDDdellipseradii@#1&:#2,#3 {%
  {%
    \VDDround@#1&
    \FPround{\ri}{#2}{\VDDd@psdecs}%
    \FPround{\rii}{#3}{\VDDd@psdecs}%
    \psellipse[dimen=middle](\VDDx{#1},\VDDy{#1})(\ri,\rii)%
  }%
}% 
\def\VDDdarc@#1&:#2:#3:#4 {%
  {%
    \VDDround@#1&
    \FPround{\radius}{#2}{\VDDd@psdecs}%
    \FPround{\start}{#3}{\VDDd@psdecs}%
    \FPround{\stop}{#4}{\VDDd@psdecs}%
    \psarc[dimen=middle](\VDDx{#1},\VDDy{#1}){\radius}{\start}{\stop}%
  }%
}%

\def\VDDdcircle@#1&:#2 {%
  {%
    \VDDround@#1&
    \FPround{\bla}{#2}{\VDDd@psdecs}%
    \pscircle[dimen=middle](\VDDx{#1},\VDDy{#1}){\bla}%
  }%
}%
\def\VDDddot@#1&#2 {%
  {%
    \VDDround@#1&
    \psdots*[dotstyle=o](\VDDx{#1},\VDDy{#1})%
  }%
  \ifx\end#2\end\else\VDDddot@#2 \fi
}%
\def\VDDdpoint@#1&#2 {%
  {%
    \VDDround@#1&
    \pscircle*(\VDDx{#1},\VDDy{#1}){\VDDd@pointsize pt}%
  }%
  \ifx\end#2\end\else\VDDdpoint@#2 \fi
}%
\def\VDDddot#1 {%
  \VDDparse@\VDDdef@\VDDparse@tmp#1
  \expandafter\VDDddot@\VDDparse@tmp&
}%
\def\VDDdpoint#1 {%
  \VDDparse@\VDDdef@\VDDparse@tmp#1
  \expandafter\VDDdpoint@\VDDparse@tmp&
}%
\def\VDDdfillcircle#1#2:#3 {%
  \VDDparse@\VDDdef@\VDDparse@tmp#2
  \expandafter\VDDdfillcircle@{#1}\VDDparse@tmp&:#3
}%
\def\VDDdfillellipseradii#1#2:#3 {%
  \VDDparse@\VDDdef@\VDDparse@tmp#2
  \expandafter\VDDdfillellipseradii@{#1}\VDDparse@tmp&:#3
}%
\def\VDDdellipseradii#1:#2 {%
  \VDDparse@\VDDdef@\VDDparse@tmp#1
  \expandafter\VDDdellipseradii@\VDDparse@tmp&:#2
}%
\def\VDDdarc#1:#2 {%
  \VDDparse@\VDDdef@\VDDparse@tmp#1
  \expandafter\VDDdarc@\VDDparse@tmp&:#2
}%
\def\VDDdcircle#1:#2 {%
  \VDDparse@\VDDdef@\VDDparse@tmp#1
  \expandafter\VDDdcircle@\VDDparse@tmp&:#2
}%
\def\VDDdpolygon#1 {%
  \VDDparse@\VDDdef@\VDDparsetmp@#1
  \expandafter\VDDonecircular\expandafter\VDDdpsline@\VDDparsetmp@&:
}%
\def\VDDdhalfline@#1&#2 {%
  {%
    \VDDclength@\length:#1d
    \FPdiv{\length}{\VDDd@infty}{\length}%
    \VDDclincomb@ A:\length*#1d+1*#1p
    \VDDdpsline@ A&#1p&:
  }%
  \ifx\end#2\end\else\VDDdhalfline@#2 \fi
}%
\def\VDDdwholeline@#1&#2 {%
  {%
    \VDDclength@\length:#1d
    \FPdiv{\length}{\VDDd@infty}{\length}%
    \VDDclincomb@ A:\length*#1d+1*#1p
    \VDDclincomb@ B:-\length*#1d+1*#1p
    \VDDdpsline@ A&B&:
  }%
  \ifx\end#2\end\else\VDDdwholeline@#2 \fi
}%
\def\VDDdhalfline#1 {%
  \VDDparse@\VDDdef@dontcare\VDDparsetmp@#1
  \expandafter\VDDdhalfline@\VDDparsetmp@&
}%
\def\VDDdwholeline#1 {%
  \VDDparse@\VDDdef@dontcare\VDDparsetmp@#1
  \expandafter\VDDdwholeline@\VDDparsetmp@&
}%
\def\VDDdperpangle@#1:#2 {%
  {%
    \FPround{\angle}{#2}{\VDDd@psdecs}%
    \VDDround@ #1&
    \rput{\angle}(\VDDx{#1},\VDDy{#1}){%
      \psline[linewidth=\VDDd@conslinewidth pt]%
        {c-c}(.2cm,0)(.2cm,-.2cm)(0,-.2cm)%
    }%
  }%
}%
\def\VDDdbalk@#1&#2&#3&#4&#5&#6&#7&#8& {%
  \VDDdpsline@#1&#2&#3&#7&#8&#5&#1&:
  \VDDdstar@#2&#7&#5&:#6&
  \VDDdhiddenstyle
  \VDDdstar@#1&#3&#8&:#4&
  \VDDdvisiblestyle
}%
\def\VDDdline#1 {%
  \VDDparse@\VDDdef@\VDDparse@tmp#1
  \expandafter\VDDdpsline@\VDDparse@tmp&:
}%
\def\VDDdhiddenline#1 {%
  \VDDdhiddenstyle
  \VDDparse@\VDDdef@\VDDparse@tmp#1
  \expandafter\VDDdpsline@\VDDparse@tmp&:
  \VDDdvisiblestyle
}%
\def\VDDdconsline#1 {%
  \VDDdconsstyle
  \VDDparse@\VDDdef@\VDDparse@tmp#1
  \expandafter\VDDdpsline@\VDDparse@tmp&:
  \VDDdvisiblestyle
}%
\def\VDDdbalk#1 {%
  \VDDparse@\VDDdef@\VDDparse@tmp#1
  \expandafter\VDDdbalk@\VDDparse@tmp&
}%
\def\VDDdperp@#1&#2&#3& {%
  {%
    \VDDcpanglehatx@\angle:#3&#2
    \VDDdperpangle@ #2:\angle{}
  }%
}%
\def\VDDdangle@#1&#2&#3& {%
  {%
    \VDDcpanglehatx@\angleone:#1&#2
    \VDDcpanglehatx@\angletwo:#3&#2
    \FPround{\angleone}{\angleone}{\VDDd@psdecs}%
    \FPround{\angletwo}{\angletwo}{\VDDd@psdecs}%
    \VDDdconsstyle
    \psarc(\VDDx{#2},\VDDy{#2}){.5cm}{\angleone}{\angletwo}%
    \VDDdvisiblestyle
  }%
}%
\def\VDDdangle#1 {%
  \VDDparse@\VDDdef@\VDDparse@tmp#1
  \expandafter\VDDdangle@\VDDparse@tmp&
}%
\def\VDDdperp#1 {%
  \VDDparse@\VDDdef@\VDDparse@tmp#1
  \expandafter\VDDdperp@\VDDparse@tmp&
}%
\def\VDDdlineparangle@@#1#2#3{%
  {%
    \VDDround@ #1&#2&
    \FPround{#3}{#3}{\VDDd@psdecs}%
    \SpecialCoor
    \rput{#3}(!\VDDx{#1}\space\VDDx{#2}\space add 2 div
        \VDDy{#1}\space\VDDy{#2}\space add 2 div){%
      \csname VDDdlinepar\romannumeral\VDDdlineparcount\endcsname
    }%
    \NormalCoor
  }%
}%
\def\VDDdlinepartequalangle@@#1#2#3{%
  {%
    \VDDround@ #1&#2&
    \FPround{#3}{#3}{\VDDd@psdecs}%
    \SpecialCoor
    \rput{#3}(!\VDDx{#1}\space\VDDx{#2}\space add 2 div
        \VDDy{#1}\space\VDDy{#2}\space add 2 div){%
      \csname VDDdlinepartequal\romannumeral\VDDdlinepartequalcount\endcsname
    }%
    \NormalCoor
  }%
}%
\def\VDDdlinepartequal@@#1&#2&#3 {%
  {%
    \VDDcpanglehatx@\angle:#1&#2
    \VDDdlinepartequalangle@@{#1}{#2}{\angle}%
  }%
  \ifx\end#3\end\else\VDDdlinepartequal@@#3 \fi
}%
\def\VDDdlinepar@@#1&#2&#3 {%
  {%
    \VDDcpanglehatx@\angle:#1&#2
    \VDDdlineparangle@@{#1}{#2}{\angle}%
  }%
  \ifx\end#3\end\else\VDDdlinepar@@#3 \fi
}%
\def\VDDdlinepartequal@#1 {%
  \advance\VDDdlinepartequalcount1
  \VDDdlinepartequal@@#1
}%
\def\VDDdlinepar@#1 {%
  \advance\VDDdlineparcount1
  \VDDdlinepar@@#1
}%
\def\VDDdlinepartequal#1 {%
  \VDDparse@\VDDdef@\VDDparse@tmp#1
  \expandafter\VDDdlinepartequal@\VDDparse@tmp&
}%
\def\VDDdlinepar#1 {%
  \VDDparse@\VDDdef@\VDDparse@tmp#1
  \expandafter\VDDdlinepar@\VDDparse@tmp&
}%
\def\VDDdlinepari{%
  \psline[linewidth=\VDDd@conslinewidth pt]{c-c}(-.025cm,-.05cm)(.025cm,0cm)(-.025cm,.05cm)%
}%
\def\VDDdlineparii{%
  \rput(-.025,0){\VDDdlinepari}%
  \rput(.025,0){\VDDdlinepari}%
}%
\def\VDDdlinepariii{%
  \rput(-.05,0){\VDDdlinepari}%
  \rput(0,0){\VDDdlinepari}%
  \rput(.05,0){\VDDdlinepari}%
}%
\def\VDDdlinepartequali{%
  \psline[linewidth=\VDDd@conslinewidth pt]{c-c}(0,-.1cm)(0,.1cm)%
}%
\def\VDDdlinepartequalii{%
  \rput(-.04,0){\VDDdlinepartequali}%
  \rput(.04,0){\VDDdlinepartequali}%
}%
\def\VDDdlinepartequaliii{%
  \rput(-.08,0){\VDDdlinepartequali}%
  \VDDdlinepartequali
  \rput(.08,0){\VDDdlinepartequali}%
}%
\def\VDDdlinepartequaliv{%
  \psline[linewidth=\VDDd@conslinewidth pt]{c-c}(-.04cm,-.1cm)(0,.1cm)%
  \psline[linewidth=\VDDd@conslinewidth pt]{c-c}(.04cm,-.1cm)(0,.1cm)%
}%
\def\VDDdlinepartequalv{%
  \psline[linewidth=\VDDd@conslinewidth pt]{c-c}(-.04cm,-.1cm)(.04cm,.1cm)%
  \psline[linewidth=\VDDd@conslinewidth pt]{c-c}(.04cm,-.1cm)(-.04cm,.1cm)%
}%
\def\VDDdcanvas@#1&#2 {%
  \ifVDDdef@ined#1\then
  \ifFPlt{\VDDx{#1}}{\VDDdcanvas@minx}\then
    \edef\VDDdcanvas@minx{\VDDx{#1}}%
  \fi
  \ifFPgt{\VDDx{#1}}{\VDDdcanvas@maxx}\then
    \edef\VDDdcanvas@maxx{\VDDx{#1}}%
  \fi
  \ifFPlt{\VDDy{#1}}{\VDDdcanvas@miny}\then
    \edef\VDDdcanvas@miny{\VDDy{#1}}%
  \fi
  \ifFPgt{\VDDy{#1}}{\VDDdcanvas@maxy}\then
    \edef\VDDdcanvas@maxy{\VDDy{#1}}%
  \fi
  \fi
    %\message{after #1(\VDDx{#1},\VDDy{#1}) (\VDDdcanvas@minx,\VDDdcanvas@miny)(\VDDdcanvas@maxx,\VDDdcanvas@maxy)}%
  \ifx\end#2\end\else\VDDdcanvas@#2 \fi
}%
\def\VDDd@margin{.6}%
\def\VDDcleanup@#1&#2 {%
  \expandafter\expandafter\expandafter\let\VDDx{#1}\relax%
  \expandafter\expandafter\expandafter\let\VDDy{#1}\relax%
  \ifx\end#2\end\else\VDDcleanup@#2 \fi
}%
\def\VDDdvisiblestyle{%
  \psset{linestyle=solid,linewidth=\VDDd@drawlinewidth pt}%
}%
\def\VDDdhiddenstyle{%
  \psset{linestyle=dashed,linewidth=\VDDd@drawlinewidth pt}%
}%
\def\VDDdconsstyle{%
  \psset{linestyle=solid,linewidth=\VDDd@conslinewidth pt}%
}%
\def\VDDdverythickstyle{%
  \psset{linestyle=solid,linewidth=\VDDd@verythicklinewidth pt}%
}%
\def\VDDdthickstyle{%
  \psset{linestyle=solid,linewidth=\VDDd@thicklinewidth pt}%
}%
\def\VDDcleanup{%
  \expandafter\VDDcleanup@\VDDdef@defined{}
  \def\VDDdef@defined{}%
}%
\def\VDDdcanvas#1:#2 #3\VDDdcanvasend{%
  \FPset{\VDDdcanvas@xscl}{1}%
  \FPset{\VDDdcanvas@yscl}{1}%
  \FPset{\VDDdcanvas@minx}{999999999}%
  \FPset{\VDDdcanvas@miny}{999999999}%
  \FPset{\VDDdcanvas@maxx}{-999999999}%
  \FPset{\VDDdcanvas@maxy}{-999999999}%
  \expandafter\VDDdcanvas@\VDDdef@defined{}
  \FPdiv{\VDDdcanvas@margin}{\VDDd@margin}{#1}%
  \FPsub{\VDDdcanvas@minx}{\VDDdcanvas@minx}{\VDDdcanvas@margin}%
  \FPsub{\VDDdcanvas@miny}{\VDDdcanvas@miny}{\VDDdcanvas@margin}%
  \FPadd{\VDDdcanvas@maxx}{\VDDdcanvas@maxx}{\VDDdcanvas@margin}%
  \FPadd{\VDDdcanvas@maxy}{\VDDdcanvas@maxy}{\VDDdcanvas@margin}%
  \FPround{\VDDdcanvas@minx}{\VDDdcanvas@minx}{\VDDd@psdecs}%
  \FPround{\VDDdcanvas@maxx}{\VDDdcanvas@maxx}{\VDDd@psdecs}%
  \FPround{\VDDdcanvas@miny}{\VDDdcanvas@miny}{\VDDd@psdecs}%
  \FPround{\VDDdcanvas@maxy}{\VDDdcanvas@maxy}{\VDDd@psdecs}%
  \FPdiv{\VDDlangleequalradius}{.1}{#1}%
  \FPdiv{\VDDd@pointsize}{1}{#2}%
  \FPdiv{\VDDd@drawlinewidth}{.5}{#2}%
  \FPdiv{\VDDd@conslinewidth}{.2}{#2}%
  \FPdiv{\VDDd@thicklinewidth}{1}{#2}%
  \FPdiv{\VDDd@verythicklinewidth}{3}{#2}%
  \FPround{\VDDd@drawlinewidth}{\VDDd@drawlinewidth}{\VDDd@psdecs}%
  \FPround{\VDDd@conslinewidth}{\VDDd@conslinewidth}{\VDDd@psdecs}%
  \FPround{\VDDd@thicklinewidth}{\VDDd@thicklinewidth}{\VDDd@psdecs}%
  \FPround{\VDDd@verythicklinewidth}{\VDDd@verythicklinewidth}{\VDDd@psdecs}%
  \psset{unit=#1cm}%
  \psset{linewidth=\VDDd@drawlinewidth pt}%
  \psset{linestyle=solid}%
  $$
  \psscalebox{#2}{%
    \pspicture*(\VDDdcanvas@minx,\VDDdcanvas@miny)(\VDDdcanvas@maxx,\VDDdcanvas@maxy)%
    %\pspolygon(\VDDdcanvas@minx,\VDDdcanvas@miny)(\VDDdcanvas@maxx,\VDDdcanvas@miny)(\VDDdcanvas@maxx,\VDDdcanvas@maxy)(\VDDdcanvas@minx,\VDDdcanvas@maxy)
    #3
  \endpspicture
  }%
  $$%
  \VDDcleanup
}%
\def\VDDdmincanvas#1:#2 #3\VDDdmincanvasend{%
  \FPset{\VDDdcanvas@xscl}{1}%
  \FPset{\VDDdcanvas@yscl}{1}%
  \FPset{\VDDdcanvas@minx}{999999999}%
  \FPset{\VDDdcanvas@miny}{999999999}%
  \FPset{\VDDdcanvas@maxx}{-999999999}%
  \FPset{\VDDdcanvas@maxy}{-999999999}%
  \expandafter\VDDdcanvas@\VDDdef@defined{}
  \FPdiv{\VDDdcanvas@margin}{\VDDd@margin}{#1}%
  \FPsub{\VDDdcanvas@minx}{\VDDdcanvas@minx}{\VDDdcanvas@margin}%
  \FPsub{\VDDdcanvas@miny}{\VDDdcanvas@miny}{\VDDdcanvas@margin}%
  \FPadd{\VDDdcanvas@maxx}{\VDDdcanvas@maxx}{\VDDdcanvas@margin}%
  \FPadd{\VDDdcanvas@maxy}{\VDDdcanvas@maxy}{\VDDdcanvas@margin}%
  \FPround{\VDDdcanvas@minx}{\VDDdcanvas@minx}{\VDDd@psdecs}%
  \FPround{\VDDdcanvas@maxx}{\VDDdcanvas@maxx}{\VDDd@psdecs}%
  \FPround{\VDDdcanvas@miny}{\VDDdcanvas@miny}{\VDDd@psdecs}%
  \FPround{\VDDdcanvas@maxy}{\VDDdcanvas@maxy}{\VDDd@psdecs}%
  \FPdiv{\VDDlangleequalradius}{.1}{#1}%
  \FPdiv{\VDDd@pointsize}{1}{#2}%
  \FPdiv{\VDDd@drawlinewidth}{.5}{#2}%
  \FPdiv{\VDDd@conslinewidth}{.2}{#2}%
  \FPdiv{\VDDd@thicklinewidth}{1}{#2}%
  \FPdiv{\VDDd@verythicklinewidth}{3}{#2}%
  \FPround{\VDDd@drawlinewidth}{\VDDd@drawlinewidth}{\VDDd@psdecs}%
  \FPround{\VDDd@conslinewidth}{\VDDd@conslinewidth}{\VDDd@psdecs}%
  \FPround{\VDDd@thicklinewidth}{\VDDd@thicklinewidth}{\VDDd@psdecs}%
  \FPround{\VDDd@verythicklinewidth}{\VDDd@verythicklinewidth}{\VDDd@psdecs}%
  \psset{unit=#1cm}%
  \psset{linewidth=\VDDd@drawlinewidth pt}%
  \psset{linestyle=solid}%
  \psscalebox{#2}{%
    \pspicture*[shift=-\VDDdcanvas@margin](\VDDdcanvas@minx,\VDDdcanvas@miny)(\VDDdcanvas@maxx,\VDDdcanvas@maxy)%
    %\pspolygon(\VDDdcanvas@minx,\VDDdcanvas@miny)(\VDDdcanvas@maxx,\VDDdcanvas@miny)(\VDDdcanvas@maxx,\VDDdcanvas@maxy)(\VDDdcanvas@minx,\VDDdcanvas@maxy)
    #3
  \endpspicture
  }%
  \VDDcleanup
}%
\def\VDDdruitjes{%
  \psgrid[gridwidth=\VDDd@conslinewidth pt,gridlabels=0pt,subgriddiv=0]
}%
\def\VDDdhoraxis#1#2#3{%
  \psline(\VDDdcanvas@minx,0)(\VDDdcanvas@maxx,0)
  \rput[rb](\VDDdcanvas@maxx,0.1){$\scriptstyle #3$}%
  \FPdiv\VDDdcanvas@xscl{\VDDdcanvas@xscl}{#2}%
  \FPmul\VDDdcanvas@xscl{\VDDdcanvas@xscl}{#1}%
  \FPround{\VDDdcanvas@xscl}{\VDDdcanvas@xscl}{\VDDd@psdecs}%
  \psset{framesep=1pt}%
  \FPset{\cur}{0}\FPset{\curi}{0}%
  \loop
    \FPadd{\cur}{\cur}{#1}\FPadd{\curi}{\curi}{#2}%
    \FPclip{\cur}{\cur}\FPclip{\curi}{\curi}%
    \FPiflt{\cur}{\VDDdcanvas@maxx}
      \rput[t](\FPprint{\cur},-.1){$\scriptscriptstyle \FPprint{\curi}$}%
    \repeat
  \FPset{\cur}{0}\FPset{\curi}{0}%
  \loop
    \FPsub{\cur}{\cur}{#1}\FPsub{\curi}{\curi}{#2}%
    \FPclip{\cur}{\cur}\FPclip{\curi}{\curi}%
    \FPifgt{\cur}{\VDDdcanvas@minx}
      \rput[t](\FPprint{\cur},-.1){$\scriptscriptstyle \FPprint{\curi}$}%
    \repeat
}%
\def\VDDdoorsprong{%
  \rput[tr](0,-.1){$\scriptscriptstyle O$}%
}%
\def\VDDdveraxis#1#2#3{%
  \psline(0,\VDDdcanvas@miny)(0,\VDDdcanvas@maxy)
  \rput[tl](0.1,\VDDdcanvas@maxy){$\scriptstyle #3$}%
  \FPdiv\VDDdcanvas@yscl{\VDDdcanvas@yscl}{#2}%
  \FPmul\VDDdcanvas@yscl{\VDDdcanvas@yscl}{#1}%
  \FPround{\VDDdcanvas@yscl}{\VDDdcanvas@yscl}{\VDDd@psdecs}%
  \psset{framesep=1pt}%
  \FPset{\cur}{0.04}\FPset{\curi}{0}%
  \loop
    \FPadd{\cur}{\cur}{#1}\FPadd{\curi}{\curi}{#2}%
    \FPclip{\cur}{\cur}\FPclip{\curi}{\curi}%
    \FPiflt{\cur}{\VDDdcanvas@maxy}
      \rput[r](-.1,\FPprint{\cur}){$\scriptscriptstyle \FPprint{\curi}$}%
    \repeat
  \FPset{\cur}{0.04}\FPset{\curi}{0}%
  \loop
    \FPsub{\cur}{\cur}{#1}\FPsub{\curi}{\curi}{#2}%
    \FPclip{\cur}{\cur}\FPclip{\curi}{\curi}%
    \FPifgt{\cur}{\VDDdcanvas@miny}
      \rput[r](-.1,\FPprint{\cur}){$\scriptscriptstyle \FPprint{\curi}$}%
    \repeat
}%
\catcode`@=12%
