[pstricks] multiplication with multido variable / drawing a lattice

Christian Häger christianhaeger at me.com
Mon May 9 17:32:15 CEST 2011


Hello,

I want to draw a 2-D lattice (regular array of points) with pstricks. The following example works fine for me

\multido{\nx=-6+1}{13}{
  \multido{\ny=-7+1}{15}{
    \psdot[dotsize=2.0pt](\numexpr \nx*2,\numexpr \nx*1+\ny*2 )
  }
}

Unfortunately this is too restrictive and I need a way to multiply the \nx and \ny variables by real numbers, i.e. I want to write something like

\psdot[dotsize=2.0pt](\numexpr \nx*sqrt(3),\numexpr \nx*1.4+\ny*2 )

but this doesn't work. I tried the calc package but couldn't make it work either.

Kind Regards,
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20110509/bd3b99e2/attachment.html>


More information about the PSTricks mailing list