plot surface of cusp catastrophe (with gnuplot)

不羁的心 提交于 2020-01-04 07:03:04

问题


Is it possible to plot the surface of the Cusp Catastrophe with Gnuplot? Here's a comparable plot.

  • The catastrophe is mathematically described by: V = x^4 + a*x^2 + b*x (Wikipedia, see above)
  • The surface is describes by: 0 = a + b*y – y^3

I'm a gnu plot beginner, so I'd be really grateful for an example with source code.

(I study psychology and I need this plot for an essay about a clinical theory: the cusp catastrophe is used to describe changes of mood, that seem to appear more sudden and disruptive for depressive patients, compared to healthy persons.)


回答1:


I think the best way would be to generate a table of roots of the equation (outside of gnuplot) and then plot the table with splot. But you can get an approximation to what you want in gnuplot by trying

a=b=1
set para
set iso 30
set pm3d at s
set urange [-10:10]
set hidd
set view 47,192
splot a + u*v - b * v**3, u, v


来源:https://stackoverflow.com/questions/13330446/plot-surface-of-cusp-catastrophe-with-gnuplot

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!