I am creating a scale model of the solar system for a personal website project and I am now stuck with the basics math for it. I have been banging my head against the wall trying to get things right but nothing beats being so poor at math.
So, all I am stuck at is scaling down the values, from gigantic values to mere unit of pixels.
The sun's diameter is 1391400 (km), I am scaling it down to 50 (pixels). Dividing these two numbers I get 27828 - I know this number is going to be useful in scaling down other values such as the distance between the sun and earth, which is 149,600,000 (km).
Now I am not even sure where to go from where, do I divide any number that comes up with 27828? I guess not, a voice in me is saying that is drastically wrong and isn't what I want.
I will give you basic values that I've with me,
1391400 scaled down to 50. 57910000 (distance from Sun to Mercury) 108200000 (distance from Sun to Venus) 149600000 (distance from Venus to Earth)
Please help me, I am totally banging my head on this.
If you know basic JavaScript and HTML, you can take a look at what I am trying to create: https://codepen.io/depy/pen/WMENyZ?editors=0010
The other alternative is to take into account the fact that most other planets are far more distant from us than the sun is, which would involve Thales' theorem and result in even smaller values.
– Arnaud Mortier Feb 13 '18 at 15:26