Astronomy Hour of Code

Activity 20: Adding the Stars


(Advanced Lesson)

For the final step, now we are going to set the images for our skybox to images of the night sky. In our starting code below, identify the skybox:Load method call and change the name of the image files to the night sky images.

The night sky images with the path are:


Notice that the file extension for the new image files are .png and not .jpg

Now you are ready to Run your program and move your telescope around the sky.

Exploration Challenge (Optional):

You have the code below for a working virtual telescope. We have hidden images of three planets, a supernova, a galaxy and the Pillars of Creation at random coordinates in the night sky. Explore the sky using the movement keys and as you pass over one, the console output will alert you. You can zoom in and out of the image with the Z key and see or hear what you have found. After you complete the activity, look at the code to find the coordinates and change them for a friend.

The links below provide more information on the images, which were all taken from the Hubble Space Telescope. We selected the Right Ascension and Declination coordinates for these objects randomly. Professional astronomers use charts and computer programs to find these coordinates as well as when the objects are visible from their location.

If you want to learn more about astronomy and robotic telescopes, you can visit the Skynet Robotic Telescope Network or the Skynet Junior Scholars websites.

End of Lesson

You have reached the end of the lesson for Astronomy. To view more tutorials, press the button below or you can go back to the previous lesson pages.