PreviousHomeNext

 

Rounded objects - Size and Shells

Nearly uniform thickness shells can be made. So far there are just two "primatives": the plane and the sphere. In both cases the defining function can have a constant which determines the size of the resulting object. For the sphere this is the radius and for a plane it is the normal distance of the surface from the origen. Increase this by a small amount for all the surfaces making up an object , and it will be made uniformly bigger. The radius of round corners needs to be increased by the same amount. (For bevelled and rounded bevel corners it will be a bit less.) 

using the size parameter to form a shell

Figure 1: A shell made by the CSG difference between a smaller and larger version of a rounded object made using the size parameter.

This figure was produced by the following Povray code:

// This work is licensed under the Creative Commons Attribution 3.0 Unported License.
// To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/
// or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View,
// California, 94041, USA.
// Rounded objects: Shells
// Vers: 1.00
// Date: 14 Nov 2016
// Auth: John Greenwood
#version 3.7 ;
global_settings {assumed_gamma 1.0 }
#include "Rounded_Objects.inc"
camera {location angle 7 look_at <0,0,0>
}
light_source { colour rgb<1,1,1>
}
background { color rgb<0.2, 0.4, 0.8>
}
//------------------------------------------------------------------------------------------
#declare Object = function(p,r,s,x,y,z){
+R_Union(
R_Cube(p,r+s,1.7+s,x-1.2,y,z+.2)
+R_Intersection(
R_Sphere(p,r+s,1.8+s,x+1.2,y,z-.1)
+R_Sphere(p,-r-s,1-s,x+1.2,y,z+1)
)
)
}
#declare Profile = 0.6; // change this to change the shape of the corner. 0.6 gives very close to circular
#declare Radius = .5; // radius when the corner is circular and surfaces at right angles
#declare Size = .1; // radius when the corner is circular and surfaces at right angles
#difference {
isosurface {
function {
// start of rounded object ****************************************
Object(Profile,Radius,Size,x,y,z)
// end of rounded object **************************
}
threshold 1
max_gradient 20
contained_by { box {, <3.2,3.2,3.2>
} }
}
isosurface {
function {
// start of rounded object ****************************************
Object(Profile,Radius,0,x,y,z)
// end of rounded object **************************
}
threshold 1
max_gradient 20
contained_by { box {, <3.2,3.2,3.2>
} }
//max_trace 3
all_intersections
}
box {,<5,5,-5>
pigment {color rgb }}
texture {pigment {color rgb }}
}