def real_sh_coeff(xyz_samples):
    d_sqrt_pi = 2*np.sqrt(np.pi)
    real_coeff = np.zeros((len(xyz_samples), 9))
    real_coeff[:,0] = 1/d_sqrt_pi

    real_coeff[:,1] = (np.sqrt(3)/d_sqrt_pi)*xyz_samples[:,0]
    real_coeff[:,2] = (np.sqrt(3)/d_sqrt_pi)*xyz_samples[:,2]
    real_coeff[:,3] = (np.sqrt(3)/d_sqrt_pi)*xyz_samples[:,1]

    real_coeff[:,4] = (np.sqrt(15)/d_sqrt_pi)*xyz_samples[:,0]*xyz_samples[:,1]
    real_coeff[:,5] = (np.sqrt(15)/d_sqrt_pi)*xyz_samples[:,1]*xyz_samples[:,2]
    real_coeff[:,6] = (np.sqrt(5)/(2*d_sqrt_pi))*(3*xyz_samples[:,2]**2-1)
    real_coeff[:,7] = (np.sqrt(15)/d_sqrt_pi)*xyz_samples[:,0]*xyz_samples[:,2]
    real_coeff[:,8] = (np.sqrt(15)/(2*d_sqrt_pi))*(xyz_samples[:,0]**2 - xyz_samples[:,1]**2)
    return real_coeff
dataset/ETHPy150Open mattloper/opendr/lighting.py/real_sh_coeff/original