Calculates the intersection of two spheres.
Rhino.IntersectSpheres (arrSpherePlane0, dblSphereRadius0, arrSpherePlane1, dblSphereRadius1)
arrSpherePlane0 |
Required. Array. An equatorial plane of the first sphere. The origin of the plane will be the center point of the sphere. |
dblSphereRadius0 |
Required. Number. The radius of the first sphere. |
arrSpherePlane1 |
Required. Array. An equatorial plane of the second sphere. The origin of the plane will be the center point of the sphere. |
dblSphereRadius1 |
Required. Number. The radius of the second sphere. |
Array |
An array of intersection results, if successful. The results are as follows:
|
||||||||||||
Null |
If not successful, or on error. |
Dim arrLine, arrPlane, dblHeight, dblRadius
Dim arrResults, i
arrPlane0 = Rhino.WorldXYPlane
arrPlane1 = Rhino.MovePlane(arrPlane0, Array(10,0,0))
dblRadius = 10
arrResults = Rhino.IntersectSpheres(arrPlane0, dblRadius, arrPlane1, dblRadius)
If IsArray(arrResults) Then
If arrResults(0) = 0 Then
Rhino.AddPoint arrResults(1)
Else
Rhino.AddCircle arrResults(1), arrResults(2)
End If
End If