DH wrote:
This is exactly what I suggested you not to do. Dang. Frustrated.
I am hoping you don't get frustrated. Check the last statement of my previous post. Be aware that I am appreciative of your responses. You have me sitting on the edge of my seat. Know also that I have not implemented those phases. I am not ready for that implementation and if I was, I would hold off until I understand your position.
As I am not understanding your concept, here is mine as briefly as I can.
Assume N number of stars in a galaxy at time t1. Each has a gravitational on every other. When star 1 changes position, this change modifies the effect on all other stars. The reason I want two passes is to first, calculate the effect that each causes on the other, before changing the position of any. I can save those calculations somewhere and not change any positions until I have determined all the effects. This is understanding the affects at a given instant in time.
Only after I know those effects, can I begin moving the stars to t2. Once I move any star from its t1 position to a t2 position, then the overall environment at t1 has been disturbed. If I move any star before I have determined how it affects all other stars, then simulation accuracy will be degraded.
Possible thoughts:
Do you think I should evaluate each star, and during that single evaluation, calculate the effect of gravity by every other star, and create a new velocity and position the first time I visit that star. To protect the integrity of the t1 environment, I could save the new values in a ready location, then activate them at the end of t1 or the beginning of t2.
And I do have to ask: In the process of calculating the effect of one star on another, and the results of those effects, there are several stages of processing to complete. As computer simulations require finite amounts of time to do their calculations, every calculation is displaced from every other calculation in real time by some degree. [simulated time is frozen] If the gravity/acceleration/velocity/position update for star 1 is interrupted while something else goes on, that has no effect on star 1, how will the calculation for star 1 be spoiled?
This gets to the concept of a computer simulation. We effectively freeze simulated time for some amount of real time while we perform all the calculations (all that we know about, or want to implement) needed to determine the interactions that take place (effectively) instantly in the analog/real world. Sometimes the simulations are deliberately slower than real time, sometimes the same, and sometimes faster. It all depends on the project.
In summary, I just don’t see how separating the calculation in real time, as opposed to simulated time, generates any inherent limitations. OTH, I am certain there are things of which you are aware that I am not.
DH wrote:
OK. You are well-versed in the concepts of information hiding.
Thank you.
But there is a bit more to it than hiding. It is also pushing the details of a complex calculation down to the point where the only thing to do in a function is that one complicated process. When you know that the function does that one thing and that one thing only, and you know to throw out any code that does not contribute to that one single clear task, then you have a good function. That isolation reduces what is called coupling which in turn, reduces the unanticipated side effects that changes to it will generate.
That’s it for today, and maybe tomorrow. I will be looking at your equations from several posts back and trying to understand them one step at a time. Again, I do appreciate you taking the time to write to me.