Advertisement

Intersection

Started by July 19, 2003 08:03 PM
1 comment, last by Hazem_vb 21 years, 7 months ago
Hi all How to get the intersection region between 2 intersected spheres mathamatically . Thanks
Come to visit Egypt (the Land of Civilization)
How do you want to define that region? Do you want to create a polygonal mesh that outlines that region, or do you just want a mathematical equation that''s true for any point inside that region?
if it''s the second one, it''s obviously:

VECTOR3D pt;

VECTOR3D a = pt - sphere1.center;
VECTOR3D b = pt - sphere2.center;
if(((a.x * a.x + a.y * a.y + a.z *a.z) < sphere1.radius * sphere1.radius) &&
((b.x * b.x + b.y * b.y + b.z * b.z) < sphere2.radius * sphere2.radius))
{
// inside the region
}

My Site
Advertisement
I would like to get the equation of the intersected region ...

I know that the equation of the sphere is :

ax2 + by2 + cz2 + dxy + exz + fyz = Constant

How to solve them to get the intersected region ...
Come to visit Egypt (the Land of Civilization)

This topic is closed to new replies.

Advertisement