# calculate complex geometry for a dynamic system [duplicate]

Imagine a spherical ball with radius r that equally coated into two hemisphere P(grey) and S(white) is thrown at the pool. Consider the ball can float (up-down) and rotate. There is an interface separate two different fluid A(air) and B(water). Assume that the interface is flat. α defines the position of the ball and β defines the orientation of the ball. So α larger means ball is more in zone A and vice versa. Range of β and α is $$[0,360^0]$$ and $$[0,180^0]$$. The Schematic representation of this is below.

To calculate the surface area of P(grey) coated portion of the ball into A(air) is given by following equation, $$\mathrm{Area}_{P@A}= r^2\int_{\theta=\frac{\pi}{2}-\beta}^\alpha \int_{\phi=\arcsin(1/(\tan\theta \tan \beta))} ^{\pi -\arcsin(1/(\tan\theta \tan \beta)} \sin\theta\; d\theta d\phi.$$

After solving this equation, we can get the following solution. $$\textrm{Area}_{P@A}= 2 r^2 \left\{ \cos (\alpha) \sin ^{-1}(\cot (\alpha) \cot (\beta)) -\tan ^{-1}\left(\frac{\cos (\beta)}{\sqrt{\sin ^2(\beta)-\cos ^2(\alpha)}}\right)\right\}+\pi r^2 (1-\cos (\alpha)).$$

Note that the solution is defined as a function of α and β. If we change the value of α and β, the area of P coated portion into A(air) will change eventually. Thus we can calculate the area for all valid condition of $$\alpha$$ and $$\beta$$.

Now consider a different situation where P and S are not equally coated rather S>P. So I have two spherical cap. Lets assume we know all properties of the cap. Here I show few but if it is necessary we can introduce more.

How can i modify my previous expression if I only want to calculate the red coloured area? What will be my limit of integration? I have seen this question where spherical cap crossing an intersection with some given parameter is shown but in my case my sphere can both rotate and translate. So I need some sort of analytical solution like the hemisphere case where the solution will be a function of rotation and translation.

NOTE: If it is necessary to introduce more parameter, we can do it because of the uniqueness of this problem.