text: import math
  def oval(t,T,tp,st,a,b,f1,f2,h,offset):
      pi=3.1415926
      gp=t/T
      if gp+offset<=1: 
          gp=gp+offset
      else:
          gp=gp+offset-1
      if st!=0:
          houyi=0
          if gp<tp:
              x=-st/2+st*gp/tp-houyi
              af=(st/2)**2
              y=-f1*(1-((x+houyi)*(x+houyi)/af))**0.5+h
          else:
              x=st/2-st*(gp-tp)/(1-tp)-houyi
              af=(st/2)**2
              y=f2*(1-((x+houyi)*(x+houyi)/af))**0.5+h
          L=(x**2+y**2)**0.5
          if x>0:
              thet=math.atan(y/x)
          else:
              if x==0:
                  thet=pi/2
              else:
                  thet=math.atan(y/x)+pi
          gama=math.acos((L**2+a**2-b**2)/(2*a*L))
          qian=(thet-gama)-pi/4
          houu=(thet+gama)-3*pi/4
      else:
          if gp<tp:
              y=-f1*sin(gp*pi)+h
          else:
              y=f2*sin(gp*pi)+h
          theta=pi/2
          gama=math.acos((y**2+a**2-b**2)/(2*a*y))
          qian=(theta-gama)-pi/4
          houu=(theta+gama)-3*pi/4
      a=[qian,houu]
      return a