i want to get a 3D Plot in Octave of the function
$$f(r\cdot e^{i\theta})=\int_{-\pi}^\pi \frac{(1-r^2)\cdot\cos(x)}{1-2\cdot r\cdot\cos(\theta-x)+r^2}dx $$
what is called the Poisson-Integral for the function $\cos(x)$ for $0\leq r<1$. I really don't know how to get it and didn't find any answers in the internet. so maybe someone can help me.
Until now i got the following code but the output is far away from what i need:
r = linspace(0,0.999,10)
theta = pi*linspace(-1,1,10)
z = r.*exp(1i*theta)
[Y1,Y2]=meshgrid(sqrt(real(z).^2+imag(z).^2),imag(z))
for i=1:10
for j=1:10
n=Y1(i,j)
m=Y2(i,j)
y=@(x) (1-n.^2).*cos(x)/(1-2.*n.*cos(m-x)-n.^2)
Z(i,j)= quad(y,-pi,pi)
end
end
plot3(real(z),imag(z),Z)
I'm thankful for every answer or try to help me.