POV-Ray : Newsgroups : povray.binaries.images : Placing books with trace() (36Kb) Server Time
18 Aug 2024 00:23:11 EDT (-0400)
  Placing books with trace() (36Kb) (Message 1 to 5 of 5)  
From: Jaime Vives Piqueres
Subject: Placing books with trace() (36Kb)
Date: 13 Aug 2001 06:36:57
Message: <3B77ADBF.10900CF9@ignorancia.org>
Well, perhaps it's not worth to use trace() for that purpose, but
the result is not too slow on parsing times, and gives at least less
"not physically correct" situations. It is a very rough macro still, and
needs some refining and to add some features, but for now it works
decently for my current entry. It works like the manual process: each
book is first put in place, and then rotated in a loop with trace()
until it hits the preceding book. No conscious use of trig... just used
vrotate() and rand() :)

 The attached pic is the first test scene.

-- 
Jaime Vives Piqueres

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


Post a reply to this message


Attachments:
Download 'books.jpg' (36 KB)

Preview of image 'books.jpg'
books.jpg


 

From: JRG
Subject: Re: Placing books with trace() (36Kb)
Date: 13 Aug 2001 08:12:48
Message: <3b77c440@news.povray.org>
Nice, but it's just the same thing that mine and Gilles' macro do with trig.
Even if it looks so, it would be really physically correct if you considered
the weight of the books and the friction between book and book, and book and
ground. Your macro checks if a book touches another one, but cannot say if
the weight of that book makes the previous book fall or not. The physics
formulae to be used here are quite simple, but I really don't have such
programming skill to turn them into a macro. In your macro, for example, I
guess a random position is chosen, then the book is rotated until it touches
the previous one. At this point, a physically correct macro, should check if
that configuration is possible, i.e. if the book is balanced. If not, the
macro should try with another random position (or maybe with very little
translations). The problem here is that the balancing of the book depends on
the following books also, so that building a whole balanced shelf would
require a lot of parsing time, which for these porpouses is not worth it
(IMHO).
BTW, your approach to the problem is quite clever. After all you managed to
avoid all that trig formulae ;-) .
Can't wait to see your entry.

--
Jonathan.


Post a reply to this message

From: Bob H 
Subject: Re: Placing books with trace() (36Kb)
Date: 13 Aug 2001 09:22:41
Message: <3b77d4a1@news.povray.org>
Whether it's coincidence or not they look very balanced out to me in this
rendering anyway.  I try to keep my books in good order without gaps but the
times they are spaced apart and leaning they wouldn't be modeled so well
even with those extra things mentioned.  Another factor for skew, in at
least two axes, would need to be applied.

Bob H.


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Placing books with trace() (36Kb)
Date: 13 Aug 2001 15:07:24
Message: <3B782566.F839E627@ignorancia.org>
JRG wrote:

> Nice, but it's just the same thing that mine and Gilles' macro do with trig.

  Not 100% the same. What I tried to avoid are the "caught in fall"
books that the trig method gives, without having to use low randomness.
Although this situation is possible, it's rare, and so it looks unreal.

> Even if it looks so, it would be really physically correct if you considered
> the weight of the books and the friction between book and book, and book and
> ground. Your macro checks if a book touches another one, but cannot say if
> the weight of that book makes the previous book fall or not. [...]

  Well, that macro does not intend to be a correct simulation, only a
tricky one. I used the size of the book as indicator of the book weight
(usually that's true, bcos all books are composed by paper), for the
probability of the book to stand up. I'm working now on taking it into
account also to slide the books proportionally, and to manage other
situations.

> BTW, your approach to the problem is quite clever. After all you managed to
> avoid all that trig formulae ;-) .

  Yes! ...but because I don't know how to do it with trig. :( My method
involves surely more work, but that's the typical character of the "lazy
ignorant" I am. 

> Can't wait to see your entry.

  My entry is too worked now to abandone it, so I will enter it for
sure. Your scene seemed also enough worked to finish it in time. Too
busy for the rest of the month? Or perhaps some vacations?

-- 
Jaime Vives Piqueres

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


Post a reply to this message

From: JRG
Subject: Re: Placing books with trace() (36Kb)
Date: 13 Aug 2001 17:13:20
Message: <3b7842f0$1@news.povray.org>
"Jaime Vives Piqueres" <jai### [at] ignoranciaorg> ha scritto nel messaggio
news:3B782566.F839E627@ignorancia.org...
> JRG wrote:
>   My entry is too worked now to abandone it, so I will enter it for
> sure. Your scene seemed also enough worked to finish it in time. Too
> busy for the rest of the month? Or perhaps some vacations?

Definitely. I'm really tired. Have to study hard until August and now I
really need a rest... :)

Jonathan.


Post a reply to this message

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