[pstricks] drawing arrows
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Wed Jan 7 21:15:41 CET 2009
Zbigniew Nitecki schrieb:
> I am not sure what is wrong with the following code; I am drawing the
> surface z=xy over the square [0,1]\times[0,1] (this works fine, if the
> multido is commented out) and then to draw
> unit normal vectors to this surface.
> ***********************************************************************
> %!TEX TS-program = latex
> \documentclass[11pt]{article}
> \usepackage{amsmath, amssymb}
> \usepackage[dvipsnames, svgnames]{pstricks}
> \usepackage{pst-plot, pst-math, pst-3dplot}
> \usepackage{pst-grad, pst-func, pst-text}
> \usepackage{pstricks-add}
> \title{Brief Article}
> \author{The Author}
> \begin{document}
> \maketitle
> \begin{figure}[htbp]
> \begin{center}
> \begin{pspicture}(-3.5,-3)(3.5,3.5)
> \psset{Alpha=-30, unit=3}
> \pstThreeDCoor[xMin=0, xMax=1.5, yMin=0, yMax=1.5, zMin=0, zMax=2]
> \pstThreeDSquare[fillstyle=solid, fillcolor=gray,
> linestyle=none](0,0,0)(1,0,0)(0,1,0)
> \psplotThreeD[xPlotpoints=10, yPlotpoints=10,
> drawStyle=xyLines](0,1)(0,1){x y mul}
>
> \newcommand{\veclength}[3]{%
> #1 dup mul #2 dup mul #3 dup mul add add 0.5 exp
> }
> \newcommand{\makevector}[3]{%
> \pstThreeDLine[arrows=->, arrowscale=2,
> linewidth=2pt](0,0,0)(#1,#2,#3)%
> }
>
> \multido{\rx=0+0.1}{10}{%
> \multido{\ry=0+0.1}{10}{%
> \pstThreeDPut(!\rx, \ry, \rx\space \ry\space mul){%
\pstThreeDPut(\rx, \ry, \rx\space \ry\space mul){%
without the exclamation.
Herbert
More information about the PSTricks
mailing list