TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to draw a curvilinear grid/mesh like this (sorry for freehand drawing) curvilinear grid

I thought the easiest (and most elegant) solution would be to apply a canvas transformation to a regular grid in TikZ.

However, I found only this example in the pgf/TikZ manual, which rotates a grid:


rotated grid

Do these kind of transformations exist or should I use the recommended solution in this question on polar grids.

share|improve this question
To my (limited) knowledge, the only transformations that are possible internally are affine and therefore not able to do what you want. As evidence, note that the transformations act on the coordinates and not on the actual paths themselves, so a line stays a line whereas you want that line to transform to an arc. So my thinking is that the polar grid question will be your best bet. – Loop Space Feb 10 '12 at 8:22

Not exactly an answer because I think it's more complicated to transform a tool than to create a new tool. Like Andrew says it's impossible in your case.

Here a macro : ( I made this code in few minutes also I think tikz's expert can do a better macro with more options)

rmin/.code ={\global\def\rmin {#1}},
rmax/.code ={\global\def\rmax {#1}},
amin/.code ={\global\def\amin {#1}},
amax/.code ={\global\def\amax {#1}},

rmin ={0},
rmax ={10},
amin ={0},
amax ={180},
 \foreach \a in {\amin,\addastep,...,\amax}  \draw[gray] (\a:\rmin) -- (\a:\rmax);  
 \foreach \r in {\rmin,\addrstep,...,\rmax}  \draw[gray] (\amin:\r cm) arc (\amin:\amax:\r cm);    



enter image description here

share|improve this answer
Beautiful! thanks a lot. – Sebastian Feb 11 '12 at 5:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.