OrthonormalVectorsFromAxisGenerator

class compas_fab.robots.OrthonormalVectorsFromAxisGenerator(axis, angle_step, start_vector=None)[source]

Bases: object

Generate vectors that are orthonormal to an axis.

Parameters
  • axis (compas.geometry.Vector) – The axis to which the vectors should be orthonormal to.

  • angle_step (float) – The angle in radians as the spacing between generated vectors.

Yields

compas.geometry.Vector – The orthonormal vector.

Examples

>>> generator = OrthonormalVectorsFromAxisGenerator((0, 0, 1), math.radians(120))
>>> [xaxis for xaxis in generator]
[Vector(0.000, -1.000, 0.000), Vector(0.866, 0.500, 0.000), Vector(-0.866, 0.500, 0.000)]