#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Sep  8 10:38:30 2023

@author: alex
"""

import numpy as np

from pyro.dynamic import plane

sys = plane.Plane2D()

sys.plot_alpha2Cl()

sys.x0   = np.array([0,0,0.2,15,0,0])

sys.inertia = 1.0


def t2u(t):
    
    u = np.array([ 2 * t , -0.12 * t ])
    
    return u
    
sys.t2u = t2u

#sys.gravity = 0

sys.compute_trajectory( 10 , 20001 , 'euler' )
sys.plot_trajectory('x')

# sys.dynamic_domain = False
sys.animate_simulation( time_factor_video=0.5 )