POV-Ray : Newsgroups : povray.binaries.animations : Towers of Hanoi ( 256 KB mpg ) Server Time
19 Jul 2024 11:33:52 EDT (-0400)
  Towers of Hanoi ( 256 KB mpg ) (Message 1 to 10 of 10)  
From: Rune
Subject: Towers of Hanoi ( 256 KB mpg )
Date: 2 Nov 2002 21:02:27
Message: <3dc483b3@news.povray.org>
The Tower of Hanoi puzzle was invented by the French mathematician
Edouard Lucas in 1883. We are given a tower of N discs, initially
stacked in decreasing size on the left peg. The objective is to transfer
the entire tower to the right peg, moving only one disk at a time and
never a larger one onto a smaller.

I found a lot of applets on the net simulating this puzzle, but none of
them showed the discs actually moving, so I thought I'd make an
animation where you can actually see the discs moving from peg to peg.
:)

I've heard that this puzzle has been implemented in just about every
programming language, since it's a classical example of a problem with a
simple recursive solution. Is it the first time it has been made in
POV-Ray?

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated Oct 19)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message


Attachments:
Download 'hanoi.mpg' (257 KB)

From:
Subject: Re: Towers of Hanoi ( 256 KB mpg )
Date: 3 Nov 2002 02:59:42
Message: <3dc4d76e@news.povray.org>
Really??? I was told that it was a puzzle that was done by some monks...
when they would transfer all the tower to the other peg, the end of the
world would come... of course it was with many rings, so even if they tried
to move each peg every second, they would finish in a quadrillion putrillion
gazillion years :)

Now, about your animation, I liked it very much!

Fernando.



news:3dc483b3@news.povray.org...
> The Tower of Hanoi puzzle was invented by the French mathematician
> Edouard Lucas in 1883. We are given a tower of N discs, initially
> stacked in decreasing size on the left peg. The objective is to transfer
> the entire tower to the right peg, moving only one disk at a time and
> never a larger one onto a smaller.
>
> I found a lot of applets on the net simulating this puzzle, but none of
> them showed the discs actually moving, so I thought I'd make an
> animation where you can actually see the discs moving from peg to peg.
> :)
>
> I've heard that this puzzle has been implemented in just about every
> programming language, since it's a classical example of a problem with a
> simple recursive solution. Is it the first time it has been made in
> POV-Ray?
>
> Rune
> --
> 3D images and anims, include files, tutorials and more:
> rune|vision:  http://runevision.com (updated Oct 19)
> POV-Ray Ring: http://webring.povray.co.uk
>
>
>


Post a reply to this message

From: Rune
Subject: Re: Towers of Hanoi ( 256 KB mpg )
Date: 3 Nov 2002 11:45:57
Message: <3dc552c5$1@news.povray.org>

> Really??? I was told that it was a puzzle that was
> done by some monks... when they would transfer all
> the tower to the other peg, the end of the world
> would come...

Yeah, I heard that version too.

> of course it was with many rings, so even if they
> tried to move each peg every second, they would
> finish in a quadrillion putrillion gazillion years :)

I think it was 64 discs, so that's 2^64-1 moves, which would be about
584558050400 years if a disc is moved every second. :)

> Now, about your animation, I liked it very much!

Thank you. :)

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated Oct 19)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Timothy R  Cook
Subject: Re: Towers of Hanoi ( 256 KB mpg )
Date: 3 Nov 2002 13:08:55
Message: <3dc56637$1@news.povray.org>
Rune wrote:
> I think it was 64 discs, so that's 2^64-1 moves, which would be about
> 584558050400 years if a disc is moved every second. :)



"Computer chess?  Forget it.  Since a chess player has about 30 moves to
choose from on each turn, and his opponent has about 30 possible answers
to each of these 30 moves, there are roughly 1,000 variations to just
one complete move.  Each of these complete moves allows another 1,000
potential moves, and so on.  Thus, a computer would have to consider
about 10+E75 (1 and 75 zeroes) moves to determine the outcome of a short
25-move game.  Even if the computer could calculate a million moves each
second--far more than is now feasible--it would require 10+E89 seconds
to complete the calculations for the game.
   How long is that?  Well, since the beginning of our solar system, 4.5
billion years ago, only 10+E18 seconds have elapsed."

Earth Simulator does, what, 40 TFLOPS/peak?  Compared to the 1 MFLOPS
proposed by the book...
...besides, chess programs don't work by calculating every single move.

-- 
Tim Cook
http://empyrean.scifi-fantasy.com
mirror: http://personal.lig.bellsouth.net/lig/z/9/z993126

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Tim Nikias
Subject: Re: Towers of Hanoi ( 256 KB mpg )
Date: 3 Nov 2002 16:08:38
Message: <3dc59056@news.povray.org>
This looks nice. You should work a little on the lighting
(making it smoother and more realistic),
and in the final move, rotate the camera by 180 degrees,
and watch the lighting etc to make the animation
looping...

Regards,
Tim

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message

From: Apache
Subject: Re: Towers of Hanoi ( 256 KB mpg )
Date: 5 Nov 2002 14:10:07
Message: <web.3dc816d985e8e5cac98a52100@news.povray.org>
RADIOSITY!! RADIOSITY!! RADIOSITY!!

Tim Nikias wrote:
>This looks nice. You should work a little on the lighting
>(making it smoother and more realistic),
>and in the final move, rotate the camera by 180 degrees,
>and watch the lighting etc to make the animation
>looping...
>
>Regards,
>Tim
>
>--
>Tim Nikias
>Homepage: http://www.digitaltwilight.de/no_lights/index.html
>Email: Tim### [at] gmxde
>


Post a reply to this message

From: Rune
Subject: Re: Towers of Hanoi ( 256 KB mpg )
Date: 5 Nov 2002 15:28:50
Message: <3dc82a02@news.povray.org>
Tim Nikias wrote:
> This looks nice. You should work a little on
> the lighting (making it smoother and more
> realistic), and in the final move, rotate the
> camera by 180 degrees, and watch the lighting
> etc to make the animation looping...

Thanks for the suggestions, but I don't really think this animation is
worth investing a lot more time in. Just a small test. :)

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated Oct 19)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: James N Foster III
Subject: Re: Towers of Hanoi ( 256 KB mpg )
Date: 6 Nov 2002 11:54:07
Message: <3DC94932.3060208@hotmail.com>
Just So everybody can enjoy my "When I was young we didn't have graphic 
engines...

My first graphics assignment in College was to do a towers of Hanoi 
animation. We didn't have pixel graphics, I had to do it using ascii 
characters, screen clears, and character writes from arrays. Did it in 
Pascal on a VMS System.

But Rune, mine did have better radiosity then yours. JUST KIDDING. I 
think your animation is great.

James


Post a reply to this message

From: Fidel viegas
Subject: Re: Towers of Hanoi ( 256 KB mpg )
Date: 7 Nov 2002 08:38:07
Message: <B9F01C14.6600%fidel.viegas@artrecognition.co.uk>
in article 3DC### [at] hotmailcom, James N Foster III at
myd### [at] hotmailcom wrote on 6/11/02 4:54 pm:

> Just So everybody can enjoy my "When I was young we didn't have graphic
> engines...
> 
> My first graphics assignment in College was to do a towers of Hanoi
> animation. We didn't have pixel graphics, I had to do it using ascii
> characters, screen clears, and character writes from arrays. Did it in
> Pascal on a VMS System.

Thank God technology has improved. I did mine in C.


All the best

Fidel.


Post a reply to this message

From: Freddy D 
Subject: Re: Towers of Hanoi ( 272 KB DivX4 )
Date: 10 Nov 2002 08:03:48
Message: <3dce5934@news.povray.org>
Hi all..

Well.. Thanks Rune : you just reminded me that i've done something in
early 1997..

Not so well finished (i'm not good at that..), as i was interested in
animation mechanism.

Technical stuff :
- just 8 hours on a p3-450 (need to do the screen pics first.)
- files was converted for pov 3.5, with little change in
shape/light/position
- as i said, textures are "fabulous"... :)
- no radiosity (i tried, but too many artifacts, and _way_ slow)

Full anim can be found here (warning : 5.2Mb !)
http://www.profd.com/rt-site/pictures/Animation1-2.avi

(if wmp doesn't launch automaticaly, open it and paste the link in the
open box..
you know it.. :))

Join is a first 40 pics sample anim of this 1084 pics animation..

Comments welcome (do i have to continue with that, 5 years later ?.. or
should i
keep that on cd and forget it ?.. :))

Thanks to read..
--
FD
Mode { NOSPAM } = On ;


Post a reply to this message


Attachments:
Download 'sample.avi.dat' (272 KB)

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