Rounded edges on box

Rounded edges on box

Post by Eddie Ferrie » Sun, 06 Apr 1997 04:00:00



What would be the best way to define a box (in POV) in which some of the
edges are rounded, but not all of them. For example, the side edges are
rounded but not the top and bottom ones, kinda like a videocassette. I'm
new at this and any help is greatly appreciated.

                                                eddie

 
 
 

Rounded edges on box

Post by John Cranm » Mon, 07 Apr 1997 05:00:00



>What would be the best way to define a box (in POV) in which some of the
>edges are rounded, but not all of them. For example, the side edges are
>rounded but not the top and bottom ones, kinda like a videocassette. I'm
>new at this and any help is greatly appreciated.

>                                            eddie

The following include file will generate a box with all the edges
evenly rounded.  Hopefully it is not too hard to see how it works.
The box is centered at the origin

 The basic idea is to add slabs to the sides of the box,  cylinders to
the edges and spheres to the corners.  To get the effect you are after
you will have to add these components to some sides only.

If you need any more help just ask.

:
John
:
We are born *, wet and hungry. Then life gets worse.

 
 
 

Rounded edges on box

Post by John Cranm » Mon, 07 Apr 1997 05:00:00


begin 644 r-box.inc
<uuencoded_portion_removed>

`
end

 
 
 

Rounded edges on box

Post by James O'Mall » Mon, 14 Apr 1997 04:00:00




Quote:>What would be the best way to define a box (in POV) in which some of the
>edges are rounded, but not all of them. For example, the side edges are
>rounded but not the top and bottom ones, kinda like a videocassette. I'm
>new at this and any help is greatly appreciated.

>                                            eddie

Here's how I would do it, a superellipsoid intersected with a box,
You're chopping out a box shape from the superellipsoid.

intersection {
 superellipsoid  { <.25, .25> }
// As the exponents approach 1.0, the edges get rounder
 box { <-1.1, -.5, -1.1> <1.1, .5, 1.1> }
  texture {  
          pigment {color Red }
          finish {phong .4 phong_size 40 }
      }
rotate <-25, 45, 0>

Quote:}