Reference ‐ RTSphere - 62firelight/manimRT-490 GitHub Wiki
A sphere with transformations that are applied and tracked.
Args:
-
translation
: The translation transformation to apply to the sphere. -
x_scale
: The scale of the sphere along the X axis. -
y_scale
: The scale of the sphere along the Y axis. -
z_scale
: The scale of the sphere along the Z axis. -
x_rotation
: The rotation of the sphere along the X axis. -
y_rotation
: The rotation of the sphere along the Y axis. -
z_rotation
: The rotation of the sphere along the Z axis. -
refractive_index
: The refractive index of the sphere. -
color
: The color of the sphere. -
opacity
: The opacity of the sphere.
__init__(
translation: Sequence[float] = [0, 0, 0],
x_scale: float = 1,
y_scale: float = 1,
z_scale: float = 1,
x_rotation: float = 0,
y_rotation: float = 0,
z_rotation: float = 0,
refractive_index: float = 1,
color=ManimColor('#FFFFFF'),
opacity=1,
**kwargs
) → None
generate_sphere(
ray: Ray3D,
distance_along_ray: float = 1,
x_scale: float = 1,
y_scale: float = 1,
z_scale: float = 1,
x_rotation: float = 0,
y_rotation: float = 0,
z_rotation: float = 0,
refractive_index: float = 1,
color: Union[ManimColor, int, str, Tuple[int, int, int], Tuple[float, float, float], Tuple[int, int, int, int], Tuple[float, float, float, float], ndarray[Any, dtype[int64]], ndarray[Any, dtype[float64]]] = ManimColor('#FFFFFF'),
opacity: float = 1
)
Generates a sphere along a given ray. Useful for guaranteeing an intersection point with a ray.
Args:
-
ray
: A Ray3D Mobject to use for generating a sphere. -
distance_along_ray
: The distance along the ray at which a sphere will be generated. -
translation
: The translation transformation to apply to the sphere. -
x_scale
: The scale of the sphere along the X axis. -
y_scale
: The scale of the sphere along the Y axis. -
z_scale
: The scale of the sphere along the Z axis. -
x_rotation
: The rotation of the sphere along the X axis. -
y_rotation
: The rotation of the sphere along the Y axis. -
z_rotation
: The rotation of the sphere along the Z axis. -
refractive_index
: The refractive index of the sphere. -
color
: The color of the sphere. -
opacity
: The opacity of the sphere.
get_intersection(ray: Ray3D)
Calculates the intersection point(s) between this sphere and a given ray.
Args:
-
ray
: A Ray3D Mobject to calculate intersection point(s) with.
Returns: An array containing the intersection point(s) with the given ray. The array is empty if there are no intersection points.
This file was automatically generated via lazydocs.