POV-Ray : Newsgroups : povray.binaries.animations : N-body galaxy (~650 Kb bu) Server Time
19 Jul 2024 17:19:33 EDT (-0400)
  N-body galaxy (~650 Kb bu) (Message 1 to 9 of 9)  
From: James Taylor
Subject: N-body galaxy (~650 Kb bu)
Date: 19 May 2002 17:16:59
Message: <3ce8164b@news.povray.org>
Hi all,

I came across some n-body code in a textbook which calculates the
interaction between a target galaxy, blue centre with red 'stars', and a
closely passing intruder galaxy, green centre (with stars coming in version
2...)
I coded the thing into pov sdl and here's one of the nicer examples...the
formation of spiral arms etc.
The time scale for this anim is 3.2 billion years

thanks
jim


Post a reply to this message


Attachments:
Download 'top.mpg' (650 KB)

From: Alastair Murray
Subject: Re: N-body galaxy (~650 Kb bu)
Date: 19 May 2002 18:15:30
Message: <3ce82402$1@news.povray.org>
I've actually just watched this over and over, it's beautiful.  Maybe even
inspired me to do something similar of my own, you know of any web sites
that may be useful for helping me?


"James Taylor" <jim### [at] blueyondercouk> wrote in message
news:3ce8164b@news.povray.org...
> Hi all,
>
> I came across some n-body code in a textbook which calculates the
> interaction between a target galaxy, blue centre with red 'stars', and a
> closely passing intruder galaxy, green centre (with stars coming in
version
> 2...)
> I coded the thing into pov sdl and here's one of the nicer examples...the
> formation of spiral arms etc.
> The time scale for this anim is 3.2 billion years
>
> thanks
> jim
>
>
>


Post a reply to this message

From: James Taylor
Subject: Re: N-body galaxy (~650 Kb bu)
Date: 19 May 2002 20:06:49
Message: <3ce83e19@news.povray.org>
"Alastair Murray" <ala### [at] hotmailcom> wrote in message
news:3ce82402$1@news.povray.org...
> I've actually just watched this over and over, it's beautiful.

Thanks :)

>  Maybe even
> inspired me to do something similar of my own, you know of any web sites
> that may be useful for helping me?

The code is pretty much straight-out-of-the-box from an astrophysics
textbook, so without studying it a little further I'm pretty much in the
dark on how it works.
Here's a link to the authors website
http://astrophysics.weber.edu/Default.htm where you can find the code
"galaxy.bas" upon which this version is based. If you don't have a basic
complier I can send you the executable (assuming your running Windows).

jim


Post a reply to this message

From: Slime
Subject: Re: N-body galaxy (~650 Kb bu)
Date: 20 May 2002 02:16:54
Message: <3ce894d6@news.povray.org>
Excellent. I'd be interested in seeing the next version from a different
angle (not directly overhead), maybe even with the camera rotating around
(rotation being in a different plane than the galaxy's plane).

It'd also be sweet if you used media instead of spheres, though i know that
would take forever to render =)

Why is it that the very inner ring of spheres pulse in and out?

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Rune
Subject: Re: N-body galaxy (~650 Kb bu)
Date: 20 May 2002 04:53:10
Message: <3ce8b976@news.povray.org>
Slime wrote:
> Excellent. I'd be interested in seeing the next
> version from a different angle (not directly overhead),

Me too!

> It'd also be sweet if you used media instead of spheres,
> though i know that would take forever to render =)

How about textured discs or something like that? :D

> Why is it that the very inner ring of spheres pulse
> in and out?

I think: All the particles travel more or less in elliptical curves with
the center as the one focal point. That means that the distance from a
particle to the center goes up and down all the time. The funny thing
about the inner ring of particles is that they are somehow synchronized
so that the distance goes up and down at the same time for all those
particles. :)

Very nice anim by the way!

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:  http://rsj.mobilixnet.dk (updated Apr 14)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Ring:  http://webring.povray.co.uk


Post a reply to this message

From: James Taylor
Subject: Re: N-body galaxy (~650 Kb bu)
Date: 20 May 2002 06:33:55
Message: <3ce8d113@news.povray.org>
"Slime" <slm### [at] slimelandcom> wrote in message
news:3ce894d6@news.povray.org...
> Excellent.

Thanks Slime

>I'd be interested in seeing the next version from a different
> angle (not directly overhead), maybe even with the camera rotating around
> (rotation being in a different plane than the galaxy's plane).

You'll have to wait a while - I take my finals at uni this week and then I'm
going on holiday (waahoo!)

> It'd also be sweet if you used media instead of spheres, though i know
that
> would take forever to render =)

I've thought abpout that, I think it will come when the codes finished

> Why is it that the very inner ring of spheres pulse in and out?

The galaxies are treated as point masses and the stars have no explicit mass
of their own. The force calculated is just a simple 1/r^2 and if the stars
get too close the code 'pushes' them out a little hence the oscillation. In
the code there is a softening factor, which essentially states how close any
two particles can go. The problem is small values give more accurate results
but give a more pronounced oscillation, while large values gives less
accuracy and less oscillation.

jim


Post a reply to this message

From: Josef Schmid
Subject: Re: N-body galaxy (~650 Kb bu)
Date: 20 May 2002 08:56:32
Message: <3ce8f280@news.povray.org>
Hi James!

Nice animation!
Do you know http://www.mars3d.co.uk?
The Gravity3D Viewer on this hp looks
pretty much like your animation.
Unfortunately it is not coded in PoV.

bye
jsj


James Taylor <jim### [at] blueyondercouk> schrieb in im Newsbeitrag:
3ce8164b@news.povray.org...
> Hi all,
>
> I came across some n-body code in a textbook which calculates the
> interaction between a target galaxy, blue centre with red 'stars', and a
> closely passing intruder galaxy, green centre (with stars coming in
version
> 2...)
> I coded the thing into pov sdl and here's one of the nicer examples...the
> formation of spiral arms etc.
> The time scale for this anim is 3.2 billion years
>
> thanks
> jim
>
>
>


Post a reply to this message

From: Alastair Murray
Subject: Re: N-body galaxy (~650 Kb bu)
Date: 20 May 2002 14:01:14
Message: <3ce939ea$1@news.povray.org>
I have QBASIC, the codes running fine (interpreted, not compiled btw).
Pretty neat really.

Thanks alot.


"James Taylor" <jim### [at] blueyondercouk> wrote in message
news:3ce83e19@news.povray.org...
>
> "Alastair Murray" <ala### [at] hotmailcom> wrote in message
> news:3ce82402$1@news.povray.org...
> > I've actually just watched this over and over, it's beautiful.
>
> Thanks :)
>
> >  Maybe even
> > inspired me to do something similar of my own, you know of any web sites
> > that may be useful for helping me?
>
> The code is pretty much straight-out-of-the-box from an astrophysics
> textbook, so without studying it a little further I'm pretty much in the
> dark on how it works.
> Here's a link to the authors website
> http://astrophysics.weber.edu/Default.htm where you can find the code
> "galaxy.bas" upon which this version is based. If you don't have a basic
> complier I can send you the executable (assuming your running Windows).
>
> jim
>
>


Post a reply to this message

From: James Taylor
Subject: Re: N-body galaxy (~650 Kb bu)
Date: 20 May 2002 14:22:35
Message: <3ce93eeb$1@news.povray.org>
"Alastair Murray" <ala### [at] hotmailcom> wrote in message
news:3ce939ea$1@news.povray.org...
> I have QBASIC, the codes running fine (interpreted, not compiled btw).
> Pretty neat really.
>
> Thanks alot.
>
Here's the parameters I used for the anim:
rings = 10
stars = 50
mass = 0.25
position = 30,-30,0
velocity = 0,0.34,0.34
timesteps = 2700

catch ya later
jim


Post a reply to this message

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