The sphere_surface module

class tracer.sphere_surface.CutSphereGM(radius=1.0, bounding_volume=None)

Trims the SphericalGM by only selecting intersection points inside a bounding volume. This GM still can’t supply a mesh of itself.

Arguments

  • radius: of the sphere to cut.
  • bunding_volume: an instance BoundaryShape subclass (see boundary_shape.py)
class tracer.sphere_surface.HemisphereGM(radius=1.0)

Trims the SphericalGM by only selecting intersection points in the lower hemisphere (z < 0).

Arguments

  • radius: Set as the sphere’s radius.

Private attributes:

  • _rad: radius of the sphere, a float.
mesh(resolution)

Represent the surface as a mesh in local coordinates. Uses spherical- coordinates bins, i.e. the points are equally distributed by two angles, not by x,y.

Arguments

  • resolution: in points per unit length (so the number of points returned is O(A*resolution**3) for area A)

Returns

x, y, z - each a 2D array holding in its (i,j) cell the x, y, and z coordinate (respectively) of point (i,j) in the mesh.

class tracer.sphere_surface.SphericalGM(radius=1.0)

Implements the geometry of a spherical surface below the xy plane (so that rays going down the Z axis hit). To be used as a base class for spherical surfaces that select different hit-points. Otherwise, this is a closed sphere.

Arguments

  • radius: Set as the sphere’s radius.

Private attributes:

  • _rad: radius of the sphere, a float.
get_ABC(ray_bundle)

Determines the variables forming the relevant quadric equation. Used by the quadrics class, [1]

mesh(resolution)

Represent the surface as a mesh in local coordinates. Uses spherical- coordinates bins, i.e. the points are equally distributed by two angles, not by x,y.

Arguments

  • resolution: in points per unit length (so the number of points returned is O(A*resolution**3) for area A)

Returns

x, y, z - each a 2D array holding in its (i,j) cell the x, y, and z coordinate (respectively) of point (i,j) in the mesh.

Previous topic

The flat_surface module

Next topic

The paraboloid module

This Page