# Isometric paper and drawing on it — with PSTricks

I would like to create a drawing on isometric drawing paper like the following:

N.B. Forget the drawing on top of the paper; it is just something I found in order to illustrate the type of paper I would like to have.

On the blank isometric paper, I would like to draw the following simple sketch of a house:

Update

Thanks to Herbert's answer, I created the following (which is the house from another angle):

\documentclass{article}

\begin{document}

\begin{figure}
\centering
\psset{linejoin = 2}
\SpecialCoor
\begin{pspicture*}(-0.5,-2.3)(10,8.5)
\pstVerb{gsave [0.8660254 0.5 0 1 0 -400] concat}
{\psset{linewidth = 0.3pt, linecolor = black!50}
\multido{\iA = 0+1}{25}{%
\psline(\iA,-4)(\iA,20)
\psline(!-5 \iA\space 10 sub)(!20 \iA\space 10 sub)
\rput(!0 \iA\space 15 sub){\psline(0,0)(!\iA\space abs dup add dup)}
}
}
\psset{linewidth = 2pt}
\pspolygon(8,2)(8,6)(11,9)(11,5)
\pspolygon(1,2)(1,6)(8,6)(8,2)
\pspolygon(1,6)(2.5,9.5)(9.5,9.5)(8,6)
\psline(11,9)(9.5,9.5)
\psset{linestyle = dashed}
\pspolygon(4,5)(4,9)(11,9)(11,5)
\pspolygon(1,6)(4,9)(4,5)(1,2)
\psline(4,9)(2.5,9.5)
\pstVerb{grestore}
\end{pspicture*}
\end{figure}

\end{document}


-
One can easily draw 3D objects in pstricks using pst-solides3d. However, using isometric paper like the above would not work with true 3D objects, since the projection would not coincide with the 2D guidelines. So, either fake 3D (naturally, 2D) on isometric paper, or true 3D. That's what I'm thinking. – Werner May 14 '13 at 18:06
@Werner I think a fake 3D is what I'm after, but I don't know how to draw the actual isometri paper. :( The house itself should no be too difficult (I think). – Svend Tveskæg May 14 '13 at 18:08
@SvendTveskæg: in your edit the roof is not symmetrical, it is 1 to 2 and not 1.5 on each side – Herbert May 15 '13 at 13:36
@Herbert Good point; thank you. Is it correct after the edit? – Svend Tveskæg May 15 '13 at 16:55
yes, it is ok now – Herbert May 15 '13 at 18:05

\documentclass{article}
\usepackage{pst-3dplot}
\begin{document}

\psset{coorType=1,Alpha=30}% type 1 for orhtogonal x-z-axes
\begin{pspicture}(-2,-3)(3,3)
\pstThreeDCoor[IIIDticks,zMax=6,yMax=1]
\pstThreeDLine(0,0,0)(3,0,0)(3,0,4)(0,0,4)(0,0,0)
\pstThreeDLine(3,0,4)(1.5,0,6)(0,0,4)
\end{pspicture}

\end{document}


the isometric lines are simple lines in the plane. However, you can use the transformation matrix and set the values so that all lines in a 2d coordinate system are isometric.

\documentclass{article}
\usepackage{pstricks,multido}\SpecialCoor
\begin{document}

\begin{figure}
\begin{pspicture*}(-0.5,-2)(11,10)
\pstVerb{ gsave [1 0.5 0 1 0 -400] concat }
{\psset{linewidth=0.3pt,linecolor=black!30}
\multido{\iA=-0+1,\iB=-10+1,\iC=-15+1}{25}{
\psline(\iA,-4)(\iA,20)
\psline(-5,\iB)(20,\iB)
\rput(0,\iC){\psline(0,0)(!\iA\space abs dup add dup )}}}
\psset{linewidth=2pt}
\pspolygon(0,0)(0,4)(3,4)(3,0)
\psline(0,4)(1.5,6)(3,4)
\psline(3,0)(10,7)(10,11)(3,4)% see isometric grid for the coordinates
\psline(1.5,6)(8.5,13)(10,11)
\pstVerb{grestore }
\end{pspicture*}
\caption{foo}
\end{figure}

\end{document}


Look into a PostScript documentation for the meaning of the transformation matrix. It is the same as the one in PDF.

-
This is nice, Herbert. However, I would like to have the isometric paper, i.e., the 2D triangles, too. – Svend Tveskæg May 14 '13 at 18:34
Thanks a lot. Two questions: (1) Can I somehow use pdflatex if loading auto-pst-pdf? (As it is now, the lines are placed wrong if I do this.) (2) The house is not 4 units high, but something like 3½ units; how do I correct this? – Svend Tveskæg May 14 '13 at 19:25
I know, it is only a way how it could be done. The distance outside of the matrix is the default unit, you can correct it. I have no idea why pdflatex fails. – Herbert May 14 '13 at 19:28
see my edited answer – Herbert May 15 '13 at 5:39
see edit. We have to save the current graphic state and restore it at the end of the pspicture environment – Herbert May 15 '13 at 6:52