Hello!
I need to linearly interpolate between two vectors along an edge in a specific way. Rather than attempt to explain this issue myself and cause confusion I will instead include a snippet from the documentation of the algorithm I am attempting to implement:
“Exactly where a vertex is placed along an edge is determined by interpolation. The vertex should be placed where the density value is approximately zero. For example, if the density at end A of the edge is 0.1 and at end B is -0.3, the vertex would be placed 25 percent of the way from A to B.”
I need to linearly interpolate between two points given the above consideration of the float density values associated with each point. What I need to know is how I would go about getting t in “static function Lerp (from : Vector3, to : Vector3, t : float) : Vector3” given the above constraints. My mathematics is ropy and this is a hard one to explain so I would appreciate any input.
Thanks!