|
|||
Elliptical OrbitThe known world, like all planets, orbits its sun in an elliptical orbit with the sun as one of its foci. An ellipse (or, informally, an oval) is a shape such that every point on the ellipse has the same sum of distances to two fixed points called foci. The two foci are allowed to be the same point, in which case the ellipse is a circle. An ellipse can be expressed by the equation x2/a2 + y2/b2 = 1, where a ≥ b > 0. The two foci are located at (f,0) and (–f,0) where f = √(a2 – b2). The (constant) sum of the distances from each point on the ellipse to the foci is s = 2a. Imagine that the sun is located at (f,0) and that the known world begins its orbit at the point (a,0). Kepler's Law of Equal Area specifies that the planet always sweeps the same area, measured from the sun, in the same amount of time, no matter where it is in its orbit. Thus, when the planet is nearer its sun, it must sweep a larger angle (centered at the sun) than when it is farther from its sun. Given the specification of the ellipse and a number of equal intervals of the orbit, you are to compute the angle swept in each interval. Input SpecificationEach input case consists of two unsigned floating-point numbers representing a and b in the ellipse equation and an unsigned integer, n, representing the number of equal time intervals in which we are dividing the orbit. The three numbers are separated by one space and the case is terminated by <EOLN>. “0<EOLN>” follows the last case. It is not to be processed; it simply specifies the end of input. Output Specification
The output cases are to be processed in the same order as the input cases. Each case begins
“ Sample Input
Output for Sample Input
|
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |