POV-Ray : Newsgroups : povray.newusers : Rounded Edges ? Server Time
25 Nov 2024 07:48:17 EST (-0500)
  Rounded Edges ? (Message 1 to 2 of 2)  
From: Robert A 
Subject: Rounded Edges ?
Date: 3 Apr 2006 14:44:52
Message: <44316d24$1@news.povray.org>
Hi guys,

I made a simple object that's a cylinder with one flat side (like a 
half-moon but not quite). How do I make the top (and/or bottom) edges 
rounded ?

Here is the object:

#declare dial = difference {
 cylinder {
  <0.0, 0.0, 0.0>
  <0.0, 1.0, 0.0> 0.5
 }

 box {
  <0.45,-1.0, -1.0>
  <1.0, 2.0, 1.0>
 }
}

I tried a superellipsoid but the flat part I cut off isn't rounded at the 
top and bottom.

Thanks.


Post a reply to this message

From: Sebastian H 
Subject: Re: Rounded Edges ?
Date: 3 Apr 2006 17:02:47
Message: <44318d77$1@news.povray.org>
Robert A. wrote:
> Hi guys,
> 
> I made a simple object that's a cylinder with one flat side (like a 
> half-moon but not quite). How do I make the top (and/or bottom) edges 
> rounded ?
> 
> Here is the object:
> 
> #declare dial = difference {
>  cylinder {
>   <0.0, 0.0, 0.0>
>   <0.0, 1.0, 0.0> 0.5
>  }
> 
>  box {
>   <0.45,-1.0, -1.0>
>   <1.0, 2.0, 1.0>
>  }
> }
> 
> I tried a superellipsoid but the flat part I cut off isn't rounded at the 
> top and bottom.

Unfortunately that's not so easy. You have to construct the edges
by hand with cylinders, tori parts and spheres. This can be very messy
with complicated objects. But if you put everything together into a
macro that takes parameters like the border radius, the cylinder radius
or whatever it gets very flexible since you can create *new* objects
on the fly. So you have the disadvantage of writing complicated
code that converts some parameters into a complex shape agains the
benefit of reusability and flexibility of your macro.

I always do a rough sketch of objects with a pencil first and then
I try to find out what widths, radii or angles are required.
In the end everything has to be constructed out of cutted and
merged primitives that somehow take the input parameters.

Sebastian


Post a reply to this message

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