Test to know if a vector is inside a spherical triangle Given a spherical triangle defined by $3$ unit vectors on a sphere, how can we test if a vector is contained inside the spherical triangle?
 A: To test for containment, treat each edge of the triangle as a plane dividing the sphere.  The vector is inside the triangle if it is in front of each of those edge planes.  To test whether your vector is in front of a plane you just need the normal for that plane.
Calculate the normals for each plane by taking the cross product of each pair of vertices
n0 = v0 × v1
n1 = v1 × v2
n2 = v2 × v0

Once you have the edge normals, just test your vector to see if it's in front of all planes by using dot products
contained = (v • n0 > 0) && (v • n1 > 0) && (v • n2 > 0)

You may need to reverse the cross products for handedness of your coordinates and the ordering of your triangle's vertices.
This should work for any convex shape.
A: A more compact version of John Stephen's answer:
Let the spherical triangle be defined by $\vec a, \vec b, \vec c$, and  $\vec v$ is a vector lying on the sphere. If $\vec a, \vec b, \vec c$ are all linearly independent, there is another vector $\vec \beta$ such that
$\vec v = \left[ \vec a \vec b \vec c \right] \vec \beta,$
where $\left[ \vec a \vec b \vec c \right]$ is the matrix having $\vec a$ as its first column, etc. If all entries in $\vec \beta$ are positive, then $\vec v$ lies within the spherical triangle. Given $\vec a, \vec b, \vec c$, and  $\vec v$, we can solve for $\vec \beta$ either by inverting the matrix or doing Gaussian elimination (or, more realistically, using the solve function in a linear algebra package).
John Stephen's answer can be derived from this one by applying Cramer's Rule. This actually isn't constrained to spherical triangles: given a wedge of $\mathbb{R}^3$ contained in the rays extending from $0$ through $\vec a, \vec b, \vec c$, $\vec \beta$ is positive if $\vec v$ is within the wedge even if it isn't on a sphere.
