POV-Ray : Newsgroups : povray.binaries.images : Yet another Bathroom : Re: Yet another Bathroom Server Time
5 Nov 2024 08:26:33 EST (-0500)
  Re: Yet another Bathroom  
From: nemesis
Date: 28 Nov 2006 08:30:00
Message: <web.456c3984c1baabbd3976a8750@news.povray.org>
Verm <pov### [at] thirteeendynucom> wrote:
> I'd think a mesh would be the simplest way of
> doing something like this:
http://www.boundarybathrooms.co.uk/ECommerce/ProductImages/Detail/Mini%20Toilet.jpg

try this quick hack based on that picture.  lacking a proper seat yet.

/* begin code */

/**
 * toilet seat.
 * complex modelling with blobs and little effort.
 * nam### [at] gmailcom nov/2006
 * code can be reused and redistributed at will by those wishing to improve
povray
**/


#declare t_toilet = texture {
 pigment { rgb 1 }
 normal { bumps bump_size .12 turbulence .3 scale .4 }
 finish { diffuse .5 ambient .4 phong .7 phong_size 40 }
}

#declare toilet_base = blob {
         threshold .2
         // seat
         cylinder { -1.2*x,1.2*x 1 1 scale .6*x+.9*y }
         // seat "flattening"
         cylinder { -1.2*x,1.2*x 1 (-2) scale .6*x+.8*y translate y*.65 }

                // base
         cylinder { -.6*y,.6*y .64 2 scale y*1+x*1.4+z*.8 rotate -z*10
translate x*-.2-y*1.2 }
                // base "flattening" from the sides
         cylinder { -.6*y,.6*y .64 (-2) scale y*1+x*3.4+z*.8 translate -z*.9
rotate x*10 translate x*-.0-y*1.8 }
         cylinder { -.6*y,.6*y .64 (-2) scale y*1+x*3.4+z*.8 translate z*.9
rotate -x*10 translate x*-.0-y*1.8 }

         // back "clipping"
         cylinder { -y,y 1 (-1) scale x*.5+z*2 translate -y-1.2*x }
         // bottom "clipping"
         cylinder { -x,x 1 (-5) scale y*.6+z*2 translate -1.9*y }
        }

// fill light
light_source { (-4+8*y)*2 .5 }

background { rgb .96 }

// "scene"
union {
        light_source { (4-8*z)*2 1 }

 union {
                object { toilet_base }
                // water box
         superellipsoid { <.14,.14> scale x*.3 scale .76 translate y*.9-x*.7
}
         // water box top
         superellipsoid { <.2,.2> scale x*.36 scale y*.04 scale .76
translate y*(.9+.76-.06)-x*.7 }
         texture { t_toilet }

         translate -y*.2
         no_shadow
 }

        rotate y*30
        rotate -x*20
        translate z*6
}

camera { angle 40 }

/* end code */


I like blobs very much for modelling complex, continuous free-flow shapes
without meshes.  And it suffers from no polygon vertice showing. :)

> Isosurfaces are fantastic but I don't think many people use them for
> modelling this type of thing

isosurfaces are good for bending metal objects, for instance...

> and I'm not sure how I'd get the corners
> with lathes.

I'm not sure lather are good for that.  They are great for bathshower
handles, for instance.


Post a reply to this message


Attachments:
Download 'toilet-wip1.jpg' (12 KB)

Preview of image 'toilet-wip1.jpg'
toilet-wip1.jpg


 

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