|
|
hello,
i want to model cable with 2 parts : cylindrical and part of torus.
for cylindrical, i have no problem. code i use is :
#declare p1 = 8; // number of helixes
#declare p2 = 0.25; // number of turns per unit length
#declare p3 = 1.75; // minor radius
#declare p4 = 1.50; // major radius
#declare p5 = 1.00; // shape parameter
#declare p6 = 1; // cross section type -> circle
#declare p7 = 0; // cross section rotation angle
#declare containerSize = 3.20;
#declare maxGradiantValue = 10;
#declare cableFunction = function { f_helix1(x, y, z, p1, p2, p3, p4,
p5, p6, p7) }
#declare cableCyl = isosurface {
function { cableFunction(x,y,z) }
contained_by {
box { <+containerSize, 0.00, +containerSize> <-containerSize,
-cableLen, -containerSize> }
}
max_gradient maxGradiantValue
}
for "torus part", i do this code :
#declare cableTorus = isosurface {
function { cableFunction(f_r(x,y,z)-MajorRadius, y, f_th(x,y,z)) }
contained_by {
sphere { 0,*MajorRadius1.2 }
}
max_gradient maxGradiantValue
rotate 90*x
}
with MajorRadius = 80.00
... but all the thing a get is a plain torus !!!
anyone can help me ?
thanks
Post a reply to this message
|
|