Listing 2. Source code for the mainSetup method.

Penguins02's Code

Created by: Dick Baldwin

world

Methods

  public void mainSetup ( ) {
    
       print( mainSetup );
  // Align the objects with the world
  camera .setPointOfView( world ); duration = 0 seconds
  ground .setPointOfView( world ); duration = 0 seconds
  papa .setPointOfView( world ); duration = 0 seconds
  mama .setPointOfView( world ); duration = 0 seconds
  baby .setPointOfView( world ); duration = 0 seconds
  hole .setPointOfView( world ); duration = 0 seconds
  TextPenguins02 .setPointOfView( world ); duration = 0 seconds
  // Set viewpoints for the penguins
  papa .turn( RIGHT , 0.07 revolutions ); duration = 0 seconds
  papa .moveAwayFrom( target = world , amount = 6 meters ); duration = 0 seconds
  mama .turn( LEFT , 0.11 revolutions ); duration = 0 seconds
  mama .moveAwayFrom( target = world , amount = 5 meters ); duration = 0 seconds
  baby .moveAwayFrom( target = world , amount = 8 meters ); duration = 0 seconds
  // Set viewpoint for 3D text
  TextPenguins02 .turn( RIGHT , 10/360 revolutions ); duration = 0 seconds
  TextPenguins02 .move( UP , .3 meters ); duration = 0 seconds
  // Set camera viewpoint
  camera .turn( RIGHT , 170/360 revolutions ); duration = 0 seconds
  camera .moveAwayFrom( target = world , amount = 10 meters ); duration = 0 seconds
  camera .move( UP , 1.5 meters ); duration = 0 seconds
  }