aspsim.room.generatepoints.spherical2cart

aspsim.room.generatepoints.spherical2cart(r, angle)

Transforms the provided spherical coordinates to cartesian coordinates

Parameters:
  • r (ndarray of shape (num_points, 1) or (num_points,)) – radius of each point

  • angle (ndarray of shape (num_points, 2)) – the angles in radians angle[:,0] is theta, the angle in the xy plane, where 0 is x direction, pi/2 is y direction angle[:,1] is phi, the zenith angle, where 0 is z direction, pi is negative z direction

Returns:

cart_coord – the cartesian coordinates

Return type:

ndarray of shape (num_points, 3)