Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to realize the following graph with pgfplots:

Conformal mapping

which represents the following conformal mapping:

u=x^{1/q}
v=y^{1/q}

where q=2*(pi-alpha)/pi.

EDIT:

Here is the formula for the conformal mapping, as reported in the original article:

Conformal mapping formula

I really don't know from where should I start to realize a graph of this kind, so every suggestion is welcome. Once I have some useful suggestion, I will try to write my own code.

Thanks for your kind help.

share|improve this question

1 Answer 1

What you want to achieve is a visualization of the complex function f(z) = u(z) + i v(z) with z = x + i y.

In your image, you see two contour plots in the same axis: one for u(z) and one for v(z).

There are only two questions remaining:

  1. how can you plot two contour plots of given functions into the same axis, and how can you control their appearance?

  2. what are the formulas for u(z) and v(z)?

I can assist you with 1. Concerning 2., I have not been able to reproduce you graph by means of your provided functions. Can you verify them? Are you sure that u(z) = u(x) does not depend on y? And, similarly, that v(z) = v(y) does not depend on x? You image seems to indicate that u and v depend on both x and y. And what is alpha? It seems to be something like pi/5 (that's what I guessed).

So, here is a solution for question (1). Suppose we want to visualize f(z) = z^2 = (x+iy)^2 = (x^2 - y^2) + xy i :

\documentclass{article}

\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
    \begin{axis}[
        view={0}{90},
        xlabel=real axis,
        ylabel=imaginary axis,
        ]
    \addplot3[contour gnuplot={number=9,labels=false,draw color=blue}] {x^2-y^2};
    \addplot3[contour gnuplot={number=9,labels=false,draw color=red}] {x*y};
    \end{axis}
\end{tikzpicture}
\end{document}

enter image description here

Here, I used draw color to change the color (which is typically mapped color for contour plots).

share|improve this answer
    
Hi Christian, thanks for your help. I tried to improve my question, by introducing the original definition of the conformal mapping. I don't know the value of alpha used to build the plot, but it should be something like pi/12. –  mp87 Apr 22 '12 at 9:44
    
Thanks for the explanation. In this case, we find the expressions u(z) = Re[ W(z) ] and v(z) = Im[ W(z) ] with W(z) := z^(1/q). Keep in mind that z = x+iy. My suggestion is to employ an external tool to compute (sample) u(z) and v(z) (pgfplots has no complex arithmetics). gnuplot can do it if I am not mistaken, so you can employ \addplot3[contour gnuplot....] gnuplot {<expression>}; instead of my plotting expression. –  Christian Feuersänger Apr 22 '12 at 14:32

Your Answer

 
discard

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.