// // Name: Solar Eclipse 2009 // License: Public Domain // Author: Matthew Gates // Description: Script to demonstrate a total solar eclipse which will happen // in 2009 (location=Rangpur, Bangladesh). // function blockText(textArray) { var fontSize = 20; var lineSep = fontSize * 1.5; y = 50; ids = new Array(); for(i=0; i150; t--) { core.setTimeRate(t); core.wait(0.007); } core.waitFor("2009:07:22T00:30:00"); clearLabels(ids); core.wait(7); for(t=150; t>25; t--) { core.setTimeRate(t); core.wait(0.007); } core.waitFor("2009:07:22T00:56:00"); for(t=25; t>8; t--) { core.setTimeRate(t); core.wait(0.007); } ids = blockText(Array("As the last of the Sun is covered by the Moon", "the sky darkens quickly, and the brighter stars", "and planets become visible")); core.waitFor("2009:07:22T00:58:20"); for(t=8; t>5; t--) { core.setTimeRate(t); core.wait(0.007); } clearLabels(ids); core.waitFor("2009:07:22T00:59:10"); StarMgr.setLabelsAmount(4); SolarSystem.setLabelsAmount(4); StarMgr.setFlagLabels(true); SolarSystem.setFlagLabels(true); core.waitFor("2009:07:22T00:59:30"); ids = blockText(Array("At totality, the Sun is completely hidden behind the Moon")); core.selectObjectByName("Moon", false); StelMovementMgr.setFlagTracking(true); StelMovementMgr.zoomTo(4, 5); core.wait(1); StarMgr.setFlagLabels(false); SolarSystem.setFlagLabels(false); core.wait(4); clearLabels(ids); core.wait(3); StelMovementMgr.setFlagTracking(false); core.moveToAltAzi(20, 90, 3); StelMovementMgr.zoomTo(60, 4); core.waitFor("2009:07:22T01:01:45"); for(t=5; t>2; t--) { core.setTimeRate(t); core.wait(0.007); } clearLabels(ids); ids = blockText(Array("The Sun emerges from behind the Moon", "The sky brightens once more")); core.waitFor("2009:07:22T01:02:50"); for(t=3; t<150; t++) { core.setTimeRate(t); core.wait(0.02); } clearLabels(ids); core.wait(3); ids = blockText(Array("The End")); core.wait(4); clearLabels(ids);