POV-Ray : Newsgroups : povray.newusers : A simple bewbie question : Re: A simple bewbie question Server Time
28 Jul 2024 22:17:44 EDT (-0400)
  Re: A simple bewbie question  
From: Mike Williams
Date: 16 Jun 2007 04:42:09
Message: <I9$xgGAwI6cGFwhR@econym.demon.co.uk>
Wasn't it Simon who wrote:
>I'm sorry to ask this but I suspect this is one of my big problems with 
>making scenes look realistic...
>
>When I define an object (let's use a round stand), I would do something 
>like:
>
>A vertical cylinder to represent the top of the stand
>a torus to round the edges of the stand
>a vertical cylinder to represent the side of the stend.
>
>I'm doing all this to give the shape soft/rounded edges
>
>(hope this makes sense) but although I can do it in simple cases, to do it 
>for (say) a box would require 3 boxes, 12 cylinders and 8 spheres.
>
>Is this the only way? Is this how it was done for individual blocks in the 
>P.b-i "Yet Another CGSphere Entry" post ? or is there some way to "erode" ?

If you take a look at the shapes.inc documentation you'll find some
predefined macros that create rounded boxes, cylinders and cones. They
do it the same way that you would do it: a rounded cylinder is two
cylinders and two toruses, a rounded box is 3 boxes, 12 cylinders and 8
spheres.

It's not the only way. You could do something with isosurfaces, but it
would probably run quite a bit slower. You can also create things that
look something like rounded boxes and cylinders with the superellipsoid
object, but again it tends to be slower than using unions of simple
objects.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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