|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |