Borrar filtros
Borrar filtros

How to convolve a sphere with a shere in 3D and read the surface

1 visualización (últimos 30 días)
Faraz
Faraz el 18 de Oct. de 2012
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

Respuestas (1)

Matt J
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.

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!

Translated by