plot of riemann surface

27 visualizaciones (últimos 30 días)
SCIUSCIA
SCIUSCIA el 18 de Mayo de 2024
Comentada: SCIUSCIA el 19 de Mayo de 2024
I am plotting the Riemann surface and I do expect symmetry with respect to the x and y axis, but it seems that I get only the one half of the surface
those lines give the surface
w01 = sqrt(r).*exp(1i*theta/2); % first branch
w02 = sqrt(r).*exp(1i*(theta+2*pi)/2); % second branch
(with z = re + 1j*im;
theta = angle(z); % atan2(imag(z), real(z));
r = 2*abs(z);)

Respuesta aceptada

Athanasios Paraskevopoulos
Athanasios Paraskevopoulos el 18 de Mayo de 2024
To plot a complete Riemann surface for the function, you need to consider the nature of the complex square root function and how it behaves in different branches of the complex plane. The function has two branches, which you've correctly identified. However, to visualize the complete surface, you must ensure that your parameterization covers the entire complex plane, not just a portion.
The complex plane is defined by , where is the magnitude and θ is the angle .
The square root function has two branches:
-
-
To visualize both branches and the symmetry, ensure you cover θ from to and r over the desired range.
% Define the range for r and theta
r_min = 0; r_max = 4; % You can adjust the range as needed
theta_min = -pi; theta_max = pi;
% Create a grid of (r, theta)
r = linspace(r_min, r_max, 100); % 100 points in r
theta = linspace(theta_min, theta_max, 100); % 100 points in theta
[R, Theta] = meshgrid(r, theta);
% Calculate the first branch w01 and second branch w02
W01 = sqrt(R) .* exp(1i * Theta / 2); % first branch
W02 = sqrt(R) .* exp(1i * (Theta + 2*pi) / 2); % second branch
% Split into real and imaginary parts for plotting
x1 = real(W01); y1 = imag(W01); z1 = R; % First branch
x2 = real(W02); y2 = imag(W02); z2 = R; % Second branch
% Plot the first branch
figure;
surf(x1, y1, z1);
hold on;
% Plot the second branch
surf(x2, y2, z2);
% Labels and title
xlabel('Re(w)');
ylabel('Im(w)');
zlabel('r');
title('Riemann Surface of w = \surd{z}');
grid on;
hold off;
  7 comentarios
Athanasios Paraskevopoulos
Athanasios Paraskevopoulos el 19 de Mayo de 2024
If your goal is to visualize a more complex function with specified parameters and not the Riemann surface of , your code is correct. I don't now if this is your goal because you are using the square root and exponential functions, with parameters influencing the function's branches.
SCIUSCIA
SCIUSCIA el 19 de Mayo de 2024
Thank you. Yes, my objective is to visualize a specified function which has Im and Re parts.
I thought to visualize only half surface.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Productos


Versión

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by