POV-Ray : Newsgroups : povray.binaries.scene-files : My gravity calculations don't work... help! Server Time
3 Sep 2024 04:23:00 EDT (-0400)
  My gravity calculations don't work... help! (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: Peter Popov
Subject: My gravity calculations don't work... help!
Date: 4 May 1999 15:17:25
Message: <372f3511.24815584@news.povray.org>
I tried to create a realistic gravitational model, but for some reason
it didn't work. In the attached "gravity.zip" is the pov scene used
for this purpose and a data file that defines the Sun, Mercury, Venus
and Earth. The data file needs to be in the same directory as the
scene file. I advise you to make an archive copy of it since it is
modified on a frame-by-frame basis.

The "sol.zip" file you'll find attached contains precise astronomical
data I used in this unfortunarely malfunctioning model. I checked and
double-checked but there's still the possibility I made a typo or
missed some zeroes :)

Can anyone please tell me why this isn't working? All units are SI,
output precision is high enough... it just isn't working :(


---------
Peter Popov
ICQ: 15002700


Post a reply to this message


Attachments:
Download 'gravity.zip' (2 KB) Download 'sol.zip' (121 KB)

From: Ken
Subject: Re: My gravity calculations don't work... help!
Date: 4 May 1999 17:24:09
Message: <372F56DD.E7E5BC2F@pacbell.net>
Peter Popov wrote:
> 
> I tried to create a realistic gravitational model, but for some reason
> it didn't work.
> Can anyone please tell me why this isn't working? All units are SI,
> output precision is high enough... it just isn't working :(
> 
> ---------
> Peter Popov

 Perhaps looking at the work of those who have gone before you may
offer you the data needed for solving your current miscalculations.

A full working celestial mechanics system for pov can be found at:

http://www.digiquill.com/kwansys/povspace.html


-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Ben Birdsey
Subject: Re: My gravity calculations don't work... help!
Date: 5 May 1999 05:55:37
Message: <3730051A.79B3FD0F@unlgrad1.unl.edu>
I seem to have gotten the program working.  There was a problem with the size
of "GravConst" (i.e. = 6.670e0 instead of = 6.670e-11).  I also took the liberty
of changing the units that the data is stored in (all in AU's and years and
earth masses.  This is easier for us because that's what's in the tables, but
the computer has to convert).

	I don't know what problems you were experiencing, but at first, my mercury kept
breaking out of orbit!  I was trying to use an algorithm called "Velocity
Verlet" to integrate, but it was unstable at a time step of even 8 hours!  So, I
went back to your original method and it works.

	In Him,
	Ben


Post a reply to this message


Attachments:
Download 'gravity2.zip' (2 KB)

From: Greg M  Johnson
Subject: Re: My gravity calculations don't work... help!
Date: 5 May 1999 12:23:34
Message: <373061D8.6F884171@geocities.com>
Peter's algorithm states:
#declare NewVel[i] = OldVel[i] + Acceleration*Time;
#declare NewPos[i] = OldPos[i] + OldVel[i]*Time + 0.5*Acceleration*Time*Time;

I  think    d= d0  +vt + at^2  only applies in the case of constant acceleration!

I prefer:
#declare NewVel[i] =  OldVel[i] + Acceleration*Some_Constant;
#declare NewPos[i] =  OldPos[i]+NewVel[i]*Acceleration*Some_Other_Constant;

Also, I tend not to bother with the "time", as I run my particle systems inside a
#while
loop. It eliminates the need to write to a file for each frame. For example, in a 250
frame
animation, I say,

#while(Gregs_Frame_Increment < 250*clock+1)

Ben Birdsey wrote:

>         I seem to have gotten the program working.  There was a problem with the
size
> of "GravConst" (i.e. = 6.670e0 instead of = 6.670e-11).  I also took the liberty
> of changing the units that the data is stored in (all in AU's and years and
> earth masses.  This is easier for us because that's what's in the tables, but
> the computer has to convert).
>
>         I don't know what problems you were experiencing, but at first, my mercury
kept
> breaking out of orbit!  I was trying to use an algorithm called "Velocity
> Verlet" to integrate, but it was unstable at a time step of even 8 hours!  So, I
> went back to your original method and it works.
>
>         In Him,
>         Ben
>
>   ------------------------------------------------------------------------
>
>                       Name: gravity2.zip
>    gravity2.zip       Type: Zip Compressed Data (application/x-zip-compressed)
>                   Encoding: base64


Post a reply to this message

From: Albert Sacks
Subject: Texture Needed
Date: 5 May 1999 18:53:56
Message: <3730BDDB.BD906EBA@mindspring.com>
Does anyone have a great texture for starship hull plating? Especially

grittyness. My pathetic attempts all look weird. Please help.


Post a reply to this message

From: Ken
Subject: Re: Texture Needed
Date: 5 May 1999 19:02:16
Message: <3730BF5E.77EAF930@pacbell.net>
Albert Sacks wrote:
> 
> Does anyone have a great texture for starship hull plating? Especially

> grittyness. My pathetic attempts all look weird. Please help.

  Attached are a couple i have often thought would work well for
bump mapping the hull of a space bound ship. If you do a little
work colorizing them they might also be usefull tiled with a small
scale on the hull of a ship. I just never got around to trying them
but they are yours if you want them.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message


Attachments:
Download 'shiptex.gif' (6 KB) Download 'shptex.gif' (5 KB)

Preview of image 'shiptex.gif'
shiptex.gif

Preview of image 'shptex.gif'
shptex.gif


 

From: Ben Birdsey
Subject: Re: My gravity calculations don't work... help!
Date: 5 May 1999 19:15:03
Message: <3730C079.55B120C4@unlgrad1.unl.edu>
You're right, there are some very interesting issues here.  No way is it easy
to write something that looks good, and doesn't take FOREVER to get results. 
The way I see it there are at least three issues.

	1) You are right, if his variable "Time" was the total
           time, he would be in real trouble.

            The variable "Time" isn't the total time, it's the
            time between frames.  So, if this time is SMALL ENOUGH,
            the acceleration is pretty much constant, so the
            program IS right.  
	
           The real problem was with defining the units correctly.
           ( i.e. he had accidentally defined the gravitational to
             be WAY too strong )
	
        2) The other issue is the issue of realism. In a lot of
           particle simulations, you don't really care if the
           simulation cheats a bit on the physics.  You just
           want it to look GOOD.  But Peter wants to simulate
           something real, and something we all know.  So if he
           runs the simulation and Mercury falls into the Sun
           he's in trouble!

           That depends something called the "numerical stability"
           of the simulation program.  It depends a little bit on
           the exact method you use to estimate the new positions and
           new velocities, but it mostly depends on the amount of
           time between steps.

           In this case, I got pretty good results for 1 frame =
           3 days, or "clock_delta" = .01 which you get in a 100
           frame animation.

           One really cool way to check this out is to run the
           simulation forward 100 or 1000 steps and then run it
           backward by the same number of steps and see if you
           get your original data back.

        3) This is definitely not the most efficient way of doing 
           things! You could probably make something that looks pretty
           good without solving ANY differential equations.  The
           orbits of almost all the planets and moons in the
           Solar System are pretty circular, which means that they
           travel in circles about the body they orbit at a constant
           angular velocity {i.e. the earth has an angular velocity
           of about 1 degree/day = (360 degrees / 365.24 days) and the
           moon has an angular velocity of about 360/28 degree/day
           around the earth.}

           This method looks good, and is less prone to the
           difficulties listed in point 2.

           Actually computing the paths of the planets this way
           is really only good if you want to see the TINY effect
           that the Sun has on the orbit of the Moon, or the REALLY
           TINY effect that all the other planets have on the orbit
           of Mercury.

           With even 10 objects the rendering time is so much longer
           than the computation time that it just doesn't matter, but
           I wonder what happens when you start tossing in all those
           moons and a few asteroids ...


	This really is a cool topic.  Maybe we could start a thread on simulation
issues or something!

	Until that Day,
	Ben


Post a reply to this message

From: Rick (Kitty5)
Subject: Re: Texture Needed
Date: 5 May 1999 22:02:55
Message: <3730ea3f.0@news.povray.org>
Here you go, I have found this one very usefull, works well as a bump map as
well.

Rick
Albert Sacks <asa### [at] mindspringcom> wrote in message
news:3730BDDB.BD906EBA@mindspring.com...
>
>
> Does anyone have a great texture for starship hull plating? Especially

> grittyness. My pathetic attempts all look weird. Please help.
>


Post a reply to this message


Attachments:
Download 'GenericPanels.zip' (135 KB)

From: Ben Birdsey
Subject: Re: Texture Needed
Date: 5 May 1999 22:19:29
Message: <3730EBB3.705F119@unlgrad1.unl.edu>
You know, I can really appreciate this kind of "deck plating".  I think it's
the streaking and rust that makes it look so GOOD.  But then I ask myself "how
would a ship get that rusty in space, and why would it streak?"

	By the way, how'd you do it?

	Until that Day,
	Ben


Post a reply to this message

From: Ken
Subject: Re: Texture Needed
Date: 6 May 1999 01:04:23
Message: <3731143E.C6DE2305@pacbell.net>
Ben Birdsey wrote:
> 
>         You know, I can really appreciate this kind of "deck plating".  I think it's
> the streaking and rust that makes it look so GOOD.  But then I ask myself "how
> would a ship get that rusty in space, and why would it streak?"

  Well speaking of a purely hypothetical situation it might be possible that
the fuel used in the ship is one of the severe oxidizers like most of the
fuels used in the US space program. Additionally it is common, at least with
current technologies, for fuel systems to leak until a certain quantity of
fuel is loaded thus forcing the seals to seat which halts further leakage.
Until this happens the severe oxidizing agents are exersizing their unique
ability to create surface oxidation reduction reactions on the exposed metals
of the space vehicle accelerating the decay and shortening the life span of
of it's outer metallic surface.
  A severe oxidizing agent needs no atmosphere to create a reaction so this
explains the oxidizing even in a vacuum. The streaking is from where the
fuel is accelerated along the surface of the ship as it is docked to a
revolving space port and eventually boils off into space. But before this
happens it has already had time to inflict it's share of damage.
  This is all of course conjecture on my part and is not based on any first
hand observations. As soon as I do get the opportunity to make observations
of this type I will forward them to you in a timely manner with any comments
I think may offer you greater insight into this seemingly unsolvable mystery.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.