POV-Ray : Newsgroups : povray.binaries.scene-files : fast rounded box Server Time
2 Sep 2024 04:12:44 EDT (-0400)
  fast rounded box (Message 1 to 4 of 4)  
From: JWV
Subject: fast rounded box
Date: 18 May 2003 10:12:35
Message: <3ec794d3@news.povray.org>
macro to create fast rounded boxes. (1/3 of superelipsoid render time).

#macro RoundedBox(X, Y, Z, R)
/*
---------------JWV 2003---------------
|                                    |
|       X = size in x direction      |
|       Y = size in y direction      |
|       Z = size in z direction      |
|       R = radius of edges          |
|                                    |
--------------------------------------
*/

#union{
sphere{<-X/2+R, -Y/2+R, -Z/2+R>, R}
sphere{<X/2-R, -Y/2+R, -Z/2+R>, R}
sphere{<X/2-R, -Y/2+R, Z/2-R>, R}
sphere{<-X/2+R, -Y/2+R, Z/2-R>, R}

sphere{<-X/2+R, Y/2-R, -Z/2+R>, R}
sphere{<X/2-R, Y/2-R, -Z/2+R>, R}
sphere{<X/2-R, Y/2-R, Z/2-R>, R}
sphere{<-X/2+R, Y/2-R, Z/2-R>, R}

cylinder{<-X/2+R, -Y/2+R, -Z/2+R>, <X/2-R, -Y/2+R, -Z/2+R>,R}
cylinder{<-X/2+R, Y/2-R, -Z/2+R>, <X/2-R, Y/2-R, -Z/2+R>,R}
cylinder{<-X/2+R, -Y/2+R, Z/2-R>, <X/2-R, -Y/2+R, Z/2-R>,R}
cylinder{<-X/2+R, Y/2-R, Z/2-R>, <X/2-R, Y/2-R, Z/2-R>,R}

cylinder{<X/2-R, -Y/2+R, Z/2-R>, <X/2-R, -Y/2+R, -Z/2+R>,R}
cylinder{<-X/2+R, -Y/2+R, Z/2-R>, <-X/2+R, -Y/2+R, -Z/2+R>,R}
cylinder{<X/2-R, Y/2-R, Z/2-R>, <X/2-R, Y/2-R, -Z/2+R>,R}
cylinder{<-X/2+R, Y/2-R, Z/2-R>, <-X/2+R, Y/2-R, -Z/2+R>,R}

cylinder{<X/2-R, -Y/2+R, -Z/2+R>, <X/2-R, Y/2-R, -Z/2+R>,R}
cylinder{<-X/2+R, -Y/2+R, -Z/2+R>, <-X/2+R, Y/2-R, -Z/2+R>,R}
cylinder{<X/2-R, -Y/2+R, Z/2-R>, <X/2-R, Y/2-R, Z/2-R>,R}
cylinder{<-X/2+R, -Y/2+R, Z/2-R>, <-X/2+R, Y/2-R, Z/2-R>,R}

box{<-X/2, -Y/2+R, -Z/2+R>, <X/2, Y/2-R, Z/2-R>}
box{<-X/2+R, Y/2, -Z/2+R>, <X/2-R, -Y/2, Z/2-R>}
box{<-X/2+R, -Y/2+R, Z/2>, <X/2-R, Y/2-R, -Z/2>}

}
#end


JWV


Post a reply to this message

From: ABX
Subject: Re: fast rounded box
Date: 19 May 2003 03:06:14
Message: <ib0hcvgiusp4mgeg7gok5pvgmed0bpgr8b@4ax.com>
On Sun, 18 May 2003 16:11:01 +0200, "JWV" <jwv|at|planet.nl> wrote:
> macro to create fast rounded boxes. (1/3 of superelipsoid render time).

1. Supperellispoid is not a roudned box. Are you aware that your macro is not a
replacement to supperelipsoid ?
2. Have you noticed similiar macro in official distribution ? Look at
http://www.povray.org/documentation/view/261/

ABX


Post a reply to this message

From: JWV
Subject: Re: fast rounded box
Date: 19 May 2003 10:57:21
Message: <3ec8f0d1$1@news.povray.org>
> 1. Supperellispoid is not a roudned box. Are you aware that your macro is
not a
> replacement to supperelipsoid ?

I know a superelipsoid is not a rouded box, but i only use superelipsoids
for rounded boxes.

> 2. Have you noticed similiar macro in official distribution ? Look at
> http://www.povray.org/documentation/view/261/

I had not noticed it, but someone else has told me to have a look at
shapes.inc (after i posted my own version). So i know my macro doesn't bring
anything new, but it was still a usefull macro practice.

Next time i think of something usefull, i will check the manual to see if it
already exists :-).

JWV


"ABX" <abx### [at] abxartpl> wrote in message
news:ib0hcvgiusp4mgeg7gok5pvgmed0bpgr8b@4ax.com...
> On Sun, 18 May 2003 16:11:01 +0200, "JWV" <jwv|at|planet.nl> wrote:
> > macro to create fast rounded boxes. (1/3 of superelipsoid render time).
>
> 1. Supperellispoid is not a roudned box. Are you aware that your macro is
not a
> replacement to supperelipsoid ?
> 2. Have you noticed similiar macro in official distribution ? Look at
> http://www.povray.org/documentation/view/261/
>
> ABX


Post a reply to this message

From: John VanSickle
Subject: Re: fast rounded box
Date: 27 May 2003 11:19:59
Message: <3ED3821A.444A6EBC@hotmail.com>
ABX wrote:
> 
> On Sun, 18 May 2003 16:11:01 +0200, "JWV" <jwv|at|planet.nl> wrote:
> > macro to create fast rounded boxes. (1/3 of superelipsoid render time).
> 
> 1. Supperellispoid is not a roudned box. Are you aware that your macro
> is not a replacement to supperelipsoid ?
> 2. Have you noticed similiar macro in official distribution ? Look at
> http://www.povray.org/documentation/view/261/

And it's been part of the Thoroughly Useful Macros since their
inception.

Regards,
John


Post a reply to this message

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