如图所示,是一个几十个周期的函数,延O1-L1-O2-R1-O3----一直运动,需要用fortran写好子程序,将该路径嵌入到其他软件中,有没有大佬有比较好的思路来编写这个时间-坐标函数啊?万分感激,上方和下方的圆点代表在该点出停留0.2s,中间的圆点代表在该点停留0.1s (图中笔误),O1-L1的时间是0.05s,L1-O2的时间也是0.05s,每一小段折线的时间都是0.05s。跪求大佬提供个思路。谢谢。下面是我写的一个周期(O1-O3)的坐标-时间函数,因为周期数太多,不可能一直这么些下去,之前没接触过Fortran,跪求大佬可以给个思路,万分感谢! 
 
[Fortran] syntaxhighlighter_viewsource syntaxhighlighter_copycode       t1=0.05
      t2=0.25
      t3=0.30
      t4=0.40
      t5=0.45
      t6=0.65
      t7=0.70
      t8=0.80
      x1=0
      y1=0
      z1=0
      if(t<t1)then
      x2=x1+0.01*t
      y2=y1+0.16*t
      z2=z1
      endif
      if(t1<t .and. t<t2)then
      x2=x1+0.0005
      y2=y1+0.008
      z2=z1
      endif
      if(t2<t .and. t<t3)then
      x2=x1+0.0005+0.01*(t-t2)
      y2=y1+0.008-0.16*(t-t2)
      z2=z1
      endif
      if(t3<t .and. t<t4)then
      x2=x1+0.001
      y2=y1
      z2=z1
      endif
      if(t4<t .and. t<t5)then
      x2=x1+0.001+0.01*(t-t4)
      y2=y1-0.16*(t-t4)
      z2=z1
      endif
      if(t5<t .and. t<t6)then
      x2=x1+0.0015
      y2=y1-0.008
      z2=z1
      endif
      if(t6<t .and. t<t7)then
      x2=x1+0.0015+0.01*(t-t6)
      y2=y1-0.008+0.16*(t-t6)
      z2=z1
      endif
      if(t7<t .and. t<t8)then
      x2=x1+0.002
      y2=y1
      z2=z1
      endif 
 
 |