POV-Ray : Newsgroups : povray.text.tutorials : Rounding off edges Server Time
8 Oct 2026 18:04:15 EDT (-0400)
  Rounding off edges (Message 1 to 19 of 19)  
From: TigerHawk
Subject: Rounding off edges
Date: 27 Aug 1999 18:19:52
Message: <37C862D1.C1A56DE7@stic.net>
About a week ago I started creating a toilet model in pov-ray (yes,
I know it's been done, but I wanted my own toilet :) via a text editor.
I did not want to use a modeller because I'd be able to move things
around better (I suppose I could make peices of it in a modeller, but
the scaling may be off, etc. Besides, I like CSG). The problem I have
encountered is the smoothing of the edges. Now, I know I can use a
superellipsoid for the tank and tank lid, but what about the seat and
the top of the base? Using cylinders and such makes the edges very sharp
(OUCH!) and I am wondering how might one go about smoothing them
out? Superellipsoinds can't do rounded cylinder shapes (or can they?) so
I am kind of stuck

I thought about using CSG of the difference of a square and the side of
a cylinder, and using that and differencing that with another object,
but that would only make a mold for a straight-edge.

Any ideas?

Tim Soderstrom
TigerHawk
Tig### [at] SticNet


Post a reply to this message

From: Ken
Subject: Re: Rounding off edges
Date: 27 Aug 1999 18:37:28
Message: <37C712E0.4EB927F0@pacbell.net>
TigerHawk wrote:
> 
> About a week ago I started creating a toilet model in pov-ray (yes,
> I know it's been done, but I wanted my own toilet :) via a text editor.
> I did not want to use a modeller because I'd be able to move things
> around better (I suppose I could make peices of it in a modeller, but
> the scaling may be off, etc. Besides, I like CSG). The problem I have
> encountered is the smoothing of the edges. Now, I know I can use a
> superellipsoid for the tank and tank lid, but what about the seat and
> the top of the base? Using cylinders and such makes the edges very sharp
> (OUCH!) and I am wondering how might one go about smoothing them
> out? Superellipsoinds can't do rounded cylinder shapes (or can they?) so
> I am kind of stuck
> 
> I thought about using CSG of the difference of a square and the side of
> a cylinder, and using that and differencing that with another object,
> but that would only make a mold for a straight-edge.
> 
> Any ideas?
> 
> Tim Soderstrom
> TigerHawk
> Tig### [at] SticNet

Prisms and lathes are pretty powerfull features. A prism for the tank lid
and a lathe for the seat with an uneven scaling to make it oblong.

-- 
Ken Tyler

See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: TigerHawk
Subject: Re: Rounding off edges
Date: 27 Aug 1999 19:14:52
Message: <37C86FB8.2BC2F93E@stic.net>
Ken wrote:

> Prisms and lathes are pretty powerfull features. A prism for the tank lid
> and a lathe for the seat with an uneven scaling to make it oblong.
>
> --
> Ken Tyler

Hey, I didn't think of that! Thanks! Now I'll just have to do some reading up
on lathes and I'm all set (I've been cheating by using sPatch as I do not do
many lathes and they frequently need some modification.

Again, thanks for the help - and happy tracing

Tim Soderstrom
TigerHawk
Tig### [at] SticNet


Post a reply to this message

From: Steve
Subject: Re: Rounding off edges
Date: 29 Aug 1999 04:47:11
Message: <37C73930.C8BB9D34@ndirect.co.uk>
Tim

I think I'd look into intersections, such as 

intersection{
             cylinder{
                      <0,1,0>,
                      <0,-1,0> 0.75
                     }
             sphere{
                    <0,0,0>,1
                    scale <1.25,1.25,1>
                   }
             pigment{
                     gradient y
                     color_map{
                               [0.0 color Orange] 
                               [0.25 color White]
                               [0.5 color Green]
                               [0.75 color White]
                               [1.0 color Orange] 
                              }scale 0.25
                    }  
             rotate z*90       
            }           
    
you can do some really interesting things with intersections, and
don't forget that you can scale an object aswell, as in my
example above, I've intersected a sphere and a cylinder, but
scaled the sphere uneavenly, which gives the finished object this
unusual shape.  I am of the mind that anything can be done with
CSG though a few extra key words to enhance the scaling and
bending of objects would help.    

TigerHawk wrote:
> 
> About a week ago I started creating a toilet model in pov-ray (yes,
> I know it's been done, but I wanted my own toilet :) via a text editor.
> I did not want to use a modeller because I'd be able to move things
> around better (I suppose I could make peices of it in a modeller, but
> the scaling may be off, etc. Besides, I like CSG). The problem I have
> encountered is the smoothing of the edges. Now, I know I can use a
> superellipsoid for the tank and tank lid, but what about the seat and
> the top of the base? Using cylinders and such makes the edges very sharp
> (OUCH!) and I am wondering how might one go about smoothing them
> out? Superellipsoinds can't do rounded cylinder shapes (or can they?) so
> I am kind of stuck
> 
> I thought about using CSG of the difference of a square and the side of
> a cylinder, and using that and differencing that with another object,
> but that would only make a mold for a straight-edge.
> 
> Any ideas?
> 
> Tim Soderstrom
> TigerHawk
> Tig### [at] SticNet

-- 
Cheers       
Steve        email: mailto:sjl### [at] ndirectcouk   

%HAV-A-NICEDAY Error not enough coffee.   0 PPS

web: http://www.ndirect.co.uk/~sjlen/   
 or: http://start.at/zero-pps


Post a reply to this message

From: Chris Huff
Subject: Re: Rounding off edges
Date: 29 Aug 1999 09:27:40
Message: <37C93587.3F5A374F@compuserve.com>
In addition to what the others have said, don't forget the torus shape.
IMO, it is under-used. You can easily make a rounded cylinder which
renders faster than an equivalent superellipsoid.(a macro for this is
included in my macro collection in povray.binaries.utilities, and a
version for cones will probably be in the next version. Ken, would you
post this one for me too? This time I will make both Mac and PC text
versions, for those who don't know how to convert.)


Post a reply to this message

From: Ken
Subject: Re: Rounding off edges
Date: 29 Aug 1999 09:41:13
Message: <37C93843.BDFCF883@pacbell.net>
Chris Huff wrote:
> 
> In addition to what the others have said, don't forget the torus shape.
> IMO, it is under-used. You can easily make a rounded cylinder which
> renders faster than an equivalent superellipsoid.(a macro for this is
> included in my macro collection in povray.binaries.utilities, and a
> version for cones will probably be in the next version. Ken, would you
> post this one for me too? This time I will make both Mac and PC text
> versions, for those who don't know how to convert.)

Sure. Send it over and it will be posted like before.

-- 
Ken Tyler

See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Ken
Subject: Re: Rounding off edges
Date: 29 Aug 1999 09:51:27
Message: <37C93AA8.7AD3FA87@pacbell.net>
Ken wrote:
> 
> Chris Huff wrote:
> >
> > In addition to what the others have said, don't forget the torus shape.
> > IMO, it is under-used. You can easily make a rounded cylinder which
> > renders faster than an equivalent superellipsoid.(a macro for this is
> > included in my macro collection in povray.binaries.utilities, and a
> > version for cones will probably be in the next version. Ken, would you
> > post this one for me too? This time I will make both Mac and PC text
> > versions, for those who don't know how to convert.)
> 
> Sure. Send it over and it will be posted like before.

Have you also added those to Twysts macro collection ? It is becoing
formidable and you additions would be welcome.

http://macroscope.twysted.net/

-- 
Ken Tyler

See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Chris Huff
Subject: Re: Rounding off edges
Date: 29 Aug 1999 10:00:50
Message: <37C93D4B.2DBA960B@compuserve.com>
Well, since some of the macros are designed to work together in the
collection and rely on each other, the collection will probably go in
the includes section instead. I may separate a few and put them in the
macros section, although a lot of the macros would just be duplicating
existing stuff.
I will get back to work on the macro collection, although it may be a
little while before it is ready, as I am working on learning Java and
making another particle simulator(written in Java).


Post a reply to this message

From: Remco de Korte
Subject: Re: Rounding off edges
Date: 29 Aug 1999 11:23:30
Message: <37C951A4.F8CCC23B@xs4all.nl>
Chris Huff wrote:
> 
> In addition to what the others have said, don't forget the torus shape.

Or how about blobs?
Too bad you can't use toruses as blob-elements.

Remco


Post a reply to this message

From: Ken
Subject: Re: Rounding off edges
Date: 29 Aug 1999 11:43:02
Message: <37C954D0.9C2CCDE6@pacbell.net>
Remco de Korte wrote:
> 
> Chris Huff wrote:
> >
> > In addition to what the others have said, don't forget the torus shape.
> 
> Or how about blobs?
> Too bad you can't use toruses as blob-elements.
> 
> Remco

... but you can make a torus from blobs so would there be much difference ?

-- 
Ken Tyler

See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Remco de Korte
Subject: Re: Rounding off edges
Date: 29 Aug 1999 16:40:33
Message: <37C9706B.2FD3E7E9@xs4all.nl>
Ken wrote:
> 
> Remco de Korte wrote:
> >
> > Chris Huff wrote:
> > >
> > > In addition to what the others have said, don't forget the torus shape.
> >
> > Or how about blobs?
> > Too bad you can't use toruses as blob-elements.
> >
> > Remco
> 
> ... but you can make a torus from blobs so would there be much difference ?
> 
> --
> Ken Tyler

Just in the ease of writing scene-code.
Blobs aren't the only candidates by the way, cones would be nice too for
instance.

Remco


Post a reply to this message

From: Chris Huff
Subject: Re: Rounding off edges
Date: 29 Aug 1999 16:48:18
Message: <37C99CCE.E45B1730@compuserve.com>
Well, you could use the isoblob patch...but you might have to compile it
yourself and it wouldn't be compatible with official POV.


Post a reply to this message

From: Nieminen Juha
Subject: Re: Rounding off edges
Date: 30 Aug 1999 03:24:18
Message: <37ca31a2@news.povray.org>
TigerHawk <tig### [at] sticnet> wrote:
: Superellipsoinds can't do rounded cylinder shapes (or can they?)

  Yes, they can. Read the documentation.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Ken
Subject: Re: Rounding off edges
Date: 31 Aug 1999 07:16:57
Message: <37CBB96B.39C94347@pacbell.net>
Nieminen Juha wrote:
> 
> TigerHawk <tig### [at] sticnet> wrote:
> : Superellipsoinds can't do rounded cylinder shapes (or can they?)
> 
>   Yes, they can. Read the documentation.

On 01-09-1999 I posted a scene file to povray.text.scene-files showing
100 unique shapes available with the superellipsoid object. It renders
much like one of the typical Povray example scene files and is fairly
well indexed so you can find the right shape for the job you are working
on.

-- 
Ken Tyler

See my 850+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Larry Fontaine
Subject: Re: Rounding off edges
Date: 7 Sep 1999 17:49:05
Message: <37D586AE.EA530F6A@isd.net>
Chris Huff wrote:

> In addition to what the others have said, don't forget the torus shape.
> IMO, it is under-used. You can easily make a rounded cylinder which
> renders faster than an equivalent superellipsoid.(a macro for this is
> included in my macro collection in povray.binaries.utilities, and a
> version for cones will probably be in the next version. Ken, would you
> post this one for me too? This time I will make both Mac and PC text
> versions, for those who don't know how to convert.)

Just to point out, a rounded box made by ellipsoid and one made by
cylinder-sphere-box aren't the same shape. In what appears to be the flat
surfaces of a superellipsoid, it is actually like a very very very short
pyramid stuck on the cube. Also, non-ellipsoid object are much more
versatile, because you can have it any size, not just 2x2x2, and have the
same ammount of rounding-off on every edge.


Post a reply to this message

From: Larry Fontaine
Subject: Re: Rounding off edges
Date: 7 Sep 1999 18:27:57
Message: <37D58FCA.26E36B46@isd.net>
TigerHawk wrote:

> About a week ago I started creating a toilet model in pov-ray (yes,
> I know it's been done, but I wanted my own toilet :) via a text editor.
> I did not want to use a modeller because I'd be able to move things
> around better (I suppose I could make peices of it in a modeller, but
> the scaling may be off, etc. Besides, I like CSG). The problem I have
> encountered is the smoothing of the edges. Now, I know I can use a
> superellipsoid for the tank and tank lid, but what about the seat and
> the top of the base? Using cylinders and such makes the edges very sharp
> (OUCH!) and I am wondering how might one go about smoothing them
> out? Superellipsoinds can't do rounded cylinder shapes (or can they?) so
> I am kind of stuck
>
> I thought about using CSG of the difference of a square and the side of
> a cylinder, and using that and differencing that with another object,
> but that would only make a mold for a straight-edge.
>
> Any ideas?
>
> Tim Soderstrom
> TigerHawk
> Tig### [at] SticNet

Use these macros if you like:

A visual explanation of the macros is in p.b.t

#macro roundbox (X1,Y1,Z1,X2,Y2,Z2,R)
#local T=0;
#if (X1>X2) #declare T=X2; #declare X2=X1; #declare X1=T; #end
#if (Y1>Y2) #declare T=Y2; #declare Y2=Y1; #declare Y1=T; #end
#if (Z1>Z2) #declare T=Z2; #declare Z2=Z1; #declare Z1=T; #end
merge {
   cylinder { <X1+R,Y1+R,Z1+R>,<X1+R,Y1+R,Z2-R>,R }
   cylinder { <X1+R,Y1+R,Z1+R>,<X1+R,Y2-R,Z1+R>,R }
   cylinder { <X1+R,Y1+R,Z1+R>,<X2-R,Y1+R,Z1+R>,R }
   cylinder { <X2-R,Y1+R,Z1+R>,<X2-R,Y1+R,Z2-R>,R }
   cylinder { <X1+R,Y1+R,Z2-R>,<X2-R,Y1+R,Z2-R>,R }
   cylinder { <X2-R,Y1+R,Z1+R>,<X2-R,Y2-R,Z1+R>,R }
   cylinder { <X1+R,Y1+R,Z2-R>,<X1+R,Y2-R,Z2-R>,R }
   cylinder { <X2-R,Y1+R,Z2-R>,<X2-R,Y2-R,Z2-R>,R }
   cylinder { <X1+R,Y2-R,Z1+R>,<X1+R,Y2-R,Z2-R>,R }
   cylinder { <X1+R,Y2-R,Z1+R>,<X2-R,Y2-R,Z1+R>,R }
   cylinder { <X2-R,Y2-R,Z1+R>,<X2-R,Y2-R,Z2-R>,R }
   cylinder { <X1+R,Y2-R,Z2-R>,<X2-R,Y2-R,Z2-R>,R }
   sphere { <X1+R,Y1+R,Z1+R>,R }
   sphere { <X1+R,Y1+R,Z2-R>,R }
   sphere { <X1+R,Y2-R,Z1+R>,R }
   sphere { <X1+R,Y2-R,Z2-R>,R }
   sphere { <X2-R,Y1+R,Z1+R>,R }
   sphere { <X2-R,Y1+R,Z2-R>,R }
   sphere { <X2-R,Y2-R,Z1+R>,R }
   sphere { <X2-R,Y2-R,Z2-R>,R }
   box { <X1,Y1+R,Z1+R>,<X2,Y2-R,Z2-R> }
   box { <X1+R,Y1,Z1+R>,<X2-R,Y2,Z2-R> }
   box { <X1+R,Y1+R,Z1>,<X2-R,Y2-R,Z2> }
   bounded_by { box { <X1,Y1,Z1>,<X2,Y2,Z2> } }
} #end

#macro roundcylinder (H,R1,R2)
merge {
   cylinder { <0,0,0>,<0,H,0>,R1-R2 }
   cylinder { <0,R2,0>,<0,H-R2,0>,R1 }
   torus { R1-R2,R2 translate <0,R2,0> }
   torus { R1-R2,R2 translate <0,H-R2,0> }
   bounded_by { cylinder { <0,0,0>,<0,H,0>,R1 } }
} #end


Post a reply to this message

From: TigerHawk
Subject: Re: Rounding off edges
Date: 17 Sep 1999 17:51:58
Message: <37E2B8D0.7D2FB373@stic.net>
Might you have it with you still that you might be able to send me?

Oh, and by the way, I decided to use a lathe for the toilet seat, and, so
far, it is commming along. The only problem I am having now is getting the
seat to look smooth using the other types of curves (hopefully re-acuqiring
SplinEditor will help in that endeavor). I would still, however, like to
see what can be doen with an elipsoid, as I only know it can do a sphere,
box, and a star-looking shape.

Thanks for the help
Tim Soderstrom
TigerHawk

(Sorry I have no kept up with the conversation - I had no idea it would
generate this much discussion)


Ken wrote:

> Nieminen Juha wrote:
> >
> > TigerHawk <tig### [at] sticnet> wrote:
> > : Superellipsoinds can't do rounded cylinder shapes (or can they?)
> >
> >   Yes, they can. Read the documentation.
>
> On 01-09-1999 I posted a scene file to povray.text.scene-files showing
> 100 unique shapes available with the superellipsoid object. It renders
> much like one of the typical Povray example scene files and is fairly
> well indexed so you can find the right shape for the job you are working
> on.
>
> --
> Ken Tyler
>
> See my 850+ Povray and 3D Rendering and Raytracing Links at:
> http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Ken
Subject: Re: Rounding off edges
Date: 17 Sep 1999 18:41:39
Message: <37E2C336.AF0FD6EE@pacbell.net>
TigerHawk wrote:
> 
> Might you have it with you still that you might be able to send me?

  It is on it's way. In fact I am sending two files. One is the standard
shapes example file the other is a star shapes example file.
 

> (Sorry I have no kept up with the conversation - I had no idea it would
> generate this much discussion)

  One never knows what will spark an interest and it is good to discuss such
things when there is an interest to do so.

-- 
Ken Tyler

See my 1000+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

From: Simon de Vet
Subject: Re: Rounding off edges
Date: 29 Dec 1999 14:29:43
Message: <386A616B.5A9612DF@istar.ca>
TigerHawk wrote:

> About a week ago I started creating a toilet model in pov-ray

Welcome to the club! The toilet was my very first POV image ever, and still
one of my favourites.

Toilets are evocative objects..


Post a reply to this message

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