POV-Ray : Newsgroups : povray.off-topic : Still random Server Time
4 Nov 2024 22:22:03 EST (-0500)
  Still random (Message 1 to 10 of 50)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Invisible
Subject: Still random
Date: 7 May 2009 04:16:58
Message: <4a0298fa$1@news.povray.org>
...but entirely deterministic! ;-)

OK, so check this craziness out:

http://www.youtube.com/watch?v=duy8s8C7-Uc
http://www.youtube.com/watch?v=58_s6r7PaKo

Each video is approximately 5 hours of computer time. And trust me, when 
you watch this full-screen in high resolution, it looks insane! :-D 
Pitty YouTube doesn't permit such things. (The file I uploaded was about 
35MB, encoded with "H.264". I might put it online somewhere else for you 
folks to enjoy...)

So, let me know what you think. :-D

PS. I still need to fix the rendering program. I wrote it while at work, 
and it worked OK, but was rather inflexible and brittle. So when I got 
home, I wrote it again. But for some reason, the version I wrote at home 
is about 10x slower - and I can't figure out why! o_O


Post a reply to this message

From: scott
Subject: Re: Still random
Date: 7 May 2009 05:04:12
Message: <4a02a40c@news.povray.org>
> http://www.youtube.com/watch?v=duy8s8C7-Uc
> http://www.youtube.com/watch?v=58_s6r7PaKo

Very nice.

> Each video is approximately 5 hours of computer time.

You're just begging me to try and write a GPU version that runs at 100fps 
aren't you :-)


Post a reply to this message

From: Warp
Subject: Re: Still random
Date: 7 May 2009 05:06:35
Message: <4a02a49b@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> Each video is approximately 5 hours of computer time.

  I wonder how much faster it would be if it was properly implemented in
a *real* programming language... ;)

-- 
                                                          - Warp


Post a reply to this message

From: Invisible
Subject: Re: Still random
Date: 7 May 2009 05:23:05
Message: <4a02a879$1@news.povray.org>
scott wrote:
>> http://www.youtube.com/watch?v=duy8s8C7-Uc
>> http://www.youtube.com/watch?v=58_s6r7PaKo
> 
> Very nice.

Thanks.

YouTube hardly does it justice, but you can see what I mean about the 
way it moves, eh?

>> Each video is approximately 5 hours of computer time.
> 
> You're just begging me to try and write a GPU version that runs at 
> 100fps aren't you :-)

If you think you can do adaptive RK4 numerical integration of a few 
thousand particles at realtime speeds, be my freakin' guest! ;-)


Post a reply to this message

From: Invisible
Subject: Re: Still random
Date: 7 May 2009 05:23:56
Message: <4a02a8ac$1@news.povray.org>
Warp wrote:

>   I wonder how much faster it would be if it was properly implemented in
> a *real* programming language... ;)

Is that a challenge? :-P

Do you know how to numerically integrate a physical simulation? ;-)

You're welcome to try if you like...



You're not totally wrong though: When I initially implemented this, I 
discovered, to my astonishment, that converting the state of the system 
into an image took vastly longer than all that complicated Runge-Kutta 
numerical integration stuff. Which, obviously, is absurd.

On closer investigation, the program was spending 80% of its time in one 
function: floor. Looking at the source code, I discovered that floor is 
implemented by converting a floating-point double into an 
infinite-precision rational and then converting that into an integer. 
Like, WTF?

It seems that while *most* numeric operations are very fast, one or two 
of the more unusual ones are jaw-droppingly slow.

Anyway, I replaced floor with a direct call to the compiler's low-level 
internals library and now converting to an image is near instantaneous. 
(Like you'd expect!) It takes longer to suck the data off disk than to 
process it.

Now if I could just find a way to make the integration go faster... ;-)


Post a reply to this message

From: Invisible
Subject: Re: Still random
Date: 7 May 2009 05:44:46
Message: <4a02ad8e$1@news.povray.org>
http://blog.orphi.me.uk/archives/365

Some more background for any interested souls.


Post a reply to this message

From: scott
Subject: Re: Still random
Date: 7 May 2009 06:11:28
Message: <4a02b3d0$1@news.povray.org>
>>> Each video is approximately 5 hours of computer time.
>>
>> You're just begging me to try and write a GPU version that runs at 100fps 
>> aren't you :-)
>
> If you think you can do adaptive RK4 numerical integration of a few 
> thousand particles at realtime speeds, be my freakin' guest! ;-)

I wonder how fast it would be in C++ :-)

Are the three attractors just applying a 1/r^2 force on each particle?

What resolution are you running this at?  "a few thousand" sounds like 64x64 
or something.

When I get time I will give it a shot, but it might not be a while I'm 
preparing today and tomorrow for two weeks of business travel.


Post a reply to this message

From: Invisible
Subject: Re: Still random
Date: 7 May 2009 06:40:43
Message: <4a02baab$1@news.povray.org>
>> If you think you can do adaptive RK4 numerical integration of a few 
>> thousand particles at realtime speeds, be my freakin' guest! ;-)
> 
> I wonder how fast it would be in C++ :-)

Go ahead, knock yourself out. ;-)

> Are the three attractors just applying a 1/r^2 force on each particle?

Nope. Currently just 1/r for the "magnets", plus an r force for "gravity".

> What resolution are you running this at?  "a few thousand" sounds like 
> 64x64 or something.

It's 1,728 x 972 pixels. (And one particle per pixel, obviously.)

I *said* YouTube doesn't do it justice. ;-)

> When I get time I will give it a shot, but it might not be a while I'm 
> preparing today and tomorrow for two weeks of business travel.

Yeah, sure, whatever. It's pretty fun stuff to play with though...


Post a reply to this message

From: scott
Subject: Re: Still random
Date: 7 May 2009 06:54:11
Message: <4a02bdd3$1@news.povray.org>
>> What resolution are you running this at?  "a few thousand" sounds like 
>> 64x64 or something.
>
> It's 1,728 x 972 pixels. (And one particle per pixel, obviously.)

Ah ok, so "a few" means "over 1600" :-)

> I *said* YouTube doesn't do it justice. ;-)

I can well imagine.

> Yeah, sure, whatever. It's pretty fun stuff to play with though...

Also I can imagine, this is the sort of stuff I like playing about with too. 
I wonder if the plane seat will have a power socket for my laptop ... hmmmm.


Post a reply to this message

From: St 
Subject: Re: Still random
Date: 7 May 2009 07:47:41
Message: <4a02ca5d$1@news.povray.org>
That is brilliant!  Well done you. :)

  Add this to the end of the URL:  &fmt=22

    Not only hi-res, but bigger too...   ;)


     ~Steve~


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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