# Tikz create perspective grid

i was wondering how i could create a perspective 2D grid like this blue one on the left:

https://tinytutorials.wordpress.com/2011/02/15/illustrator-cs5-perspective-grid-manipulating-the-perspective-grid/

with Tikz. My current approach:

\begin{tikzpicture}
\draw[step=2.5mm,gray,very thin] (4,0) grid (7,1);
\end{tikzpicture}


Unfortunately it isn't possible to rotate the draw in 3D.

• Peripherally related: tex.stackexchange.com/questions/319172/… – Steven B. Segletes Jun 2 '17 at 10:01
• This should be relatively straight forward, just drawing the appropriate straight lines, using the tikz package. Show us what coding you have tried, and we can answer more precisely. – Andrew Swann Jun 2 '17 at 10:17
• I edited my initial question. Thanks for your comment. – binaryBigInt Jun 2 '17 at 10:23
• Could you please complete your code so it is compilable? – cfr Jun 2 '17 at 11:19

Not very efficient. Elegance is left as an exercise for the reader.

\documentclass[border=10pt,x11names,dvipsnames,svgnames]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\foreach \i [count=\ino from 0] in {-5,-4,...,5}
{
\draw [Cerulean] (\i,-10,0) -- (0,0,0) \foreach \j in {0,...,10} {coordinate [pos={\j/10}] (c-\ino-\j)};
}
\foreach \i in {0,...,7} \draw [Cerulean] (c-10-\i) -- (c-0-\i);
\draw [Cerulean] (c-0-0) -- ++(0,7,0) \foreach \j in {0,...,7} {coordinate [pos={\j/7}] (a\j)} -- (0,0,0) \foreach \i in {0,...,10} {coordinate [pos={\i/10}] (b\i)};
\foreach \i in {1,...,7} \path (a\i) -- (0,0,0) \foreach \j in {0,...,10} {coordinate [pos={\j/10}] (d-\i-\j)};
\foreach \i in {1,...,7} \draw [Cerulean] (a\i) -- (d-\i-7) (c-0-\i) -- (b\i);
\end{tikzpicture}
\end{document} 