正文
方便计算,这里让(omega_0=1)
便于理解,(x= heta,y=dot{x}=omega)
于是
(frac{dx}{dt}=y\frac{dy}{dt}=-sin(x))
Vector field里面写这个
// p.x and p.y are current coordinates
// v.x and v.y is a velocity at point p
vec2 get_velocity(vec2 p) {
vec2 v = vec2(0., 0.);
// change this to get a new vector field
v.x = p.y;
v.y =-sin(p.x);
return v;
}
录了个视频
<iframe src="//player.bilibili.com/player.html?aid=713586465&cid=280516393&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" width="95%" height="450">
</iframe>
参考
https://wenku.baidu.com/view/e0f43d3e4973f242336c1eb91a37f111f1850dce.html 单摆运动相图
https://www.cnblogs.com/artoriax/p/10364915.html 博客内插入bilibili视频