Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


Animate approaching planets, as per a journey though the Solar System. At a distance of 2 Blender units, a sphere fills the entire height of the camera's view port:

This generates the following image:

Units, Measures, and Distances

The sphere is 4879.4 km in diameter, or 1 Blender unit.

The camera's final position is 9758.8 km from the planet, or 2 Blender units.

The camera's start position is 45999102.0 km from the planet, which is too many Blender units (9427.2).


Scale the planet's radius to simulate how it would appear at a given distance from the camera.


The angular diameter of the object can be calculated using:

$δ = 2 \times arctan( r / D )$


  • δ is the angular diameter;
  • r is the radius; and
  • D is the distance.

Plugging the numbers:

δ = 2 arctan( 2439.70 / 45999102 )
  = 0.0001060759 radians

Update #1

I think I can use the following:

The distance to the camera (adjacent side) is 9758.8 km.

Since $tan(δ) = opposite \over adjacent$, then $opposite = adjacent \times tan(δ)$. Thus

o = 9758.8 km tan( δ )
  = 9758.8 km tan( 0.0001060759 )
  = 1.035 km

Update #2

So at a distance of 45999102 km, the apparent size of a sphere with a 2439.70 km diameter would be 1.035 km at a distance of 9758.8 km.

Since 1 Blender unit = 4879.4 km, it follows that the sphere should have a radius of 0.000212116 Blender units, which is completely invisible.


  1. Have I gone astray?
  2. What would be the best approach to calculate the appropriate scaling factor for the sphere's radius (in Blender units)?


Using Henry's answer yields:

  • Planet radius, $r_p = 2439.7 km$
  • Planet distance, $D_p = 45999102 km$
  • Blender distance, $D_b = r_p \times 4 = 9758.8 km$
  • Apparent diameter: $2r \sqrt{ 1 - r^2 / D^2 }$
  • Apparent distance: $D − r^2 / D$
  • Scale factor: $Simulated\space apparent\space diameter \over Simulated\space apparent\space distance$ $\div$ $Blender\space apparent\space diameter \over Blender\space apparent\space distance$

Simulated apparent diameter = $2 \times 2439.7 \times \sqrt{ 1 - 2439.7^2 \over 45999102^2 }$ = $4879.40 km$

Simulated apparent distance = $45999102 - 2439.7^2 \over 45999102$ = $45999101.87 km$

Blender apparent diameter = $2 \times 2439.7 \times \sqrt{ 1 - 2439.7^2 \over 9758.8^2 }$ = $4724.46 km$

Blender apparent distance = $9758.8 - 2439.7^2 \over 9758.8$ = $3659.55 km$

$\therefore$ Scale factor = $4879.40 \over 45999101.87$ $\div$ $4724.46 \over 3659.55$ $\approx .0000821660$

Thank you!

share|cite|improve this question
up vote 2 down vote accepted

I would have thought you should have δ = 2 arcsin( r / D ) which would mean that as the camera approaches the surface of the planet, $\delta$ would approach $\pi$.

I assume you know how to draw a circular disk of diameter $2r$ a distance $D$ away in your animation system. As the camera gets closer to the (centre of the) planet, the apparent disk will seem to have a diameter of 2 r cos( δ / 2 ) and be a distance away of D - r sin( δ / 2 ).

You can avoid the trigonometric functions by using an apparent diameter of $2 r \sqrt{1-r^2/D^2}$ and an apparent distance of $D - r^2/D$.

share|cite|improve this answer
+1 I was just in the process of typing up the same... – t.b. Jul 16 '11 at 10:49
@Henry: Thanks for this. I am a bit confused: the actual distance between the sphere and the camera will be fixed at at 2 Blender units (equivalent to 9758.8 km). I want to give the appearance of distance by changing the sphere's diameter... if that makes sense. – Dave Jarvis Jul 16 '11 at 11:05
@Henry: Basically, how do I use those calculations to come up with the sphere diameter's given a camera distance of 2 Blender units and an emulated physical distance of 45999102 km? – Dave Jarvis Jul 16 '11 at 11:08
@dave: When the camera is 45999102 km from the sphere, the sphere will appear like a disk of diameter about 4879.399993 km a distance about 45999101.87 km away, as you should expect. When the camera is 4879.4 km from the centre of the sphere, the sphere will appear like a disk of diameter about 4225.68 km a distance about 3659.55 km away. If you regard the latter as filling the view port side-to-side, then presumably the former fills $\frac{4879.399993}{45999101.87} \div \frac{4225.68}{3659.55} \approx 0.000092$ of the view port. – Henry Jul 16 '11 at 12:30
@dave: ... or if you would prefer to see the view port as an angle, then the angle when close to the planet is about $1.047$ radians or $60$ degrees and when far away $0.000106$ radians or $0.0061$ degrees, so the faraway angle is about $0.000101$ times the near angle, close to the previous result. – Henry Jul 16 '11 at 12:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.