<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>男单 618 &#187; sage</title>
	<atom:link href="http://www.ai7.org/wp/html/category/sage/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ai7.org/wp</link>
	<description>生活象筒装的卫生纸，开始的时候怎么扯都不觉得在转，后来转的越来越快。</description>
	<lastBuildDate>Wed, 14 Jul 2010 13:24:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Sage绘制摆线动画</title>
		<link>http://www.ai7.org/wp/html/695.html</link>
		<comments>http://www.ai7.org/wp/html/695.html#comments</comments>
		<pubDate>Thu, 21 Jan 2010 14:23:22 +0000</pubDate>
		<dc:creator>amao</dc:creator>
				<category><![CDATA[sage]]></category>
		<category><![CDATA[动画]]></category>

		<guid isPermaLink="false">http://www.ai7.org/wp/?p=695</guid>
		<description><![CDATA[在Sage中绘制动画，实际上是先画出每一帧，再使用imagemagick将多幅图像转化为gif动画。先来看一个简单例子：
t,u=var(&#8216;t,u&#8217;)
cc=[point((cos(t),sin(t)),pointsize=30,rgbcolor='red')+parametric_plot((cos(u),sin(u)),(0,t)) for t in srange(0.01,2*pi,0.2)]
myan=animate(cc,xmin=-1.5, xmax=1.5,ymin=-1.5, ymax=1.5,aspect_ratio=1)
show(myan)
第2行中每帧图像由两部分组成，一是动点，二是圆弧。这里，srange函数中的初值不能取零，否则会出错。第3行中将绘图的坐标范围固定，如果不固定，Sage会将当前图像主体放置在图像中央，自动调整坐标轴的显示范围。这一特性在绘制静态图像时，非常有用，但这样得到的动画往往不是我们想要的。
下面来看圆摆线x=a*(u-sin(u)), y=a*(1-cos(u)),  0&#60;u&#60;2*pi的绘制：
u=var(&#8216;u&#8217;)
a=2
pic=[parametric_plot((a*(u-sin(u)),a*(1-cos(u))),(u,0,t),rgbcolor='red')\
+circle((a*t,a),a,rgbcolor='blue')\
+point((a*(t-sin(t)),a*(1-cos(t))),pointsize=20,rgbcolor='red')\
+line([(a*t,a),(a*(t-sin(t)),a*(1-cos(t)))],rgbcolor=&#8217;blue&#8217;) for t in srange(0.01,2*pi+0.1,0.2)]
bbb=animate(pic,xmin=-0.5,xmax=(2*pi+1)*a,ymin=-1, ymax=2*a+1,aspect_ratio=1)
show(bbb)

注：其他一些数学软件绘图时，如果不手工清除绘图区域，则上一个图像会保留下来，这与Sage的工作方式不同。Sage中的每一帧都是“全新”绘制的。
下面将其转化为交互式的图形：
@interact
def _(t=(0.01,2*pi,0.5)):
u=var(&#8216;u&#8217;)
a=2
pic=parametric_plot((a*(u-sin(u)),a*(1-cos(u))),(u,0,t),rgbcolor=&#8217;red&#8217;)\
+circle((a*t,a),a,rgbcolor=&#8217;blue&#8217;)\
+point((a*(t-sin(t)),a*(1-cos(t))),pointsize=20,rgbcolor=&#8217;red&#8217;)\
+line([(a*t,a),(a*(t-sin(t)),a*(1-cos(t)))],rgbcolor=&#8217;blue&#8217;)
show(pic,xmin=-0.5,xmax=(2*pi+1)*a,ymin=-1, ymax=2*a+1,aspect_ratio=1)

由于刷新的问题，更新不连贯，拖放之后，需要等一下。
]]></description>
			<content:encoded><![CDATA[<p>在Sage中绘制动画，实际上是先画出每一帧，再使用imagemagick将多幅图像转化为gif动画。先来看一个简单例子：</p>
<p>t,u=var(&#8216;t,u&#8217;)<br />
cc=[point((cos(t),sin(t)),pointsize=30,rgbcolor='red')+parametric_plot((cos(u),sin(u)),(0,t)) for t in srange(0.01,2*pi,0.2)]<br />
myan=animate(cc,xmin=-1.5, xmax=1.5,ymin=-1.5, ymax=1.5,aspect_ratio=1)<br />
show(myan)</p>
<p><a href="http://www.ai7.org/wp/wp-content/uploads/2010/01/yuan.gif"><img class="aligncenter size-full wp-image-696" title="yuan" src="http://www.ai7.org/wp/wp-content/uploads/2010/01/yuan.gif" alt="" width="484" height="484" /></a>第2行中每帧图像由两部分组成，一是动点，二是圆弧。这里，srange函数中的初值不能取零，否则会出错。第3行中将绘图的坐标范围固定，如果不固定，Sage会将当前图像主体放置在图像中央，自动调整坐标轴的显示范围。这一特性在绘制静态图像时，非常有用，但这样得到的动画往往不是我们想要的。</p>
<p>下面来看圆摆线x=a*(u-sin(u)), y=a*(1-cos(u)),  0&lt;u&lt;2*pi的绘制：</p>
<p>u=var(&#8216;u&#8217;)<br />
a=2<br />
pic=[parametric_plot((a*(u-sin(u)),a*(1-cos(u))),(u,0,t),rgbcolor='red')\<br />
+circle((a*t,a),a,rgbcolor='blue')\<br />
+point((a*(t-sin(t)),a*(1-cos(t))),pointsize=20,rgbcolor='red')\<br />
+line([(a*t,a),(a*(t-sin(t)),a*(1-cos(t)))],rgbcolor=&#8217;blue&#8217;) for t in srange(0.01,2*pi+0.1,0.2)]<br />
bbb=animate(pic,xmin=-0.5,xmax=(2*pi+1)*a,ymin=-1, ymax=2*a+1,aspect_ratio=1)<br />
show(bbb)</p>
<p><a href="http://www.ai7.org/wp/wp-content/uploads/2010/01/baixian.gif"><img class="aligncenter size-full wp-image-698" title="baixian" src="http://www.ai7.org/wp/wp-content/uploads/2010/01/baixian.gif" alt="" width="484" height="208" /></a></p>
<p>注：其他一些数学软件绘图时，如果不手工清除绘图区域，则上一个图像会保留下来，这与Sage的工作方式不同。Sage中的每一帧都是“全新”绘制的。</p>
<p>下面将其转化为交互式的图形：</p>
<p>@interact<br />
def _(t=(0.01,2*pi,0.5)):<br />
u=var(&#8216;u&#8217;)<br />
a=2<br />
pic=parametric_plot((a*(u-sin(u)),a*(1-cos(u))),(u,0,t),rgbcolor=&#8217;red&#8217;)\<br />
+circle((a*t,a),a,rgbcolor=&#8217;blue&#8217;)\<br />
+point((a*(t-sin(t)),a*(1-cos(t))),pointsize=20,rgbcolor=&#8217;red&#8217;)\<br />
+line([(a*t,a),(a*(t-sin(t)),a*(1-cos(t)))],rgbcolor=&#8217;blue&#8217;)<br />
show(pic,xmin=-0.5,xmax=(2*pi+1)*a,ymin=-1, ymax=2*a+1,aspect_ratio=1)</p>
<p><a href="http://www.ai7.org/wp/wp-content/uploads/2010/01/jiaohu.png"><img class="aligncenter size-full wp-image-702" title="jiaohu" src="http://www.ai7.org/wp/wp-content/uploads/2010/01/jiaohu.png" alt="" width="595" height="298" /></a></p>
<p>由于刷新的问题，更新不连贯，拖放之后，需要等一下。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ai7.org/wp/html/695.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用Sage绘制动画的一个例子</title>
		<link>http://www.ai7.org/wp/html/688.html</link>
		<comments>http://www.ai7.org/wp/html/688.html#comments</comments>
		<pubDate>Thu, 14 Jan 2010 17:29:02 +0000</pubDate>
		<dc:creator>amao</dc:creator>
				<category><![CDATA[sage]]></category>

		<guid isPermaLink="false">http://www.ai7.org/wp/?p=688</guid>
		<description><![CDATA[先把代码放在这里，有时间再解释：
t,u=var(&#8216;t,u&#8217;)
cc=[point((cos(t),sin(t)),pointsize=30,rgbcolor='red')+parametric_plot((cos(u),sin(u)),(0,t)) for t in srange(0.01,2*pi,0.2)]
myan=animate(cc,xmin=-1.5, xmax=1.5,ymin=-1.5, ymax=1.5)
show(myan)
]]></description>
			<content:encoded><![CDATA[<p>先把代码放在这里，有时间再解释：</p>
<p>t,u=var(&#8216;t,u&#8217;)<br />
cc=[point((cos(t),sin(t)),pointsize=30,rgbcolor='red')+parametric_plot((cos(u),sin(u)),(0,t)) for t in srange(0.01,2*pi,0.2)]<br />
myan=animate(cc,xmin=-1.5, xmax=1.5,ymin=-1.5, ymax=1.5)<br />
show(myan)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ai7.org/wp/html/688.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sage Tutorial中文版</title>
		<link>http://www.ai7.org/wp/html/682.html</link>
		<comments>http://www.ai7.org/wp/html/682.html#comments</comments>
		<pubDate>Sat, 09 Jan 2010 02:43:34 +0000</pubDate>
		<dc:creator>amao</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[sage]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.ai7.org/wp/?p=682</guid>
		<description><![CDATA[Sage Tutorial是一份快速了解Sage的入门文档，花了两周多的时间将其翻译为中文。但是“Some more advanced mathematics”一节没有翻译，因为完全不熟悉这一节所涉及到的内容。
第一次翻译开源软件的技术文档，水平有限，希望各位多提意见，任何方面的都可以。如果没有大的问题，大概一周后会向Sage开发组提交。
源文件使用Sphinx管理，PDF文件是由自动转换而来的LaTeX文件编译的，因此其中很多格式不符合中文的习惯。所以请大家先以HTML文件为准，最后发布前，我会手工调整LaTeX文件后再编译。
Email: amao@ai7.org
相关内容：翻译Sage文档的准备工作
Sage Tutorial 中文版rst源文件
Sage Tutorial 中文版（HTML）
Sage Tutorial 中文版（PDF）
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sagemath.org/doc/tutorial/index.html" target="_blank">Sage Tutorial</a>是一份快速了解<a href="http://www.sagemath.org" target="_blank">Sage</a>的入门文档，花了两周多的时间将其翻译为中文。但是“<a href="http://www.sagemath.org/doc/tutorial/tour_advanced.html" target="_blank">Some more advanced mathematics</a>”一节没有翻译，因为完全不熟悉这一节所涉及到的内容。</p>
<p>第一次翻译开源软件的技术文档，水平有限，希望各位多提意见，任何方面的都可以。如果没有大的问题，大概一周后会向Sage开发组提交。</p>
<p>源文件使用Sphinx管理，PDF文件是由自动转换而来的LaTeX文件编译的，因此其中很多格式不符合中文的习惯。所以请大家先以HTML文件为准，最后发布前，我会手工调整LaTeX文件后再编译。</p>
<p>Email: amao@ai7.org</p>
<p>相关内容：<a href="../html/658.html">翻译Sage文档的准备工作</a></p>
<p><a href="http://www.ai7.org/wp/wp-content/uploads/2010/01/rst.zip">Sage Tutorial 中文版rst源文件</a></p>
<p><a href="http://www.ai7.org/wp/wp-content/uploads/2010/01/html.zip">Sage Tutorial 中文版（HTML）</a></p>
<p><a href="http://www.ai7.org/wp/wp-content/uploads/2010/01/pdf.zip">Sage Tutorial 中文版（PDF）</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ai7.org/wp/html/682.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
