Prev: Call for Papers: International Conference on Communications Systems and Technologies ICCST 2010
Next: MAKE UPTO $5000 PER MONTH! $2000 IN FIRST 30 DAYS!
From: Daniel noSpam at daik dot on 19 Jun 2010 23:06 On Sat, 19 Jun 2010 10:15:41 -0400, Eric Sosman <esosman(a)ieee-dot-org.invalid> wrote: >On 6/19/2010 9:43 AM, Lew wrote: >> Daniel wrote: >>>> I'm looking for a library to draw the orbits of all planets, dwarf >>>> planets and moons in the solar system. I'm looking for this for a game >>>> project, so it does not need to be 100% accurate but it needs to be >>>> close. Even if the library can "only" draw the planets I am >> >> Why did you put "only" in quotes? >> >>>> interested. Does anyone know of any good libraries to do this? This is >>>> for an open source project so the license needs to be compatible with >>>> open source projects. >> >> Eric Sosman wrote: >>> Just draw ellipses. The difference between an ellipse and the >>> planet's true lumpy-bumpy path will be too small to see at the coarse >>> resolution of a computer screen. >>> >>> For that matter, most moons will be indistinguishable from the >>> planets they circle. Let's see: Neptune's mean distance from the Sun >>> is 2.8 billion miles, so a display of the full orbit must span a >>> scaled distance of 5.6 billion miles. If the screen is 2000 pixels >>> across, each pixel represents somewhat more than 2.8 million miles. >>> Neptune's most distant known moon, Neso, is about 30 million miles >>> from the planet, not quite eleven pixels. The innermost seven moons >>> are all less than one-eighth of a pixel away, so they'll display >>> right on top of Neptune itself. >> >> At the scale that shows Neptune, Mercury's orbit on your hypothetical >> screen similarly would vary from, oh, ten to nineteen pixels from the >> Sun. Half that if you want to show the Kuiper belt. > > And Luna would be about one-tenth of a pixel from Terra, which >may be all right because Terra itself is only 0.003 pixels across. >And you don't even want to think about Phobos ... > > The point of all this scale-mongering is to get the O.P. to >think about what he's trying to do. A true-scale view of the >Solar system on a screen whose resolution can't be finer than 0.05% >is just not going to show the sort of detail he mentions, and is not >going to look very good in his game. He's going to have to change >his, er, viewpoint in some way to get anywhere. Two possibilities: > > - Don't try to show the entire Solar system all at once, but > zoom in on the region where Captain Zoom is battling the > Underlings of the Overlord. Focus on Neptune itself and let > the Sun drift far off-screen, and you'll be able to scale up > to the point where things start to become visible. > > - Cheat. Show the entire Solar system, but selectively magnify > some distances and shrink others to make a pretty picture. > Make Terra the size of six Jupiters, drag Neptune in to about > Mars' orbit, let the space ships travel at a hundred c or so, > that sort of thing. > >... and surely there are other approaches a game writer might employ. > > Google found <http://www.phrenopolis.com/perspective/solarsystem/> >for me, a page that displays a to-scale rendering of the Solar system >with the Sun shrunken from its normal 800,000 miles down to about six >inches. As the page's text points out, "That makes this page rather >large - on an ordinary 72 dpi monitor it's just over half a mile wide." >Use a steady hand on the scroll bar ... Since we went down this path let me clarify what I am actually trying to do. There are three basic views in my game 1. Inner system, Sun-asteroid belt 2. Outer system sun asteroid belt-Eris 3. Planetary view (for example Earth-Moon, or Mars-Phobos-Deimos) I am very well aware of scale, my post was to try to find a library to help me do the actual position of the bodies at a given date and time. Hopefully I can use the same library to draw the moon locations when in the planetary view. I am happy to draw the orbits as ellipsis however, determining where on the ellipse a planet is at a given date is a bit more tricky. From my research I'm lead to believe that we currently have no numerical way of determining Plutos orbit, which makes me believe that the orbit of Eris will be even harder to calculate. Apart from that doing all the calculations of where the major planets are is not trivial, and again if there is a library to help me do this it is much less bug prone than me rolling my own. So again, does anyone know if such a library exits? -daniel
From: Daniel noSpam at daik dot on 19 Jun 2010 23:08 On Sat, 19 Jun 2010 19:41:13 -0700, Roedy Green <see_website(a)mindprod.com.invalid> wrote: >On Sat, 19 Jun 2010 21:26:09 +1000, Daniel <noSpam at daik dot se> >wrote, quoted or indirectly quoted someone who said : > >>I'm looking for a library to draw the orbits of all planets > >Would not just a simple ellipse do? > >java.awt.geom The ellipse is fine as a shape, but I also need to know the location of the planet along that ellipse, and that is where the problem starts. I suppose I was not entirely clear, I do not only want to draw the orbits but also the planets along the orbit. -daniel
From: Charles Hottel on 19 Jun 2010 23:44 "Daniel" <noSpam at daik dot se> wrote in message news:md1r165jvuftopn3om2qg2s7htvgg0rbp3(a)4ax.com... > On Sat, 19 Jun 2010 19:41:13 -0700, Roedy Green > <see_website(a)mindprod.com.invalid> wrote: > >>On Sat, 19 Jun 2010 21:26:09 +1000, Daniel <noSpam at daik dot se> >>wrote, quoted or indirectly quoted someone who said : >> >>>I'm looking for a library to draw the orbits of all planets >> >>Would not just a simple ellipse do? >> >>java.awt.geom > > The ellipse is fine as a shape, but I also need to know the location > of the planet along that ellipse, and that is where the problem > starts. I suppose I was not entirely clear, I do not only want to draw > the orbits but also the planets along the orbit. > > -daniel > In "Just Java 6th Ed", Peter van der Linden mentions an applet named Sky View Cafe by Kerry Shetline. See pages 574 to 578. One of the pictures shows the solar system out to Mars. I believe the code is available and you might be able to adapt it to your purpose. See http://www.skyviewcafe.com/
From: Lew on 20 Jun 2010 02:15 Daniel wrote: > I am happy to draw the orbits as ellips[e]s however, determining where > on the ellipse a planet is at a given date is a bit more tricky. From > my research I'm lead to believe that we currently have no numerical > way of determining Plutos orbit, which makes me believe that the orbit One can calculate it for the next 10-20 million years, though, according to <http://en.wikipedia.org/wiki/Pluto#Orbit_and_rotation> and references therefrom. > of Eris will be even harder to calculate. -- Lew
From: Jeff Higgins on 20 Jun 2010 06:27
On 6/19/2010 7:26 AM, Daniel wrote: > Hello all, > I'm looking for a library to draw the orbits of all planets, dwarf > planets and moons in the solar system. I'm looking for this for a game > project, so it does not need to be 100% accurate but it needs to be > close. Even if the library can "only" draw the planets I am > interested. Does anyone know of any good libraries to do this? This is > for an open source project so the license needs to be compatible with > open source projects. > > regards > Daniel This may not answer your quest for a Java library but I found the links on this page interesting. <http://nineplanets.org/data.html> |