POV-Ray : Newsgroups : povray.binaries.images : placing books Server Time
18 Oct 2026 16:37:04 EDT (-0400)
  placing books (Message 1 to 18 of 18)  
From: JRG
Subject: placing books
Date: 9 Aug 2001 06:05:23
Message: <3b726063@news.povray.org>
I've just written a little macro to place books on a library (I needed it
for my irtc entry). The first queue uses a little amount of randomness, the
second one uses no randomness. Well, not much to say, I just liked the
effect and wanted to share it with POV community :).
(Oh, well, in my irtc entry I'm using books instead of 60ies coloured
superellipsoids...)

--
Jonathan.


Post a reply to this message


Attachments:
Download 'libri.jpg' (93 KB)

Preview of image 'libri.jpg'
libri.jpg


 

From: Bonsai
Subject: Re: placing books
Date: 9 Aug 2001 06:32:30
Message: <3b7266be@news.povray.org>
As I had my first look at it, it looked perfect. But as I had my second look
at it there were some books with strange or impossible positions. Please
have a look at the attached image. Maybe other values for seed will fix
this.

So long,

Bonsai


Post a reply to this message


Attachments:
Download 'errors.gif' (37 KB)

Preview of image 'errors.gif'
errors.gif


 

From: Lawrence Winstead
Subject: Re: placing books
Date: 9 Aug 2001 09:43:33
Message: <3B72937D.8CFC52BA@slpschools.org>
I really like the second queue.  I used to work at a library, and its almost a
perfect representation of how books slide down the shelf when there's nothing
to hold them together.  Very nice.
Also, I'm impressed with the beauty of radiosity and would love to see your
settings for this image.  Thanks in advance!
-Law

JRG wrote:

> I've just written a little macro to place books on a library (I needed it
> for my irtc entry). The first queue uses a little amount of randomness, the
> second one uses no randomness. Well, not much to say, I just liked the
> effect and wanted to share it with POV community :).
> (Oh, well, in my irtc entry I'm using books instead of 60ies coloured
> superellipsoids...)
>
> --
> Jonathan.
>
>  [Image]


Post a reply to this message

From: JRG
Subject: Re: placing books
Date: 9 Aug 2001 13:30:57
Message: <3b72c8d1@news.povray.org>
Off course the macro is not physically correct, only geometrically...
Anyway you can always set a lower maximum angle to avoid these situations
(or play with the random seed, as you suggested).
Cheers,
Jonathan.

"Bonsai" <bon### [at] b0n541net> ha scritto nel messaggio
news:3b7266be@news.povray.org...
> As I had my first look at it, it looked perfect. But as I had my second
look
> at it there were some books with strange or impossible positions. Please
> have a look at the attached image. Maybe other values for seed will fix
> this.
>
> So long,
>
> Bonsai
>
>
>


Post a reply to this message

From: JRG
Subject: Re: placing books
Date: 9 Aug 2001 13:36:53
Message: <3b72ca35@news.povray.org>
Thans Lawrence. Here are the settings (nothing extraordinary, pretty low
settings).

global_settings {
        ambient_light 0
        radiosity {
                pretrace_start 1
                pretrace_end 1
                recursion_limit 2
    count 80
    error_bound 0.2
    }
       ini_option "+qr"}

A white a plane and a white skysphere (something really abused... ;) )
Probably the scene would look the same even with lower settings (7 hours of
rendering with 1 ghz machine :(...).

Jonathan.


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: placing books
Date: 9 Aug 2001 14:12:44
Message: <3B72D294.A0E43AC8@ignorancia.org>
JRG escribió:
> Off course the macro is not physically correct, only geometrically...
> Anyway you can always set a lower maximum angle to avoid these situations
> (or play with the random seed, as you suggested).

  Hmmm.... "trace()" must help to do it more physically correct... still
don't know how, but I must try it (because my entry also must have
shelves with books...;)

-- 
Jaime Vives Piqueres

La Persistencia de la Ignorancia
http://www.ignorancia.org/


Post a reply to this message

From: JRG
Subject: Re: placing books
Date: 9 Aug 2001 14:42:51
Message: <3b72d9ab@news.povray.org>
Jaime Vives Piqueres  ha scritto

>   Hmmm.... "trace()" must help to do it more physically correct... still
> don't know how, but I must try it (because my entry also must have
> shelves with books...;)
>

Well, this macro worked for me, and it looks quite physically realistic.


Post a reply to this message


Attachments:
Download 'library.jpg' (35 KB)

Preview of image 'library.jpg'
library.jpg


 

From: Rick [Kitty5]
Subject: Re: placing books
Date: 9 Aug 2001 21:14:45
Message: <3b733585@news.povray.org>
> >   Hmmm.... "trace()" must help to do it more physically correct... still
> > don't know how, but I must try it (because my entry also must have
> > shelves with books...;)
> >
>
> Well, this macro worked for me, and it looks quite physically realistic.

as long as you ignore the bottom 3 rows..


--
Rick

Kitty5 WebDesign - http://Kitty5.com
Hi-Impact database driven web site design & e-commerce
TEL : +44 (01625) 266358 - FAX : +44 (01625) 611913 - ICQ : 15776037
POV-Ray News & Resources - http://Povray.co.uk

PGP Public Key
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x231E1CEA


Post a reply to this message

From: Markus Becker
Subject: Re: placing books
Date: 10 Aug 2001 04:06:33
Message: <3B739625.B3BE1F88@aicoss.de>
"Rick [Kitty5]" wrote:
> 
> > Well, this macro worked for me, and it looks quite physically realistic.
> 
> as long as you ignore the bottom 3 rows..

Or the top 3 rows, for that matter. All "wrong" ;-)

Markus


Post a reply to this message

From: Peter Hertel
Subject: Re: placing books
Date: 10 Aug 2001 13:08:26
Message: <3b74150a@news.povray.org>
> I've just written a little macro to place books on a library (I needed it
> for my irtc entry). The first queue uses a little amount of randomness,
the
> second one uses no randomness. Well, not much to say, I just liked the
> effect and wanted to share it with POV community :).
> (Oh, well, in my irtc entry I'm using books instead of 60ies coloured
> superellipsoids...)
>

I've always wondered how you do things like that :-)
Is it something like
bookrotation = lastbookrotation*(some strange formula) ?

Peter
http://hertel.no/peter


Post a reply to this message

From: Gilles Tran
Subject: Re: placing books
Date: 11 Aug 2001 05:07:26
Message: <3B74F5B0.BE41BBAC@inapg.inra.fr>
JRG wrote:

> Well, this macro worked for me, and it looks quite physically realistic.

You could try having a look at mine, to see how they compare.
http://www.oyonale.com/ressources/english/sources07.htm

G.


--

**********************
http://www.oyonale.com
**********************
Graphic experiments
Pov-ray gallery


Post a reply to this message

From: JRG
Subject: Re: placing books
Date: 11 Aug 2001 08:45:57
Message: <3b752905@news.povray.org>
No strange formula. Just a bit of trig. The right formulae much depend on
your approach to the problem. My macro begins from a rotation value which
depens on the book position in the shelf (the books on the right are more
tilted) and on a random amount. Then it finds the distance of the book from
the previous one. Which is of course based on the rotation of the last book,
but also on the sizes of the two books (which could be different). So you
have to split your macro in several cases, because the formulae can be very
different.
For istance, suppose that the new rotation value is greater than the
previous one (a very common situation) and that the two books have such a
size that the second one leans against the previous one (and not viceversa).
If you indicate dist=(x coordinate of the point of contact between the
previous book and the *floor*) then you have to translate the second book to
dist+x_size_of_last_book/sin(radians(last_book_rotation))+y_size_of_new_book
*sin(radians(last_book_rotation-new_book_rotation))/sin(radians(last_book_ro
tation)) along the X axis. Just make a sketch on a sheet and you'll see
that.

--
Jonathan.

"Peter Hertel" <NOS### [at] hertelno> ha scritto nel messaggio
news:3b74150a@news.povray.org...
> > I've just written a little macro to place books on a library (I needed
it
> > for my irtc entry). The first queue uses a little amount of randomness,
> the
> > second one uses no randomness. Well, not much to say, I just liked the
> > effect and wanted to share it with POV community :).
> > (Oh, well, in my irtc entry I'm using books instead of 60ies coloured
> > superellipsoids...)
> >
>
> I've always wondered how you do things like that :-)
> Is it something like
> bookrotation = lastbookrotation*(some strange formula) ?
>
> Peter
> http://hertel.no/peter
>
>


Post a reply to this message

From: JRG
Subject: Re: placing books
Date: 11 Aug 2001 08:46:00
Message: <3b752908@news.povray.org>
Oh, well, yours is far more complete! My 20 lines macro can't compete.
Surely the math involved is the same (I can't understand why people are
frightened by the simplest trig formulae). Here trace() cannot be handy,
because there's no problem about overlapping. BTW, if the angle of a book is
forced to be greater than the previous one, then you get a boring but
physically correct result (just like the queue with no randomness in my
image).

Jonathan.

"Gilles Tran" <tra### [at] inapginrafr> ha scritto nel messaggio
news:3B74F5B0.BE41BBAC@inapg.inra.fr...
> JRG wrote:
>
> > Well, this macro worked for me, and it looks quite physically realistic.
>
> You could try having a look at mine, to see how they compare.
> http://www.oyonale.com/ressources/english/sources07.htm
>
> G.
>
>
> --
>
> **********************
> http://www.oyonale.com
> **********************
> Graphic experiments
> Pov-ray gallery
>
>


Post a reply to this message

From: Gilles Tran
Subject: Re: placing books
Date: 11 Aug 2001 09:53:07
Message: <3B7538A6.539900A6@inapg.inra.fr>
JRG wrote:

> Surely the math involved is the same (I can't understand why people are
> frightened by the simplest trig formulae).

Must be the same, since both show the same problem, i.e. books standing more or
less upright when they should be sliding. I guess that a complete book macro
would have to take into account factors like mass or friction, and I agree that
trace() doesn't give a solution. But overall, it looks nice enough to be useful.

G.


--

**********************
http://www.oyonale.com
**********************
Graphic experiments
Pov-ray gallery


Post a reply to this message

From: Peter Hertel
Subject: Re: placing books
Date: 11 Aug 2001 19:11:40
Message: <3b75bbac@news.povray.org>
Hmm.. figured it out to be something like that. I'll taka a look at it
someday. I guess it uses a reqursive macro, which I honestlty don't
understand, but I'll take a look at that someday, aswell :-)
Thanks a lot for enligtening me!
Great picture btw! I like the pretty colors.. oooh :)

-Peter

> No strange formula. Just a bit of trig. The right formulae much depend on
> your approach to the problem. My macro begins from a rotation value which
> depens on the book position in the shelf (the books on the right are more
> tilted) and on a random amount. Then it finds the distance of the book
from
> the previous one. Which is of course based on the rotation of the last
book,
> but also on the sizes of the two books (which could be different). So you
> have to split your macro in several cases, because the formulae can be
very
> different.
> For istance, suppose that the new rotation value is greater than the
> previous one (a very common situation) and that the two books have such a
> size that the second one leans against the previous one (and not
viceversa).
> If you indicate dist=(x coordinate of the point of contact between the
> previous book and the *floor*) then you have to translate the second book
to
>
dist+x_size_of_last_book/sin(radians(last_book_rotation))+y_size_of_new_book
>
*sin(radians(last_book_rotation-new_book_rotation))/sin(radians(last_book_ro
> tation)) along the X axis. Just make a sketch on a sheet and you'll see
> that.


Post a reply to this message

From: David Fontaine
Subject: Re: placing books
Date: 11 Aug 2001 23:05:29
Message: <3B75F032.30266CDE@faricy.net>
JRG wrote:
> 
> I can't understand why people are frightened by the simplest trig formulae

Could it have to do with their having been exposed to trig through the
wonderous public education system?

-- 
David Fontaine  <dav### [at] faricynet>  ICQ 55354965
My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: placing books
Date: 12 Aug 2001 04:33:11
Message: <3B763F40.F0EACEFF@ignorancia.org>
David Fontaine escribió:
> Could it have to do with their having been exposed to trig through the
> wonderous public education system?

  Mostly... I wonder how I hated maths at school. Now I understand that
what I hated was the system, no the things I was learning. 

  I also think that now maths can be learned in a less "abstract" way: I
myself know some teachers who use pov to graphically show maths to kids,
and they said it works pretty well to have them interested.

-- 
Jaime Vives Piqueres

La Persistencia de la Ignorancia
http://www.ignorancia.org/


Post a reply to this message

From: ingo
Subject: Re: placing books
Date: 12 Aug 2001 04:55:10
Message: <Xns90FB6F14C7F7Bseed7@povray.org>
in news:3B763F40.F0EACEFF@ignorancia.org Jaime Vives Piqueres wrote:

>   I also think that now maths can be learned in a less "abstract"
>   way: I 
> myself know some teachers who use pov to graphically show maths to
> kids, and they said it works pretty well to have them interested.
> 

http://www.inetarena.com/~pdx4d/ocn/numeracy0.html
uses POV-Ray and Python to teach math.

Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

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