我在 POV-Ray 中创建了一个锥体
torus { 8, 4 texture { pigment { Purple } } translate <0, .... , 0>
cone { <0, 0, 0> 5 <0, 5, 0> 0 texture { pigment { Brown } } }
我试图让圆环“休息”在圆锥体的顶部。我将如何计算做这样的事情所需的价值?
我在 POV-Ray 中创建了一个锥体
torus { 8, 4 texture { pigment { Purple } } translate <0, .... , 0>
cone { <0, 0, 0> 5 <0, 5, 0> 0 texture { pigment { Brown } } }
我试图让圆环“休息”在圆锥体的顶部。我将如何计算做这样的事情所需的价值?
我假设所需的结果是一个像皮带一样“适合”锥体的圆环。前提是torus_major_radius - torus_minor_radius >= cone_base_radius
,正确的代码将是(随意使用这些值):
#declare MAJOR = 2;
#declare MINOR = 0.2;
#declare CONE_HEIGHT = 10;
#declare CONE_RADIUS = 3;
cone {
<0, CONE_HEIGHT, 0>, 0,
<0, 0, 0>, CONE_RADIUS
pigment {color Green}
}
torus {
MAJOR, MINOR
pigment {color Yellow}
translate y * CONE_HEIGHT * (1 - (MAJOR - MINOR) / CONE_RADIUS)
}
这将产生以下结果: