资源简介
2017年美赛B题的程序,效果非常好,完美模拟道路上的车辆行驶以及堵车状况;
可以调整车流密度,和车辆的大小

代码片段和文件信息
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
fig = plt.figure()
def f(x y):
return np.sin(x) + np.cos(y)
x = np.linspace(0 2 * np.pi 120)
y = np.linspace(0 2 * np.pi 100).reshape(-1 1)
im = plt.imshow(f(x y) cmap=plt.get_cmap(‘viridis‘) animated=True)
def updatefig(*args):
global x y
x += np.pi / 15.
y += np.pi / 20.
im.set_array(f(x y))
return im
ani = animation.FuncAnimation(fig updatefig interval=50 blit=True)
plt.show()
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 533 2017-01-21 17:29 cellular\.idea\cellular.iml
文件 700 2017-01-21 17:29 cellular\.idea\misc.xm
文件 268 2017-01-20 23:42 cellular\.idea\modules.xm
文件 37486 2017-01-24 06:09 cellular\.idea\workspace.xm
文件 545 2017-01-21 00:49 cellular\animition_exm.py
文件 2450 2017-01-21 16:35 cellular\funcs.py
文件 3555 2017-01-21 16:28 cellular\funcs.pyc
文件 3903 2017-01-23 18:21 cellular\main.py
文件 707 2017-01-21 09:11 cellular\point.py
文件 1688 2017-01-21 16:27 cellular\point.pyc
文件 3522 2017-01-21 17:41 cellular\__pycache__\funcs.cpython-35.pyc
文件 1386 2017-01-21 17:41 cellular\__pycache__\point.cpython-35.pyc
目录 0 2017-01-24 06:09 cellular\.idea
目录 0 2017-01-21 17:41 cellular\__pycache__
目录 0 2017-01-23 18:21 cellular
----------- --------- ---------- ----- ----
56743 15
- 上一篇:Python二级考试试题.zip
- 下一篇:Python爬取教务系统课程表
相关资源
- 二级考试python试题12套(包括选择题和
- pywin32_python3.6_64位
- python+ selenium教程
- PycURL(Windows7/Win32)Python2.7安装包 P
- 英文原版-Scientific Computing with Python
- 7.图像风格迁移 基于深度学习 pyt
- 基于Python的学生管理系统
- A Byte of Python(简明Python教程)(第
- Python实例174946
- Python 人脸识别
- Python 人事管理系统
- 基于python-flask的个人博客系统
- 计算机视觉应用开发流程
- python 调用sftp断点续传文件
- python socket游戏
- 基于Python爬虫爬取天气预报信息
- python函数编程和讲解
- Python开发的个人博客
- 基于python的三层神经网络模型搭建
- python实现自动操作windows应用
- python人脸识别(opencv)
- python 绘图(方形、线条、圆形)
- python疫情卡UN管控
- python 连连看小游戏源码
- 基于PyQt5的视频播放器设计
- 一个简单的python爬虫
- csv文件行列转换python实现代码
- Python操作Mysql教程手册
- Python Machine Learning Case Studies
- python获取硬件信息
评论
共有 条评论