plot of riemann surface

조회 수: 24 (최근 30일)
SCIUSCIA
SCIUSCIA 2024년 5월 18일
댓글: SCIUSCIA 2024년 5월 19일
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);)

채택된 답변

Athanasios Paraskevopoulos
Athanasios Paraskevopoulos 2024년 5월 18일
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
Athanasios Paraskevopoulos
Athanasios Paraskevopoulos 2024년 5월 19일
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 2024년 5월 19일
Thank you. Yes, my objective is to visualize a specified function which has Im and Re parts.
I thought to visualize only half surface.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by