我需要一种算法来计算螺旋路径上的点分布.
该算法的输入参数应为:
绘制的螺旋是阿基米德螺旋,所获得的点必须彼此等距.
该算法应打印出单点笛卡尔坐标的序列,例如:
第1点:(0.0)第2点:( ......,......)........点N(...,...)
编程语言并不重要,非常感谢!
编辑:
我已从此站点获取并修改此示例:
//
//
// centerX-- X origin of the spiral.
// centerY-- Y origin of the spiral.
// radius--- Distance from origin to outer arm.
// sides---- Number of points or sides along the spiral's arm.
// coils---- Number of coils or full rotations. (Positive numbers spin clockwise, negative numbers spin counter-clockwise)
// rotation- Overall rotation of the spiral. ('0'=no rotation, '1'=360 degrees, '180/360'=180 degrees) …Run Code Online (Sandbox Code Playgroud)