小编Giu*_*cci的帖子

在螺旋上绘制等距点

我需要一种算法来计算螺旋路径上的点分布.

该算法的输入参数应为:

  • 循环宽度(距离最内圈的距离)
  • 固定点之间的距离
  • 绘制的点数

绘制的螺旋是阿基米德螺旋,所获得的点必须彼此等距.

该算法应打印出单点笛卡尔坐标的序列,例如:

第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)

algorithm algebra spiral draw

24
推荐指数
3
解决办法
1万
查看次数

标签 统计

algebra ×1

algorithm ×1

draw ×1

spiral ×1