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

2 次查看(过去 30 天)
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

回答(1 个)

Matt J
Matt J 2012-10-18
编辑:Matt J 2012-10-18
*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.

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by