helix

_images/helix.jpg
helix(pos=vec(0, 0, 0), axis=vec(3, 0, 0), color=color.red)
Parameters:
  • pos (vector) – Position of left end. Default <0,0,0>.

  • axis (vector) – Extends from pos to other end. Default <1,0,0>.

  • color (vector) – Default color.white.

  • radius (vector) – Radius of the helix. Default is 1.

  • thickness (scalar) – Diameter of the cross section of the curve. Default is radius/20

  • length (scalar) – Length of axis. Setting length sets magnitude of axis. Default is 1.

  • coils (scalar) – Number of coils. Default is 5.

  • size (vector) – Length, height, width of a box surrounding the cylinder. Default is <1,1,1>.

  • ccw (boolean) – If ccw is True the helix winds counterclockwise (default).

By setting size appropriately one can make the cross-section of the helix elliptical instead of circular.

Because a helix is constructed from a curve, it has the same limitations as curve: a helix cannot be compounded, cannot be transparent, and cannot have a texture.

Attributes used less often:

helix(canvas=mycanvas, make_trail=True, emissive=False)
Parameters:
  • shininess (scalar) – Default 0.6; Range 0-1.

  • emissive (boolean) – Default False. Object glows, losing all shading, if True.

  • visible (boolean) – If False, object is not displayed. Default: True

  • canvas (object) – Default is scene.

  • make_trail (boolean) – If True, object leaves a trail when moved. See Attaching a Trail for more options.

  • up (vector) – A vector perpendicular to the axis.

See also

Rotation; color; emissive; canvas