1

叹!我希望这有效:

// Spline Sine
#declare SphereSine = union {
    #local Radius = 0.15;
    #local Amplitude = 2;
    #local Iterator = 0;
    #local Amount = 20;
    sphere_sweep {
        b_spline
        Amount,

        #for (Iterator, 0, Amount, 1)
            <Iterator, sin(Iterator)*Amplitude, 0>, Radius
        #end

        tolerance 0.1
        pigment {
            rgb <1, 0, 0>
        }
    }
}

有什么方法可以自动将点添加到 POV-Ray 中的样条曲线,所以我不必手动添加点?还有其他选择吗?

4

1 回答 1

1

您可以编写自己的宏来包装for循环并将代码简化为单行,例如points(0.15, 2, 20);. 否则,如果您正在寻找诸如用于指定点数或点生成功能的内置关键字之类的东西,恐怕没有开箱即用的选项。

于 2018-04-26T10:30:34.570 回答