[关闭]
@Zemel-Yang 2016-11-13T12:16:24.000000Z 字数 2402 阅读 1117

Exercise 8: Period Doubling

python homework


Abstruct

In this excercise, we will discuss chaos further —— the period doubling phenomenon. Change the values of the drive amplitude , the pendulum period will also change. We still use the Poincare section to analyze the relation between and . Bifucation diagram is also included.

Introduction and Background

In mathematics, particularly in dynamical systems, a bifurcation diagram shows the values visited or approached asymptotically (fixed points, periodic orbits, or chaotic attractors) of a system as a function of a bifurcation parameter in the system. It is usual to represent stable values with a solid line and unstable values with a dotted line, although often the unstable points are omitted. Bifurcation diagrams enable the visualization of bifurcation theory.

Animation showing the formation of bifurcation diagram.
Animation showing the formation of bifurcation diagram.

Content

  1. from visual import*
  2. from math import *
  3. scene.height,scene.width,scene.center=500,500,(0,-15,0)
  4. L=9.8
  5. r=2
  6. t=0
  7. dt=0.04
  8. g = 9.8
  9. w = 1
  10. q = 0.5
  11. F = 1.4 #1.44,1.465
  12. i= 0
  13. theta=0.2
  14. bracket=box(pos=(0,0.6*(-L-r),-2.5),length=1,width=0.5,height=25,material=materials.wood,color=color.yellow)
  15. seat=box(pos=bracket.pos-(0,bracket.height/2.0,-2.5),length=20,width=12,height=1,material=materials.marble,color=(200,256,256))
  16. cylinder(pos=(0,0,0.5),axis=(0,0,-3),radius=0.3)
  17. f=frame()
  18. ball=sphere(frame=f,pos=(L*sin(theta),-L*cos(theta),0),radius=r,material=materials.earth,color=color.orange)
  19. rope=cylinder(frame=f,pos=(0,0,0),axis=ball.pos,radius=0.2,material=materials.rough,color=(0.5,0.,0.5))
  20. while True:
  21. rate(25)
  22. theta=theta+w*dt
  23. f.rotate(origin=(0,0,0),axis=(0,0,1),angle=w * dt)
  24. t = t + dt
  25. w = w - (math.sin(theta) + q*w - F * math.sin(2.0/3*t)) * dt


此处输入图片的描述


此处输入图片的描述


此处输入图片的描述


此处输入图片的描述
此处输入图片的描述


此处输入图片的描述
此处输入图片的描述


此处输入图片的描述
此处输入图片的描述

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注