|
|
The method had been represented the other day. The modified function for sin
function is
(y-sin(2.5*x))/sqrt(2.5^2*cos(2.5*x)^2+1)= 0.08 ,
(y-sin(2.5*x))/sqrt(2.5^2*cos(2.5*x)^2+1)=-0.08
^^^^^^
0.08 represent the thickness/2
Then use pov-ray's csg difference:
//---------------------------code---------------------------
#declare f_sin=function(var1,var2,k){
var2-sin(k*var1)
}
#declare f_sin_normalized=function(var1,var2,k){
f_sin(var1,var2,k)
/sqrt(k*k*pow(cos(k*var1),2)+1)
}
#declare CSG_OVERLAP=0.000001;
difference{
isosurface{
function{f_sin_normalized(x,z,2.5)-0.08}
max_gradient 2
contained_by{box{<-5,-1,-1.5><5,2,1.5>}}
all_intersections
}
isosurface{
function{f_sin_normalized(x,z,2.5)+0.08}
max_gradient 2
contained_by{box{<-5,-1-CSG_OVERLAP,-1.5-CSG_OVERLAP><5,2+CSG_OVERLAP,1.5>}}
all_intersections
}
}
//--------------------------end of code--------------------------
Drew the picture!!
Post a reply to this message
Attachments:
Download 'sin_normalized.jpg' (117 KB)
Preview of image 'sin_normalized.jpg'
|
|