How to convolve a sphere with a shere in 3D and read the surface
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have two spheres A and B, with radius 5 and 10, that are:
theta=linspace(0,2*pi,40); phi=linspace(0,pi,40); [theta,phi]=meshgrid(theta,phi); radius=5; % radius 10 x=radius*sin(phi).*cos(theta); y=radius*sin(phi).*sin(theta); z=radius*cos(phi); mesh(x,y,z)
Everything outside the spheres is 0, and inside is 1.
*Q1 How do I convolve A with B? *
*Q2 How do I read the surface of B (values in the resultant on the coordinates as that of B), after convolution. *
Thanks
0 comentarios
Respuestas (1)
Matt J
el 18 de Oct. de 2012
Editada: Matt J
el 18 de Oct. de 2012
*Q1 How do I convolve A with B? *
Make images of A and B (rather than mesh plots) and use CONVN (or fftn if it's better to do fft based convolution) to convolve them.
*Q1 How do I convolve A with B? *
Use INTERPN to interpolate the convolution result at the points you want.
0 comentarios
Ver también
Categorías
Más información sobre Surface and Mesh Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!