POV-Ray : Newsgroups : povray.binaries.scene-files : Looking for an Open Book Server Time
3 Sep 2024 00:20:51 EDT (-0400)
  Looking for an Open Book (Message 1 to 2 of 2)  
From: Guido
Subject: Looking for an Open Book
Date: 23 Dec 1999 18:42:02
Message: <3862b34a@news.povray.org>
The story of my life, but you don't want to hear it <g>

    I'm looking for a book type object (grimoire or bible or whatever is
closest) which is open to about the middle. I can provide the silk bookmark.
I don't have much to offer but I can maybe swap some code or bless your
camels or something?

    Thanks in advance if you can save me the time from having to code this
myself.
    Guy :)E
the### [at] budgetnet


Post a reply to this message

From: Chris Colefax
Subject: Re: Looking for an Open Book
Date: 24 Dec 1999 08:22:06
Message: <3863737e@news.povray.org>
Guido <the### [at] budgetnet> wrote:
> The story of my life, but you don't want to hear it <g>
>
>     I'm looking for a book type object (grimoire or bible or whatever is
> closest) which is open to about the middle. I can provide the silk
bookmark.
> I don't have much to offer but I can maybe swap some code or bless your
> camels or something?
>
>     Thanks in advance if you can save me the time from having to code this
> myself.

Here's a simple book I coded for use as an icon (rendered small, so not much
in the way of detail).  The leather-bound cover lies flat in the XZ plane,
and I've only used four pages (two on each side) - you could either use many
more copies of the patch object to create extra pages, or perhaps define a
prism using the same Bezier co-ordinates to represent a whole block of
pages.  Untransformed the book is about <4.4, 0.8, 2.8> units in size.

// -----------------------------------------------

#declare Page =
   bicubic_patch {type 1 u_steps 3 v_steps 3 flatness .01
      <-1.8, .3, -1.2>, <-1.3, .1, -1.2>, <-.6, 1, -1.2>, <.1, .1, -1.2>
      <-1.8, .3, -.4>, <-1.3, .1, -.4>, <-.6, 1, -.4>, <.1, .1, -.4>
      <-1.8, .3, .4>, <-1.3, .1, .4>, <-.6, 1, .4>, <.1, .1, .4>
      <-1.8, .3, 1.2>, <-1.3, .1, 1.2>, <-.6, 1, 1.2>, <.1, .1, 1.2>}

#declare PageCurled =
   bicubic_patch {type 1 u_steps 3 v_steps 3 flatness .01
      <-1.4, .8, -.8>, <-1.3, .1, -1.2>, <-.6, 1, -1.2>, <.1, .1, -1.2>
      <-1.8, .3, -.4>, <-1.3, .1, -.4>, <-.6, 1, -.4>, <.1, .1, -.4>
      <-1.8, .3, .4>, <-1.3, .1, .4>, <-.6, 1, .4>, <.1, .1, .4>
      <-1.8, .3, 1.2>, <-1.3, .1, 1.2>, <-.6, 1, 1.2>, <.1, .1, 1.2>}

#declare OpenBook = union {
   union {
      superellipsoid {<.1, .1> scale <1, .02, 1.4> translate -x*1.1}
      superellipsoid {<.1, .1> scale <1, .02, 1.4> translate x*1.1}
      difference {
         cylinder {-z*1.4, z*1.4, .14}
         cylinder {-z*1.5, z*1.5, .1}
         box {<-.2, 0, -1.5>, <.2, .2, 1.5>}
         }
      pigment {rgb <.6, .3, .2>}
      normal {crackle .05 scale .3 scallop_wave}
      finish {phong .3 phong_size 25}
      }

   union {
      object {PageCurled} object {Page scale <-1, 1, 1>}
      object {Page scale <1.05, .5, 1>} object {Page scale <-1.05, .5, 1>}
      pigment {rgb <.9, .88, .8>}
      normal {wrinkles -.15 scale .2}
      }
   }

// -----------------------------------------------


Post a reply to this message

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