如何在Maple中修复这两个有角度的边界

时间:2018-03-19 18:29:29

标签: python matlab maple wave

我在Maple上完成了这个动画。我希望在某一点上遇到的双方都能得到解决。其他两个直边也是一样的。是否有可能在Maple中,如果没有,是否可以在MatLab中进行以及如何实现?

with(plots):
animate(plot3d,[sin(Pi*(t-x))*sin(Pi*y)*Heaviside(t-x)-sin(Pi*(t+x))*sin(Pi*y)*Heaviside(t+x),x=0..4,y=piecewise(x>=0 and x<2,1/2-x/4,0)..piecewise(x>=0 and x<2,1/2+x/4,1)],t=-2*Pi..2*Pi, frames=90);

非常感谢。

Image on what it look like at t=0 in Maple

1 个答案:

答案 0 :(得分:0)

原作,

with(plots):

animate(plot3d,
    [sin(Pi*(t-x))*sin(Pi*y)*Heaviside(t-x)
     -sin(Pi*(t+x))*sin(Pi*y)*Heaviside(t+x),
     x=0..4,
     y=piecewise(x>=0 and x<2,1/2-x/4,0)
       ..piecewise(x>=0 and x<2,1/2+x/4,1)],
    t=-2*Pi..2*Pi, frames=90);

enter image description here

这就是你要追求的吗?

with(plots):

adjustor:=sin(Pi*piecewise(x>=0 and x<2,(y-1/2)/(x/2)+1/2,y)):

animate(plot3d,
        [sin(Pi*(t-x))*adjustor*Heaviside(t-x)
         -sin(Pi*(t+x))*adjustor*Heaviside(t+x),
         x=0..4,
         y=piecewise(x>=0 and x<2,1/2-x/4,0)
           ..piecewise(x>=0 and x<2,1/2+x/4,1)],
         t=-2*Pi..2*Pi, frames=45);

enter image description here