points_on_circle

ssapy.utils.points_on_circle(r, v, rad, num_points=4)[source][source]

Generate points on a circle in 3D space.

The circle is defined by its center r, radius rad, and a normal vector v. The function computes num_points evenly spaced points on the circle.

Parameters:

r (numpy.ndarray): A 3D vector representing the center of the circle. v (numpy.ndarray): A 3D vector representing the normal to the circle’s plane. rad (float): The radius of the circle. num_points (int, optional): The number of points to generate on the circle.

Defaults to 4.

Returns:

numpy.ndarray: An array of shape (num_points, 3), where each row represents

the coordinates of a point on the circle.

Raises:

ValueError: If the normal vector v is the zero vector.