tfg.geometry.representation.ray.intersection_ray_sphere
Stay organized with collections
Save and categorize content based on your preferences.
Finds positions and surface normals where the sphere and the ray intersect.
tfg.geometry.representation.ray.intersection_ray_sphere(
sphere_center,
sphere_radius,
ray,
point_on_ray,
name='ray_intersection_ray_sphere'
)
Note |
In the following, A1 to An are optional batch dimensions.
|
Args |
sphere_center
|
A tensor of shape [3] representing the 3d sphere center.
|
sphere_radius
|
A tensor of shape [1] containing a strictly positive value
defining the radius of the sphere.
|
ray
|
A tensor of shape [A1, ..., An, 3] containing normalized 3D vectors.
|
point_on_ray
|
A tensor of shape [A1, ..., An, 3] .
|
name
|
A name for this op. The default value of None means
"ray_intersection_ray_sphere".
|
Returns |
A tensor of shape [2, A1, ..., An, 3] containing the position of the
intersections, and a tensor of shape [2, A1, ..., An, 3] the associated
surface normals at that point. Both tensors contain NaNs when there is no
intersections. The first dimension of the returned tensor provides access to
the first and second intersections of the ray with the sphere.
|
Raises |
ValueError
|
if the shape of sphere_center , sphere_radius , ray or
point_on_ray is not supported.
|
tf.errors.InvalidArgumentError
|
If ray is not normalized.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-10-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-10-28 UTC."],[],[]]