Geometry¶
- class marxs.math.geometry.Geometry(kwargs={})[source] [edit on github]¶
Bases:
NoGeometry
Attributes Summary
Methods Summary
get_local_euklid_bases
(interpos_local)Obtain a local eukledian base at a set of positions.
intersect
(dir, pos)Calculate the intersection point between a ray and the element
Attributes Documentation
- n_points = 50¶
Methods Documentation
- get_local_euklid_bases(interpos_local)[source] [edit on github]¶
Obtain a local eukledian base at a set of positions.
- Parameters:
- interpos_local
numpy.ndarray
of shape (N, 2) coordinates in the coordiante system of the geometry (e.g. (x, y), or (r, phi)).
- interpos_local
- Returns:
- e_1, e_2, n
numpy.ndarray
of shape (N, 4) Vectors pointing in direction 1, 2, and normal to the surface.
- e_1, e_2, n
- intersect(dir, pos)[source] [edit on github]¶
Calculate the intersection point between a ray and the element
- Parameters:
- dir
numpy.ndarray
of shape (N, 4) homogeneous coordinates of the direction of the ray
- pos
numpy.ndarray
of shape (N, 4) homogeneous coordinates of a point on the ray
- dir
- Returns:
- intersectboolean array of length N
True
if an intersection point is found.- interpos
numpy.ndarray
of shape (N, 4) homogeneous coordinates of the intersection point. Values are set to
np.nan
if no intersection point is found.- interpos_local
numpy.ndarray
of shape (N, 2) y and z coordinates in the coordiante system of the active plane.