File: henon.ode

package info (click to toggle)
plotutils 2.6-15
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,040 kB
  • sloc: ansic: 68,670; sh: 20,086; cpp: 12,382; yacc: 2,588; makefile: 838; lex: 137
file content (29 lines) | stat: -rw-r--r-- 662 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# You may run this example by doing:
#
#    ode < henon.ode | graph -T X -C
# 
# or alternatively, to get a real-time plot,
#
#    ode < henon.ode | graph -T X -C -x -0.6 0.6 -y -0.6 0.6
#

# This example shows a simple center with complicated orbits:
# the system investigated by Henon and Heiles.
# The Poincare plot is a graph of p1(t) vs. q1(t).

# Initial condations:
# stable:    p1 = 1/3, q1 = 1/4, p2 = 0.1293144, q2 = 1/5
# unstable:  p1 = 0.1, q1 = 0.1, p2 = 0.467618,  q2 = 0.1

qone' = pone
qtwo' = ptwo
pone' = -qone - 2*qone*qtwo
ptwo' = -qtwo - qone*qone + qtwo*qtwo

pone = 1/3
qone = 1/4
ptwo = 0.1293144
qtwo = 1/5

print pone, qone
step 0,250