|
|
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
|
|