Finding coordinates of a point between two points?

后端 未结 4 483
半阙折子戏
半阙折子戏 2020-12-03 18:09

Doing some 3D stuff in wpf- want to use a simpler test to see if everything is working (before moving to curves).

The basic question is given two points x1,y1,z1 and

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-03 18:53

    Let t vary from 0 to 1. Use the following:

    (x3, y3, z3) = (1-t)*(x1, y1, z1) + t*(x2, y2, z2)

    When t=0 you get the first point. When t=1 you get the second.

    This method is called linear interpolation.

提交回复
热议问题