File:Riemann Integration and Darboux Upper Sums.gif

Riemann_Integration_and_Darboux_Upper_Sums.gif(800 × 600像素,文件大小:536 KB,MIME类型:image/gif、​循环、​8帧、​6.4秒)

摘要

描述
English: This function is y=x^2.
日期
来源

自己的作品

 
本GIF 位图使用Matplotlib创作.
作者 IkamusumeFan

许可协议

我,本作品著作权人,特此采用以下许可协议发表本作品:
w:zh:知识共享
署名 相同方式共享
您可以自由地:
  • 共享 – 复制、发行并传播本作品
  • 修改 – 改编作品
惟须遵守下列条件:
  • 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。
  • 相同方式共享 – 如果您再混合、转换或者基于本作品进行创作,您必须以与原先许可协议相同或相兼容的许可协议分发您贡献的作品。

Matplotlib (Python)

# Author: Ika, 2013-09-15

import numpy as np
import matplotlib.pyplot as plt
import scipy.special as sp
from matplotlib.patches import Polygon
import random                                                                        

fig=plt.figure()
ax = fig.add_subplot(111)

ax.set_xlim(0,2)
ax.set_ylim(0,4)

X = np.arange(0,2.01,0.01)
Y = X*X
# Plot the curve and area.
ax.plot(X, Y)

verts = [(0,0)] + zip(X,Y) + [(2,0)]
poly = Polygon(verts, facecolor='blue',alpha=0.5,edgecolor='blue')
ax.add_patch(poly)
plt.savefig("frame0100.jpg")

# Generate the files for the sums.
ord = 0;
while (ord<7):
	plt.clf()
	fig=plt.figure()
	ax = fig.add_subplot(111)
	interval = 1.0/(2**ord)
	ax.set_xlim(0,2)
	ax.set_ylim(0,4)

	X = np.arange(0,2.01,0.01)
	Y = X*X

	ax.plot(X, Y)
	ax.text(0.2,3.0,'Step=1/'+str(2**ord),size=36);
	x=interval;
	while (x<2+interval/2.0):
		verts = [(x-interval,0)]+[(x-interval,x*x)]+[(x,x*x)]+[(x,0)];
		poly = Polygon(verts, facecolor='blue', alpha=0.5,edgecolor='black')
		ax.add_patch(poly)
		x=x+interval;

	plt.savefig("frame00"+str(ord)+".jpg");
	
	ord = ord+1;

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2013年9月15日 (日) 06:062013年9月15日 (日) 06:06版本的缩略图800 × 600(536 KB)IkamusumeFanUser created page with UploadWizard

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件: