pyOptiShared.Designs.rotate_curve

pyOptiShared.Designs.rotate_curve(x, y, angle_degrees, center=(0, 0))

Rotate a curve defined by x and y arrays by a given angle around a center point.

Parameters:
  • x (array-like) – x-coordinates of the curve

  • y (array-like) – y-coordinates of the curve

  • angle_degrees (float) – rotation angle in degrees (counter-clockwise)

  • center (tuple) – (x0, y0) point around which to rotate

Returns:

Rotated x and y coordinates (numpy arrays)

Return type:

x_rot, y_rot