POV-Ray : Newsgroups : povray.newusers : How to get a rounding between two boxes : How to get a rounding between two boxes Server Time
7 Jul 2024 06:31:02 EDT (-0400)
  How to get a rounding between two boxes  
From: gharryh
Date: 19 Mar 2010 06:25:01
Message: <web.4ba3502fe87617d7da0e3b8d0@news.povray.org>
For a test i am constructing a inc that contains some profiles.
Now i want to create a rounding between two boxes to visualize a smooth
transition between these two surfaces.

#macro UPN_GRND(h,b,tw,tf,r1,r2,uf)
#local Base=
union{
        difference {
                box{<-tw/2,0,0><b-r2,tf*1.65,1>}
         box{<-tw/2-1,0,-.10><b+1,tf+1,1.1>
Rotate_Around_Trans(<0,0,-12.0><b/2,tf,0>) translate<tw/2,tf,0>}
                }

        difference {
                cylinder{<b-r2,0,0><b-r2,0,1>,r2 }
                box{<b-2*r2,0,-.1><b+r2,-10-.1,1.1>}
                }
        cylinder{<tw/2+r2*2,tf*2.4,0><tw/2+r2*2,tf*2.4,1>,r1}
         // represent the smoothness radius (r1)
        };

union {
        box{<-tw/2,0,0><tw/2,h,1> }
        object{Base}
        object{Base rotate<180,0,0> translate<0,h,1>}
        }
#end

#macro UPN100(value)
        object{UPN_GRND(100,50,6,8.5,8.5,4.5,25) scale<1,1,value>}
#end

value in the UPN100 macro represents the lenght of that beam.

Thanks in advance

Harry


Post a reply to this message

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