Hello!
I am working to simulate various shapes in kwave with hemispherical transducer arrays. I have code for defining a single vertical rod, but how would I rotate this rod say 45 degrees towards +x axis?
The code for the single rod is:
source_radius = Nx/6;
magnitude = 5;
ball_magnitude = 0; % [Pa]
ball1_x_pos = Nx/2; % [grid points]
ball1_y_pos = Ny/2; % [grid points]
ball1_z_pos = Nz/2; % [grid points]
ball1_radius = 10; % [grid points]
ball_1 = ball_magnitude*makeBall(Nx, Ny, Nz, ball1_x_pos, ball1_y_pos, ball1_z_pos, ball1_radius);
p0 = ball_1;
p0(round(Nx/2)-1:...
round(Nx/2)+1,round(Ny/2)-1:...
round(Ny/2)+1,round(Nz/2-source_radius):...
round(Nz/2+source_radius) ) = magnitude;
Thanks!
Karl