HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Solar System

04-28-2006, 10:40 AM#1
illlusion
-This is a simplifed Solar System in which all objects' path is calculated once per 0.03s on the basis of Newton's Classical Mechanics.
-There is in total 1 fixed star, 9 planets, 18 satellites and 1 comet moving all the time in the whole map.
-To make it available to observe the satellite'orbits in map size I had magnifed all the satellites systems.
-Press ESC to rise the camera
-Enter real number(0-100) to turn on corresponding multicolor-track function.
Attached Images
File type: jpgsolar.JPG (28.7 KB)
Attached Files
File type: w3xsolar system.w3x (128.0 KB)
04-28-2006, 11:41 AM#2
elemental
nice but the sun doesn't look to real :o
04-28-2006, 02:17 PM#3
Freakazoid
Quote:
Originally Posted by elemental
nice but the sun doesn't look to real :o

You can never bee sure xD, interesting +rep!
04-28-2006, 05:25 PM#4
aquilla
The sun does look a bit funky (the "three lights" I guess), the colour seems about right although it's hard to say O.o

/me downloads
04-28-2006, 07:30 PM#5
Tim.
Planetary objects have elliptical orbits, not spherical.

This seems to be more of a cinematic resource (Like a cinematic spell), which I am afraid does not meet our Resource section guidelines. IF you would like I can move this to the cinematic or trigger forums.
04-28-2006, 09:46 PM#6
illlusion
Actually, all objects' orbits in this map are elliptical because all objest's paths are determined by the same function in jass which is translated from the Newton's Law. It's just that the particular parameters of planets makes the ellips more like spheres, so they look like spheres. That means there is not difference in the type of curve between all objests in this map. The only difference is the inital paremeters for every objects. Some makes it more elliptical and some makes it more elliptical.

You can move this for me, thanks. And I guess, it's going to tigger/script forums?

Quote:
Originally Posted by aquilla
The sun does look a bit funky (the "three lights" I guess), the colour seems about right although it's hard to say O.o

/me downloads

The model of sun is actually the "bloodlust" which is amplified three times of the original scale. please tell me if anyone knows the better choice for the model of sun.
04-29-2006, 01:01 PM#7
Tim.
Please don’t double post, I have merged your posts.

Alright this will be moved to the Triggers forum, then.
04-29-2006, 03:10 PM#8
vile
There are plenty of sun like models, try extracting the sun effect from the sun ward on wc3sear.ch. but this is just a demo map, so i doubt if its needed.
04-29-2006, 11:35 PM#9
PipeDream
Cool, Illlusion. I'm a little bit puzzled that it works! That integration method *should* spin out into instability after a few orbits, especially working in single precision.
One way you could improve efficiency is to use symmetry and compute the forces only once per planet pair. If you also switch SetUnitPositionLoc to SetUnitX/SetUnitY, you might save enough resources to drop the timestep down to .02 or so.
04-29-2006, 11:41 PM#10
Dalten
Pretty cool!
04-30-2006, 02:50 AM#11
illlusion
Quote:
Originally Posted by PipeDream
Cool, Illlusion. I'm a little bit puzzled that it works! That integration method *should* spin out into instability after a few orbits, especially working in single precision.
One way you could improve efficiency is to use symmetry and compute the forces only once per planet pair. If you also switch SetUnitPositionLoc to SetUnitX/SetUnitY, you might save enough resources to drop the timestep down to .02 or so.

I'm very sorry that I have such poor english that I think I don't catch what you really mean by "instability", "in single precision".

I really can not compute the force once beccause the orbits are all ellipse and the radius are changing all the time, so dose the force. Thus I need to computer the changing force as a function relative to time.

Big thanks to your tip of switching SetUnitPositionLoc to SetUnitX/SetUnitY
04-30-2006, 03:17 AM#12
PipeDream
Energy is conserved. The energy of this system is the sum of the kinetic and potential energy. Kinetic energy we define as sum .5*m_i*v_i^2, potential as sum over i sum over j!=i -G m_i m_j / |r_ij| where |r_ij| means distance between mass i and j. Your integration method will not conserve energy! In fact it will steadily grow. This is due to the large error relative to timestep in your marching formula:
v(t+dt) = v(t) + v'(t)*dt where ' indicates differentiation
expand v(t+dt) in a taylor series about t:
v(t) + dt v'(t) + dt^2/2! v''(t) + dt^3/3! v'''(t) = v(t) + v'(t)*dt
cancel like terms and gather up error terms into lowest order
v'(t) + O(dt) = v'(t)
so your error is of order dt- if you double the time step, you'll only get twice as accurate.
The instability occurs because this error isn't precisely symmetric and tends to overestimate speed, the proof of which is decidedly more involved. The midpoint method is one way to improve the error to O(h^2), however, since euler's method seems to work and you need to draw every .03 anyway, I don't see much point to upgrading.

While you need to compute new forces at each time step, if you look at two planets, it is unnecessary to compute the force on A due to B and then B due to A because of Newton's third law: F_ba = -F_ab.
04-30-2006, 04:25 AM#13
illlusion
I get what you mean now(english is not my home language). Yes, I knew this method will not conserve the energy and I had tested once that if I increased dT , the total energy would become greater than 0 after some time and the planet would escape form the gravity field. But in the precision of cunrrent 0.03s, this effect would be negligible.

I didnt compute twice of two relative force in the map. Actually, I have neglect the force on sun due to planets and force on planet due to other planets because of the enormous mass of sun relative to other objects in solar and I wish to increase the calculation speed in order to decrease dT. Thus, as I had declared in the map loading screen, this is just a simplified solar system. =P

edit:Would you mind look at this in the link and give me some advice on improving the script efficiency of the map? I am a novice in jass and program,so I'm not very famillier with the jass function. http://www.wc3campaigns.net/showthread.php?t=82679
04-30-2006, 08:12 AM#14
PipeDream
Ahh! I see. You could cheaply add in some interactions by computing the center of mass of the system with the sun and then pretending there is a lumped mass there that the planets interact with. You could continue this to higher orders by adding a dipole moment or quadrupole moment. If you take this to the limit and mix in some serious voodoo, you end up with the fast multipole method, which computes all pairwise interactions in O(n log n) or even O(n) time!
Effectively, that is what you have done by ignoring planet-planet interactions.
04-30-2006, 10:28 AM#15
illlusion
yeah. However, I hadn't used the center of mass because I thought the errors in the initial positions and velocity of planets are much more greater than the correction by using center of mass.(I didn't have complete data of solar, so I just guessed the specific initial positions and velocity based on the data of average positions and velocity which I got from my friend zyl910.) =P