I am trying to implement a Point3.Slerp method, so was looking for some samples but the ones I found seems like it’s a whole brand new class to host all the code.
Is there a simple, straightforward way to implement it? Basically the ones I have seen was using Matrix types. Can I implement Slerp without matrices, or would that be a disadvantage (performance, etc)?
Pseudo codes are fine too.
Spherical linear interpolation typically used with Quaternions, not Points. It’s only really meaningful when you are trying to interpolate between two specific rotations.
The only place where I can see this being directly related to Point3 would be if you had 2 points on the surface of a sphere, and you wanted to “slerp” between them around the geodesic path. In that case, your points aren’t really points being interpolated – they’re being used to compute two axes and angles (which define quaternions) and interpolating between those.
If you’re interpolating between two point3 values, direct linear interpolation is probably what you would want to do.
As for using matrices – if you get your points into quaternion form, you can use quaternion math directly – no matrices required.