interp2d   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm

Implementation

(bind-func interp2d
  (lambda (p1:Vector4* p2:Vector4* p3:Vector4* pos:float)
    (let ((x (+ (tref p1 0) (* (- (tref p2 0) (tref p1 0)) pos)))
    (y (+ (tref p1 1) (* (- (tref p2 1) (tref p1 1)) pos))))
      (tfill! p3 x y 0.0 0.0)
      void)))


Back to Index