import numpy as np
import matplotlib.pyplot as plt
from scipy.interpolate import BPoly

from being.curve import Curve

first = BPoly([[[0], [1]], [[0], [1]], [[1], [0]], [[1], [0]] ], [0, 1, 3])
second = BPoly([[[1]], [[1]], [[0]], [[0]]], [0, 2])

curve = Curve([first, second])
t = np.linspace(0, 3, 100)
plt.plot(t, curve(t, extrapolate=False))
plt.xlabel('Time')
plt.ylabel('Position')
plt.show()