Cosmic Atl Doing It Real-Time
                               A Cosmic Journey

    By Dr. Ka Chun Yu, Curator of Space Sciences

    Denver Museum of Nature and Science

           The Cosmic Journey show running at the Museum's Gates Planetarium lets
    our audience experience what it might be like to visit the far reaches
    of our Solar System, using digitally projected imagery.  The
    technology that has made all of this possible is cutting edge, but the
    software is based on some surprisingly well-worn tricks.  In the
    recent July 2003 _Members Monthly_, I wrote about the science behind
    the software.  Here I will detail some basic principles behind our

           The software program that made the Cosmic Journey show possible is the
    Museum's Cosmic Atlas.  Developed in-house by DMNS staff, Cosmic Atlas
    is a ``real-time'' computer simulation of the Solar System and
    celestial sphere; it calculates accurate positions for all of the
    objects in the Solar System including how they move over time.  The
    first Gates Planetarium show was created by deciding on the flight
    path for our imaginary spaceship to travel.  The images we would see
    were recorded and edited into a movie for playback via the eleven
    projectors in the dome.

           Cosmic Atlas is based on tried and true techniques from the flight
    simulator and video game industries.  It is ``real-time,'' meaning
    that the events simulated occur in the time frame as they would
    naturally happen.  An example of this is a flight simulator, which
    ranges from a program for your home PC to the cockpit mock-up used by
    NASA to train shuttle pilots.  In any of these simulators, any changes
    you make as a pilot to the controls are immediatedly reflected in what
    you see in the display of your computer-generated landscape.  Bank the
    plane and the horizon tilts in the appropriate direction.  Push the
    nose of your aircraft down, and the ground fills your view and starts
    to approach; pull up and it recedes.

           Any flight simulator must keep track of where you are in relation to
    your surroundings, as well as where you are looking.  In more advanced
    simulators, you might have three monitors, one for the forward, left,
    and right directions.  At the Gates Planetarium, there is a different
    view direction for each of the eleven projectors, making it the
    highest resolution flight simulator we know of.  The Cosmic Atlas
    software determines where the audience is in space, and what is
    visible around them, whether it is just the star field or whether
    there is a planet in view.  This changes depending on not only where
    the viewer is, but also the date the program is set to, since our
    model planets and moons move according to an orrery program.

           The lighting must also be determined (in this case the Sun is the only
    important light source in the Solar System).  We determine which side
    of a planet is lit, and how shadows are cast onto other objects.
    Different objects will reflect light differently, depending on their
    shape, color, surface texture (which might be smooth, grooved, or
    rough), and composition (such as metal, glass, wood, plastic, fur).
    Luckily our current planet models are simple enough that we do not
    have to deal with wood or fur.  In the case of the Earth (our most
    difficult object to render), the water reflects differently than the
    land and we have to deal with a cloud layer, cloud shadows, an
    atmosphere, atmospheric haze, and a nighttime layer showing the lights
    of cities on the surface.

            In the future, Cosmic Atlas will allow the user to fly down to the
    surfaces of planets like the Earth or Mars.  How much detail and how
    realistic the small-scale detail looks will depend on our computer CPU
    and memory resources.  Real-time simulations are inherently limited in
    how complicated the scenes are, because each scene is calculated and
    drawn not just once but multiple times.

           Because real-time simulations must be able to react instantly to
    whatever the user wishes to do, they must re-calculate positions and

    lighting numerous times each second.  To avoid jerky motion (think of
    old movies with stop animation special effects like _King Kong_), we
    need a re-draw (or refresh) rate of at least 50 new frames per second
    (or 50 Hz), although 60 Hz or more is preferable.  In a real-time
    simulation, the computer program might perform the following tasks up
    to 60 times each second: reads what the user is doing with the
    controls, works out the user's position and orientation in space,
    re-computes the positions of any other object that might have moved
    during that time, finds out which objects are obscured either
    partially or completely by foreground objects (to minimize the amount
    of time drawing them), determines lighting and shadowing for all
    visible objects, and then renders the image based on reflection and
    shading rules for each model.

            As Cosmic Atlas grows, our goal is to expand its horizons to include
    exploring our Galaxy, and eventually to go out into extragalactic
    space.  The scenes will get increasingly involved not just from the
    sheer number of objects (there are an estimated 400 billion stars in
    our galaxy alone!), but the complexity of objects such as nebulae and
    dust clouds which are labyrinthian in shape, and so unlike the simple
    spheres that make up our planet models.  The current generation of
    computers are fast, but not fast enough to create substantially more
    intricate scenes such as those found in computer animated films (where
    a single frame takes anywhere from minutes to hours to render, not the
    milliseconds we have available for real-time).  Instead we have to
    make use of clever tricks to make these simulations work.  With the
    appropriate amount of programming ingenuity and by pushing the
    Computer hardware to its limit, we hope to continue to bring the
    Universe to Gates Planetarium audiences for years to come.