blob: f35c095f84b5773ea98035996b8a650ed5e3aab0 (
plain)
1
2
3
4
5
6
7
8
9
10
|
import numpy as np
from AutopyExtended.Curve.Curve import Curve
class CurveLinear(Curve):
def __init__(self, start, end):
self.__start = np.array(start)
self.__end = np.array(end)
def point(self, t, t_target):
d = np.subtract(self.__end, self.__start)
return np.add(self.__start, (round(d[0] * t / t_target), round(d[1] * t / t_target)))
|