Giter Site home page Giter Site logo

solar-system-lab's Introduction

Using Variables: The Solar System

solar system

Your Task

Your task is to use the chart below to create nine spheres to create an accurate model of the solar system. The chart shows the Diameter of each planet in relation to Earth's diameter, and the Distance from the Sun of each planet in relation to Earth's distance. You should assume that the origin of the scene is the Sun (that's right, you are standing in the sun for this lab).

The numbers below are all ratios. So, for example, Venus is has a diameter that is 0.9 times as large as earth's, and is 0.7 times as far from the sun as earth. It does not matter how big you make earth, but the relative sizes of each of the other planets need to be accurate to what you create for earth.

Assume that in the code the ellipse that represents Earth is in the correct position and the correct size. Place the other planets in the appropriate position with the appropriate size in relation to Earth.

Planetary Facts - Ratio to Earth

ratios MERCURY VENUS EARTH MARS JUPITER SATURN URANUS NEPTUNE PLUTO
Diameter 0.4 0.9 1 0.5 11.2 9.5 4.0 3.9 0.2
Distance from Sun 0.4 0.7 1 1.5 5.2 9.6 19.2 30.1 39.5

Additional Goals

Can you make the planets spin in place (rotate on their own axes) using an a-animation tag?

Can you change the lighting or the background sounds (although technically space is silent, since there is no medium through which longitudinal sound waves can be transmitted)?

Expert Challenges

If you accomplish all of these goals here are some suggestions on how you could expand on this project

Can you make the planets orbit the sun, in addition to spinning on their own axes?

When a planet is clicked on, can you make it change texture or color?

Could you add shooting starts in the background or an asteroid belt?

Don't stop there, these ideas are meant to be open ended to get you started thinking about all you can do with code!

solar-system-lab's People

Contributors

twant avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.