Archive

Archive for September, 2007

Google Earth Skydome Using PhotoOverlay

September 23rd, 2007 2 comments

Sky in Google Earth using PhotoOverlayA few months ago I posted a Google Earth add-on which used a large 3D model hemisphere with a full-sky cloud image plastered on the inside to create fake sky backdrops.  Turns out, with a little bit of KML magic you can do pretty much the same thing with the new panoramic Photo Overlay feature in Google Earth 4.2.

This is a PhotoOverlay sky centred on the Swiss Alps:

PhotoOverlay Skydome (30kB)  

Opening the file takes you straight inside the panorama. When you click ‘exit photo’ the dome remains visible, enabling you to fly around the inside the same way as the 3D model version.  If you move too far away from the dome it disappears, replaced by an Icon. Double click on this Icon or the label under the ‘Places’ panel to re-enter it.

Compared with my 3D model version this has the advantage of being very quick to put together from scratch. The key is to use a very large spherical Photo Overlay, with a field of view covering just the top half and Camera altitude set at, or very near ground level. Here’s the KML stripped to its basics:

<?xml version=”1.0″ encoding=”UTF-8″?>
<kml xmlns=”http://earth.google.com/kml/2.2″>
<PhotoOverlay>
  <Camera>
     <longitude>8.230</longitude>
     <latitude>46.707</latitude>
     <altitude>100</altitude>
     <heading>0</heading>
     <tilt>90</tilt>
     <roll>0</roll>   
  </Camera>
  <Icon>
  <href>files/clouds.jpg</href>
  </Icon>
  <ViewVolume>
   <leftFov>-180</leftFov>
   <rightFov>180</rightFov>
   <bottomFov>0</bottomFov>
   <topFov>90</topFov>
   <near>20000</near>
  </ViewVolume>
  <Point>
   <altitudeMode>relativetoGround</altitudeMode>
   <coordinates>8.230, 46.707, 0</coordinates>
  </Point>
  <shape>sphere</shape>
  <roll>0</roll>
</PhotoOverlay>
</kml>

  • The <ViewVolume> attributes tell GE what proportion of the sphere to display.  A complete sphere would have a <bottomFov> value of -90.  Here I just want the top half so I set this to 0.
  • The radius of the sky dome is given by the <near> value.   20,000 metres in this case.  Note, if this value is too large, GE won’t fully render it.
  • On mountainous terrain the <Camera> altitude is tricky to get right.  Too low and GE finds it impossible to fly inside to view the panorama in photo-mode. Too high and there’s a visible gap between dome and the ground.
  • The <Point> coordinates aren’t absolutely necessary, but do ensure there’s an Icon when the dome itself isn’t visible, which is useful. 

For the image you need a 360 degree panoramic cloud photo.  The one in this file is an equirectangular image (sky12.jpg) from Philo’s Sky Collection. I chopped off the bottom half of the original and reduced it 1024 pixels wide.  High resolution images would need splitting into smaller tiles and the creation of an <ImagePyramid>. For further info check out the new KML topics documentation here: http://code.google.com/apis/kml/documentation/topicsinkml.html

Tags:

Google Sky Planet Orbits

September 21st, 2007 6 comments

Planets in Google Earth SkyDigressing slightly from the real-sized planets, I figured there might be some mileage in creating diagrams showing orbital positions around the Sun to run alongside normal Google Sky planetary motion animations. This way you can see more clearly how positions relate to one another, giving some insight into why and when retrograde / prograde motion occurs.

Planets in Motion - Google Earth Sky LayerWhat I’ve done is put together a simple animated chart of planet orbits, which synchronizes with the Planets in Motion animation in the Google Sky Layers [Edit 2008/1/10 – this layer is now called ‘Our Solar System’]. The file combines several independently moving screen overlays, one for each planet, and displays them in the same manner as an orrery, in the top left corner of the Google Earth window.  To view it, open the file below, and turn on the ‘Planets in Motion’ Layer:

Planets in Orbit (Google Earth v4.2 Required)

Ideally the diagram would include accurate relative orbital distances. Unfortunately this isn’t possible without cramping the inner planets so closely together they become indistinguishable. A logarithmic distance scale might work better, maybe even splitting the chart into two: Inner and Outer Planets – I’ll have to investigate this further.  There isn’t really a whole lot of room to work with up there in the corner of the screen. 🙂

Tags:

Animated Planets in Google Sky

September 19th, 2007 3 comments

Saturn in Google SkyThis is a time animated version of the real-sized planets file for Google Sky I mentioned yesterday. The Animation covers 60 days starting from 30 days previously. Position intervals are at 2 hours, and the file automatically updates once a day.

Animated Planets (Google Earth v4.2 Required)

First time it plays the file has to load in all the different Moon phase images causing stuttering. Subsequent views should run smoothly. I’ve added some optional tracks which are plotted in sync with each body’s transit. Everything else works same as before.  One slight annoyance is the way labels sometimes flip around the arrows, but without removing them entirely I don’t see how to prevent it.

Next, I’ll look at animations of different time durations, maybe piggy-backing on things like the Moon and Planet Layers in Google Sky.   The data is accurate over several thousand years,  so plenty of possibilities!

Tags:

Real Sized Planets in Google Sky

September 17th, 2007 8 comments

Jupiter in Google SkyMoon in Google Sky

Seeing as there are several Google Earth (Sky) KML files all showing live planet positions using Icons, I thought it might be interesting to try something with Image Overlays instead.  One advantage of this method is being able to use detailed photographs, creating the illusion of zoomable objects in the same way as the stars and galaxies in the Google Sky base imagery.

The following file displays the Sun, Moon, planets and Pluto. Positions are automatically updated via a networklink every hour. Note, you will need to zoom in quite a long way to see most of these. Double clicking on the arrow icons will get you there quicker.  

Planets in Google Sky (Google Earth v4.2 Required)

Several other features in the file:

  • Bodies shown at their correct angular size, and polar orientation using scaled and rotated photographs with transparent backgrounds. 
  • The Moon is displayed as one of 50 separate photos, depending on its  current phase.  These are the same images that are in my Lunar timeline.
  • Each overlay is assigned a specific draworder so that during occultations (when one body passes in front of another), they are displayed on top of one another in the right sequence. 

The arrow shaped icons are an attempt to do several things at once:

  • Indicate planet locations without obscuring the overlays.
  • Represent velocity vectors. Pointing in the direction planets are moving.
  • Hopefully, avoid confusion with the Google Sky Layers’ Planet icons. 

I’m currently putting the final touches to a time animated version of this file, which I’ll post tomorrow.      

Credits:

  • Images are from Wikipedia, originally from NASA. 
  • Ephemerides from JPL Horizons.   The quantities this file is based around are ‘Astronometric declination and right ascension’, ‘Illuminated fraction’ (for the Moon’s phase), ‘Target angular diameter’,  ‘North pole position angle’ and ‘Range’.
Tags:

50 Bouncing Google Earth Globes

September 10th, 2007 No comments

This is a belated follow-up to my bouncing globe in Google Earth animation.  With forty-nine additional globes , and bounce collisions dampened to introduce some variety.

Here’s a video showing it running in real time in Google Earth…

…and the KML:

Bouncing Globes (1MB,  Google Earth v4.2 Required)

CAUTION.  The file is heavy on resources.  Depending on your system it may take up to a few minutes to load.  

I suggest playing it back on a slow speed setting, in bounce mode. To access the time options click the white clock face to the left of the time slider gadget – make sure ‘Clamp to beginning of Window’  isn’t selected.

Once the file has loaded into memory, it’s remarkable just how well Google Earth 4.2 copes with so much data – the KML consists of around 20,000 separate 3D Model positions plus the same number of Image Overlays (for the shadows).  However, GE will hang if the time control is widened.

For those interested in such things, the file was generated by Python script using the SUVAT equations for the physics.  

Tags: