问题
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