photonmap.Common.Math ===================== .. py:module:: photonmap.Common.Math Functions --------- .. autoapisummary:: photonmap.Common.Math.denormalize photonmap.Common.Math.sphericalToCartesian photonmap.Common.Math.crossVector photonmap.Common.Math.orthonormalBasis photonmap.Common.Math.geoHemisphere photonmap.Common.Math.averageVector Module Contents --------------- .. py:function:: denormalize(f: float) -> int Convert a value from range (0 - 1) to (0 - 255) Parameters ---------- f: float The value to convert .. py:function:: sphericalToCartesian(theta, phi, x_seg, y_seg) Convert the quaternion of object from angle(theta, phi) to Vec3(x,y,z) Parameters ---------- theta: float The angle theta phi: float The angle phi x_seg: int The number of x segment y_seg: int The number of y segment .. py:function:: crossVector(a, b) Calculate the cross product of two vector Parameters ---------- a: Vec3 The first vector b: Vec3 The second vector .. py:function:: orthonormalBasis(n) Calculate the axis orthogonal from the vector normal Parameters ---------- n: Vec3 The normal vector (first axe) Returns ------- t: Vec3 The second axe b: Vec3 The third axe .. py:function:: geoHemisphere(centre, normal, rayon) Generate the geometry of a hemisphere Parameters ---------- centre: Vec3 The center of sphere normal: Vec3 The normal vector rayon: float The radius of sphere Returns ------- A Shape PlantGL .. py:function:: averageVector(listVectors) Calculate the average vector of a list Parameters ---------- listVectors: array The list of vector