| Home | Trees | Indices | Help |
|
|---|
|
|
Geometry module for theia.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
__package__ =
|
|||
|
|||
Returns the refraction angle at n1/n2 interface for incoming theta. May raise a TotalReflectionError. |
Computes the intersection between a line and a plane.
pos: position of the begining of the line. [3D vector]
dirV: directing vector of the line. [3D vector]
planeC: position of the center of the plane. [3D vector]
normV: vector normal to the plane. [3D vector]
diameter: diameter of the plane.
Returns a dictionary with keys:
'isHit': whether of not the plane is hit. [boolean]
'distance': geometrical distance from line origin to intersection point.
[float]
'intersection point': position of intersection point. [3D vector]
|
Computes the intersection between a line and a spherical surface.
The spherical surface is supposed to have a cylindrical symmetry around
the vector normal to the 'chord', ie the plane which undertends
the surface.
Note: the normal vector always looks to the center of the sphere and the
surface is supposed to occupy less than a semi-sphere
pos: position of the begingin of the line. [3D vector]
dirV: direction of the line. [3D vector]
chordC: position of the center of the 'chord'. [3D vector]
chordNorm: normal vector the the chord in its center. [3D vector]
kurv: curvature (1/ROC) of the surface. [float]
diameter: diameter of the surface. [float]
Returns a dictionary with keys:
'is Hit': whether the surface is hit or not. [boolean]
'distance': distance to the intersection point from pos. [float]
'intersection point': position of intersection point. [3D vector]
|
Computes the intersection of a line and a cylinder in 3D space.
The cylinder is specified by a disk of center faceC, an outgoing normal
normV, a thickness (thus behind the normal) and a diameter.
pos: origin of the line. [3D vector]
dirV: directing vector of the line. [3D vector]
faceC: center of the face of the cylinder where lies the normal vector.
[3D vector]
normV: normal vector to this face (outgoing). [3D vector]
thickness: thickness of the cylinder (counted from faceC and behind normV)
[float]
diameter: of the cylinder. [float]
Returns a dictionary with keys:
'isHit': whether of not. [boolean]
'distance': geometrical distance of the intersection point from pos.
[float]
'intersection point': point of intersection. [3D vector]
|
Computes the refl and refr directions produced by inc at interface n1/n2.
inc: director vector of incoming beam. [3D vector]
nor: normal to the interface at the intersection point. [3D vector]
n1: refractive index of the first medium. [float]
n2: idem.
Returns a dictionary with keys:
'r': normalized direction of reflected beam. [3D vector]
't': normalized direction of refracted beam. [3D vector]
'TR': was there total reflection?. [boolean]
Note: if total reflection then refr is None.
|
Provides the rotation matrix which maps a (unit) to b (unit). a,b: unit 3D vectors. [3D np.arrays] Returns an np.array such that np.dot(M,a) == b. |
Returns the spherical coordinates of the unitary vector given by array. array: 3D vector (unitary). [float] Returns the theta and phi angles in radians with theta in [0, pi] and phi in [-pi, pi] |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu Aug 24 10:17:20 2017 | http://epydoc.sourceforge.net |