Code Directory
 Visual Basic & VB.NET
New Code
VisualNEO Web 2018.12.15
SentiMask SDK Trial 1.0.0
OrgChart JS 4.6.4
dotConnect for BigCommerce 1.8
FedEx Smart Shipping For Magento 1.0.0
Database Workbench Pro
Taxi App Development 7.3
RentALL-Airbnb clone script 1.8.0
PHP Ecommerce Script 1.3.2
dbForge Studio for PostgreSQL 2.1
Rentonn - Airbnb clone 1.0
VisualNEO for Windows
SentiVeillance SDK Trial 7.0.191272
dbForge SQL Complete 6.1
Uber for E-Scooters 1.0
Top Code
webmoney - Webmoney payment gateway 5.x-1.2
La Caixa payment gateway 5.x-1.x-dev
Azizi search engine script PHP 4.1.10
Online Poker Script 1.0
Efficient K-Means Clustering using JIT 1.0
Fast K-means 1.0
Kernel k-means 1.0
Top Rated
VisualNEO Web 2018.12.15
Paste phpSoftPro 1.4.1
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
PHP GZ Blog Script 1.1
ATN Jobs Software 4.0
Analytical intersection volume between two spheres 1.0
File ID: 81403

Analytical intersection volume between two spheres 1.0
Download Analytical intersection volume between two spheres 1.0http://www.mathworks.comReport Error Link
License: Shareware
File Size: 10.0 KB
Downloads: 3
Submit Rating:
Analytical intersection volume between two spheres 1.0 Description
Description: Compute the overlap volume between 2 spheres defined in an array.
Computation is vectorized, and intersection volume are computed an
analytical way.

Input: spheres data presented in an array G of four columns.
G contains parameters of the n spheres
. G(1:n,1) - x-coordinate of the center of spheres,
. G(1:n,2) - y-coordinate of the center of spheres,
. G(1:n,3) - z-coordinate of the center of spheres,
. G(1:n,4) - radii of the spheres
Each row of the array contains the information for one sphere.

Input can also be provided in three different vectors. These
vectors can be row or column vectors. The 1st one corresponds to
x-coordinate of the center of spheres, the 2nd one to the
y-coordinate, the 3rd one to the z-coordinate and the 4th one to
the radii of the spheres.
An optional binary argument can be provided to display or not the

Output: Square matrix M(n,n) containing intersection volumes between
M(i,j) contains the intersection volume between spheres i & j
By definition, M(i,i) corresponds to the volume of sphere i.


x = [0,1,5,3,-5];
y = [0,4,3,7,0];
z = [0,4,3,7,0];
r = [1,5,3,2,2];
Display_solution = true;
disp('First call')
M = volume_intersect_sphere_analytical(x,y,z,r,Display_solution);
disp('Second call')
M = volume_intersect_sphere_analytical([x',y',z',r'],false);

For 2 spheres i & j, three cases are possible depending on the distance
d(i,j) of the centers of the spheres i and j.
Case 1: spheres i & j do not overlap, there is no overlap volume
Condition: d(i,j)>= ri+rj
M(i,j) = 0;
Case 2: spheres i & j fully overlap, the overlap volume has to be
Condition: d(i,j)<= abs(ri-rj)
M(i,j) = 4/3*pi*min(ri,rj).^3
Case 3: spheres i & j partially overlap, the overlap volume has to be
computed decomposing the overlap volume.

License: Shareware

Related: Examples, display solution, Call, disp, definition, volumes, result

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 3

More Similar Code

This function will compute the great circle distance between two points on a sphere of uniform radius using the Vincenty formula. At minimum, four inputs are required: lat1, long1, lat2, long2. Optionally, a fifth parameter (r) can be specified. If this parameter isn't specified it's assumed to be the mean radius of the earth in km.

phi_s = latitude of the standpoint (base)
lambda_s = longitude of the standpoint...

Computes the shortest distance between two line segments given start and end points for each. Adapts the algorithm found on Dan Sunday's website (

Usage: Input the...

This function computes the minimum euclidean distance between two polygons P1 & P2.

- for vertex-vertex case

This routine will shade the area of a 2-D plot between two user defined vectors. Simply pass the two vectors, and their corresponding horizontal coordinates, select your fill color and transparency level and viola! You have a figure that is...

This calculates the midpoint between two GPS coordinates along the Earth's surface.
Based on formula from

This program implements the tSL between two probability density functions following the references:

Baba C. Vemuri, Meizhu Liu, Shun-Ichi Amari and Frank Nielsen,
Total Bregman Divergence and its Applications to DTI Analysis,

Calculation of intersection segment between a plane (defined with a point p0 that lies on the plane and a normal vector n of that plane) and a triangle (defined with its vertices P1, P2 and P3)

N : Normal to plane , |N| = 1,...

OUT = LINESEGMENTINTERSECT(XY1,XY2) generates intersection analysis between the line segment sets given in XY1 and XY2. Code can handle coincident and parallel lines.

The main emphasis is on speed. The code is fully vectorized and it...

tKL between two multivariate normal probability density functions.
This program implements the tKL between two multivariate normal probability density functions following the references:

Baba C. Vemuri, Meizhu Liu, Shun-Ichi...

This program will generate the coordinates of a 3D Bresenham's raster line between two given points.

A very useful application of this algorithm can be found in the implementation of Fischer's Bresenham interpolation method in my...

User Review for Analytical intersection volume between two spheres
- required fields

Please enter text on the image