<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://www.penguindevelopment.org/index.php?action=history&amp;feed=atom&amp;title=Animated_3D_plotting_with_Blender</id>
	<title>Animated 3D plotting with Blender - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.penguindevelopment.org/index.php?action=history&amp;feed=atom&amp;title=Animated_3D_plotting_with_Blender"/>
	<link rel="alternate" type="text/html" href="https://www.penguindevelopment.org/index.php?title=Animated_3D_plotting_with_Blender&amp;action=history"/>
	<updated>2026-05-23T15:36:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://www.penguindevelopment.org/index.php?title=Animated_3D_plotting_with_Blender&amp;diff=219&amp;oldid=prev</id>
		<title>Link: /* Output video */</title>
		<link rel="alternate" type="text/html" href="https://www.penguindevelopment.org/index.php?title=Animated_3D_plotting_with_Blender&amp;diff=219&amp;oldid=prev"/>
		<updated>2016-11-09T15:15:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Output video&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:15, 9 November 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l383&quot;&gt;Line 383:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 383:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Output video=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Output video=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;html5media height=&amp;quot;270&amp;quot; width=&amp;quot;480&amp;quot;&amp;gt;File:Animated 3D plot.ogv&amp;lt;/html5media&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;html5media height=&amp;quot;270&amp;quot; width=&amp;quot;480&amp;quot;&amp;gt;File:Animated 3D plot.ogv&amp;lt;/html5media&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[File:Animated 3D plot.ogv]] / [http://www.penguindevelopment.org/images/8/88/Animated_3D_plot.ogv Animated_3D_plot.ogv]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Link</name></author>
	</entry>
	<entry>
		<id>https://www.penguindevelopment.org/index.php?title=Animated_3D_plotting_with_Blender&amp;diff=217&amp;oldid=prev</id>
		<title>Link: Change to first-level headers</title>
		<link rel="alternate" type="text/html" href="https://www.penguindevelopment.org/index.php?title=Animated_3D_plotting_with_Blender&amp;diff=217&amp;oldid=prev"/>
		<updated>2016-11-09T14:52:48Z</updated>

		<summary type="html">&lt;p&gt;Change to first-level headers&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:52, 9 November 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;= Important information &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Important information=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The script below has been tested with Blender 2.78a for Linux. It should generally be compatible with other versions and operating systems. The script works with the pristine Blender startup file; heavily modified startup files may break certain assumptions.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The script below has been tested with Blender 2.78a for Linux. It should generally be compatible with other versions and operating systems. The script works with the pristine Blender startup file; heavily modified startup files may break certain assumptions.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l12&quot;&gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Note that the animation data will not be saved with your .blend file!&amp;#039;&amp;#039;&amp;#039; This means you must run the Python script on a pristine &amp;quot;background&amp;quot; .blend file each time you wish to examine the geometry or create a render. If the .blend file is saved, only the first frame will be captured.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Note that the animation data will not be saved with your .blend file!&amp;#039;&amp;#039;&amp;#039; This means you must run the Python script on a pristine &amp;quot;background&amp;quot; .blend file each time you wish to examine the geometry or create a render. If the .blend file is saved, only the first frame will be captured.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;= The script &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=The script=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Code for &amp;lt;code&amp;gt;blenderplot-ani.py&amp;lt;/code&amp;gt; follows.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Code for &amp;lt;code&amp;gt;blenderplot-ani.py&amp;lt;/code&amp;gt; follows.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l381&quot;&gt;Line 381:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 381:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;= Output video &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Output video=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;html5media height=&amp;quot;270&amp;quot; width=&amp;quot;480&amp;quot;&amp;gt;File:Animated 3D plot.ogv&amp;lt;/html5media&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;html5media height=&amp;quot;270&amp;quot; width=&amp;quot;480&amp;quot;&amp;gt;File:Animated 3D plot.ogv&amp;lt;/html5media&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Link</name></author>
	</entry>
	<entry>
		<id>https://www.penguindevelopment.org/index.php?title=Animated_3D_plotting_with_Blender&amp;diff=215&amp;oldid=prev</id>
		<title>Link: Embed video with Html5mediator.</title>
		<link rel="alternate" type="text/html" href="https://www.penguindevelopment.org/index.php?title=Animated_3D_plotting_with_Blender&amp;diff=215&amp;oldid=prev"/>
		<updated>2016-11-09T14:26:28Z</updated>

		<summary type="html">&lt;p&gt;Embed video with Html5mediator.&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:26, 9 November 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l382&quot;&gt;Line 382:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 382:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Output video ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Output video ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/del&gt;File:Animated 3D plot.ogv&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;html5media height=&quot;270&quot; width=&quot;480&quot;&amp;gt;&lt;/ins&gt;File:Animated 3D plot.ogv&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/html5media&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Link</name></author>
	</entry>
	<entry>
		<id>https://www.penguindevelopment.org/index.php?title=Animated_3D_plotting_with_Blender&amp;diff=214&amp;oldid=prev</id>
		<title>Link: Created page with &quot;[https://www.blender.org/ Blender] is an extremely versatile 3D creation and animation suite. Since it is fully scriptable in [https://www.python.org/ Python], Blender may be...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.penguindevelopment.org/index.php?title=Animated_3D_plotting_with_Blender&amp;diff=214&amp;oldid=prev"/>
		<updated>2016-11-09T14:08:55Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;[https://www.blender.org/ Blender] is an extremely versatile 3D creation and animation suite. Since it is fully scriptable in [https://www.python.org/ Python], Blender may be...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[https://www.blender.org/ Blender] is an extremely versatile 3D creation and animation suite. Since it is fully scriptable in [https://www.python.org/ Python], Blender may be used to generate &amp;#039;&amp;#039;&amp;#039;animated 3-dimensional plots&amp;#039;&amp;#039;&amp;#039; of data or mathematical functions. Below is an example of one way to generate such a plot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Important information ==&lt;br /&gt;
The script below has been tested with Blender 2.78a for Linux. It should generally be compatible with other versions and operating systems. The script works with the pristine Blender startup file; heavily modified startup files may break certain assumptions.&lt;br /&gt;
&lt;br /&gt;
To run the script, simply call &amp;lt;code&amp;gt;blender --python blenderplot-ani.py&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create the plot in a different base file, instead use &amp;lt;code&amp;gt;blender basefile.blend --python blenderplot-ani.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
The order of arguments matters here.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note that the animation data will not be saved with your .blend file!&amp;#039;&amp;#039;&amp;#039; This means you must run the Python script on a pristine &amp;quot;background&amp;quot; .blend file each time you wish to examine the geometry or create a render. If the .blend file is saved, only the first frame will be captured.&lt;br /&gt;
&lt;br /&gt;
== The script ==&lt;br /&gt;
Code for &amp;lt;code&amp;gt;blenderplot-ani.py&amp;lt;/code&amp;gt; follows.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line&amp;gt;&lt;br /&gt;
#!/bin/true&lt;br /&gt;
# vim: se fo=tcroq tw=78 :&lt;br /&gt;
# Simple animated 3D plot example using Blender ( https://www.blender.org/ ).&lt;br /&gt;
# Given the function f(k, x, t)=exp(ikx-iωt), plots Re(f) against x and k,&lt;br /&gt;
# with colour given by Im(f) and t being the time.&lt;br /&gt;
#&lt;br /&gt;
# For pedagogical purposes, this just computes f at each frame (twice: once&lt;br /&gt;
# for the vertex positions and once for their colours). This is horribly&lt;br /&gt;
# inefficient; it would be much better to generate a 3D array for f(x, k, t)&lt;br /&gt;
# once and slice this array for each frame -- however, this is left as an&lt;br /&gt;
# exercise to the reader.&lt;br /&gt;
#&lt;br /&gt;
# To run, call&lt;br /&gt;
#   blender --python blenderplot-ani.py&lt;br /&gt;
&lt;br /&gt;
import os.path&lt;br /&gt;
&lt;br /&gt;
import numpy as np&lt;br /&gt;
&lt;br /&gt;
import bpy&lt;br /&gt;
&lt;br /&gt;
### Begin user settings&lt;br /&gt;
omega = 1&lt;br /&gt;
font = &amp;#039;/usr/share/fonts/cm-unicode/cmunti.ttf&amp;#039; # Must be a unicode font!&lt;br /&gt;
### End user settings&lt;br /&gt;
&lt;br /&gt;
### Begin generic Blender rendering code&lt;br /&gt;
# Global object counter.&lt;br /&gt;
obj_ind = 10000&lt;br /&gt;
&lt;br /&gt;
plot_id = None&lt;br /&gt;
&lt;br /&gt;
line_material = bpy.data.materials.new(&amp;#039;line&amp;#039;)&lt;br /&gt;
line_material.diffuse_color = (0, 0, 0)&lt;br /&gt;
line_material.diffuse_shader = &amp;#039;LAMBERT&amp;#039;&lt;br /&gt;
line_material.specular_color = (0, 0, 0)&lt;br /&gt;
line_material.specular_shader = &amp;#039;COOKTORR&amp;#039;&lt;br /&gt;
line_material.use_shadows = False&lt;br /&gt;
line_material.use_cast_shadows = False&lt;br /&gt;
line_material.use_raytrace = True&lt;br /&gt;
line_material.ambient = 0&lt;br /&gt;
&lt;br /&gt;
text_material = bpy.data.materials.new(&amp;#039;text&amp;#039;)&lt;br /&gt;
text_material.diffuse_color = (.15, .05, .035)&lt;br /&gt;
text_material.diffuse_shader = &amp;#039;OREN_NAYAR&amp;#039;&lt;br /&gt;
text_material.diffuse_intensity = .9&lt;br /&gt;
text_material.roughness = 2&lt;br /&gt;
text_material.specular_color = (.6, .2, .1)&lt;br /&gt;
text_material.specular_shader = &amp;#039;PHONG&amp;#039;&lt;br /&gt;
text_material.specular_hardness = 80&lt;br /&gt;
text_material.specular_intensity = .85&lt;br /&gt;
text_material.use_shadows = True&lt;br /&gt;
text_material.use_cast_shadows = False&lt;br /&gt;
text_material.use_raytrace = True&lt;br /&gt;
text_material.raytrace_mirror.use = True&lt;br /&gt;
text_material.mirror_color = (.7, .3, .15)&lt;br /&gt;
text_material.raytrace_mirror.reflect_factor = .3&lt;br /&gt;
text_material.emit = 0&lt;br /&gt;
text_material.ambient = 0&lt;br /&gt;
&lt;br /&gt;
plot_material = bpy.data.materials.new(&amp;#039;plot&amp;#039;)&lt;br /&gt;
plot_material.specular_color = (.5, .5, .5)&lt;br /&gt;
plot_material.specular_shader = &amp;#039;COOKTORR&amp;#039;&lt;br /&gt;
plot_material.specular_intensity = .2&lt;br /&gt;
plot_material.use_shadows = True&lt;br /&gt;
plot_material.use_transparent_shadows = True&lt;br /&gt;
plot_material.use_raytrace = True&lt;br /&gt;
plot_material.use_transparency = True&lt;br /&gt;
plot_material.transparency_method = &amp;#039;RAYTRACE&amp;#039;&lt;br /&gt;
plot_material.alpha = .95&lt;br /&gt;
plot_material.specular_alpha = 1&lt;br /&gt;
plot_material.raytrace_transparency.depth = 5&lt;br /&gt;
plot_material.use_vertex_color_paint = True&lt;br /&gt;
&lt;br /&gt;
text_font = bpy.data.fonts.load(os.path.abspath(os.path.expanduser(font)))&lt;br /&gt;
&lt;br /&gt;
def heatmap(heat):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;Heat map: given a &amp;quot;heat&amp;quot; between 0 and 1, return a tuple of RGB&lt;br /&gt;
    values.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    r = np.max((2*heat-1., 0))&lt;br /&gt;
    b = np.max((1.-2*heat, 0))&lt;br /&gt;
    return (r, 1.-r-b, b)&lt;br /&gt;
&lt;br /&gt;
def zheat(z, zmin, zmax, **kwargs):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;Colour a vertex based on its z-height compared to the minimum and&lt;br /&gt;
    maximum z-values that occur.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    return heatmap((z-zmin)/(zmax-zmin if zmin != zmax else 1))&lt;br /&gt;
&lt;br /&gt;
def plot_function(x, y, func, auto_axes = True, xmarks=None,&lt;br /&gt;
        ymarks = None, zmarks = None, labels = None, thickness = 0.025,&lt;br /&gt;
        text_rot = None, colourfunc=zheat, zmin = None, zmax = None):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;Plot the function (lambda) func of x and y. The resulting surface is&lt;br /&gt;
    smooth-shaded. Vertices may be coloured according to colourfunc: this is a&lt;br /&gt;
    function that accepts the following parameters and returns an RGB-tuple:&lt;br /&gt;
        x, y, z, xmin, xmax, ymin, ymax, zmin, zmax&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    global obj_ind, plot_id&lt;br /&gt;
&lt;br /&gt;
    ids = {&lt;br /&gt;
        &amp;#039;axes&amp;#039;: [],&lt;br /&gt;
        &amp;#039;axis_labels&amp;#039;: [],&lt;br /&gt;
        &amp;#039;xmarks&amp;#039;: [],&lt;br /&gt;
        &amp;#039;ymarks&amp;#039;: [],&lt;br /&gt;
        &amp;#039;zmarks&amp;#039;: [],&lt;br /&gt;
        &amp;#039;xlabels&amp;#039;: [],&lt;br /&gt;
        &amp;#039;ylabels&amp;#039;: [],&lt;br /&gt;
        &amp;#039;zlabels&amp;#039;: []&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if text_rot is None:&lt;br /&gt;
        text_rot = np.array((0, 0, 0))&lt;br /&gt;
&lt;br /&gt;
    if plot_id is None:&lt;br /&gt;
        obj_id = &amp;#039;plot_{}&amp;#039;.format(obj_ind)&lt;br /&gt;
        obj_ind += 1&lt;br /&gt;
        # Generate all vertices in the plot at z = 0&lt;br /&gt;
        verts = [(i, j, 0) for i in x for j in y]&lt;br /&gt;
        faces = []&lt;br /&gt;
        count = 0&lt;br /&gt;
        # Build faces from the vertices&lt;br /&gt;
        for i in range(len(y)*(len(x)-1)):&lt;br /&gt;
            if count &amp;lt; len(y)-1:&lt;br /&gt;
                faces.append((i, i+1, i+len(y)+1, i+len(y)))&lt;br /&gt;
                count += 1&lt;br /&gt;
            else:&lt;br /&gt;
                count = 0&lt;br /&gt;
&lt;br /&gt;
        # Create a mesh and an object at the origin&lt;br /&gt;
        mesh = bpy.data.meshes.new(obj_id)&lt;br /&gt;
        obj = bpy.data.objects.new(obj_id, mesh)&lt;br /&gt;
        obj.location = (0, 0, 0)&lt;br /&gt;
        bpy.context.scene.objects.link(obj)&lt;br /&gt;
        mesh.from_pydata(verts, [], faces)&lt;br /&gt;
        mesh.update(calc_edges=True)&lt;br /&gt;
&lt;br /&gt;
        # Create a new vertex colour map&lt;br /&gt;
        colours = obj.data.vertex_colors.new()&lt;br /&gt;
&lt;br /&gt;
        # Set material&lt;br /&gt;
        obj.data.materials.append(plot_material)&lt;br /&gt;
&lt;br /&gt;
        # Smooth-shade polygons&lt;br /&gt;
        for pol in obj.data.polygons:&lt;br /&gt;
            pol.use_smooth = True&lt;br /&gt;
    else:&lt;br /&gt;
        obj = bpy.data.objects[plot_id]&lt;br /&gt;
        colours = obj.data.vertex_colors.active&lt;br /&gt;
&lt;br /&gt;
    verts = obj.data.vertices&lt;br /&gt;
&lt;br /&gt;
    # Move vertices to their correct position&lt;br /&gt;
    for v in verts:&lt;br /&gt;
        v.co.z = func(v.co.x, v.co.y)&lt;br /&gt;
    obj.data.update(calc_edges=True)&lt;br /&gt;
&lt;br /&gt;
    sv = sorted([(v.co.x, v.co.y, v.co.z) for v in verts], key=lambda q: q[2])&lt;br /&gt;
&lt;br /&gt;
    # Colour vertices&lt;br /&gt;
    for pol in obj.data.polygons:&lt;br /&gt;
        for idx in pol.loop_indices:&lt;br /&gt;
            co = obj.data.vertices[obj.data.loops[idx].vertex_index].co&lt;br /&gt;
            colours.data[idx].color = colourfunc(x=co.x, y=co.y, z=co.z,&lt;br /&gt;
                xmin=np.min(x), xmax=np.max(x),&lt;br /&gt;
                ymin=np.min(y), ymax=np.max(y),&lt;br /&gt;
                zmin=sv[0][2], zmax=sv[-1][2])&lt;br /&gt;
&lt;br /&gt;
    if auto_axes and plot_id is None:&lt;br /&gt;
        # Axes&lt;br /&gt;
        ids[&amp;#039;axes&amp;#039;].append(add_line(np.array((min(x), min(y), 0)),&lt;br /&gt;
            np.array((max(x), min(y), 0)), thickness, False))&lt;br /&gt;
        ids[&amp;#039;axes&amp;#039;].append(add_line(np.array((max(x), min(y), 0)),&lt;br /&gt;
            np.array((max(x), max(y), 0)), thickness, False))&lt;br /&gt;
        ids[&amp;#039;axes&amp;#039;].append(add_line(&lt;br /&gt;
            np.array((min(x), min(y), sv[0][2] if zmin is None else zmin)),&lt;br /&gt;
            np.array((min(x), min(y), sv[-1][2] if zmax is None else zmax)),&lt;br /&gt;
            thickness, False))&lt;br /&gt;
        # Axis marks&lt;br /&gt;
        if xmarks is not None:&lt;br /&gt;
            for pos, label in xmarks:&lt;br /&gt;
                p = np.array((pos, min(y), 0))&lt;br /&gt;
                ids[&amp;#039;xmarks&amp;#039;].append(add_line(p,&lt;br /&gt;
                    p-np.array((0, 1.5*thickness, 0)), thickness, False))&lt;br /&gt;
                if label is not None and len(label) &amp;gt; 0:&lt;br /&gt;
                    ids[&amp;#039;xlabels&amp;#039;].append(add_text(&lt;br /&gt;
                        p-np.array((0, 7*thickness, 0)), label,&lt;br /&gt;
                        thickness, text_rot))&lt;br /&gt;
        if ymarks is not None:&lt;br /&gt;
            for pos, label in ymarks:&lt;br /&gt;
                p = np.array((max(x), pos, 0))&lt;br /&gt;
                ids[&amp;#039;ymarks&amp;#039;].append(add_line(p,&lt;br /&gt;
                    p+np.array((1.5*thickness, 0, 0)), thickness, False))&lt;br /&gt;
                if label is not None and len(label) &amp;gt; 0:&lt;br /&gt;
                    ids[ &amp;#039;ylabels&amp;#039;].append(add_text(&lt;br /&gt;
                        p+np.array((7*thickness, 0, 0)), label,&lt;br /&gt;
                        thickness, text_rot))&lt;br /&gt;
        if zmarks is not None:&lt;br /&gt;
            for pos, label in zmarks:&lt;br /&gt;
                p = np.array((min(x), min(y), pos))&lt;br /&gt;
                ids[&amp;#039;zmarks&amp;#039;].append(add_line(p,&lt;br /&gt;
                    p-np.array((1.5*thickness/np.sqrt(2),&lt;br /&gt;
                        1.5*thickness/np.sqrt(2), 0)), thickness, False))&lt;br /&gt;
                if label is not None and len(label) &amp;gt; 0:&lt;br /&gt;
                    ids[&amp;#039;zlabels&amp;#039;].append(add_text(&lt;br /&gt;
                        p-np.array((7*thickness, 7*thickness, 0))/np.sqrt(2),&lt;br /&gt;
                        label, thickness, text_rot))&lt;br /&gt;
&lt;br /&gt;
        # Axis labels&lt;br /&gt;
        if labels is not None:&lt;br /&gt;
            ids[&amp;#039;axis_labels&amp;#039;].append(add_text(&lt;br /&gt;
                np.array((max(x)+8*thickness, min(y), 0)),&lt;br /&gt;
                labels[0], 2*thickness, text_rot))&lt;br /&gt;
            ids[&amp;#039;axis_labels&amp;#039;].append(add_text(&lt;br /&gt;
                np.array((max(x), max(y)+8*thickness, 0)),&lt;br /&gt;
                labels[1], 2*thickness, text_rot))&lt;br /&gt;
            ids[&amp;#039;axis_labels&amp;#039;].append(add_text(&lt;br /&gt;
                np.array((min(x), min(y),&lt;br /&gt;
                    (sv[-1][2] if zmax is None else zmax) + 8*thickness)),&lt;br /&gt;
                labels[2], 2*thickness, text_rot))&lt;br /&gt;
&lt;br /&gt;
    if plot_id is None:&lt;br /&gt;
        plot_id = obj_id&lt;br /&gt;
&lt;br /&gt;
    ids[&amp;#039;plot&amp;#039;] = plot_id&lt;br /&gt;
&lt;br /&gt;
    return ids&lt;br /&gt;
&lt;br /&gt;
def add_text(r, text, size=0.025, rotation=None):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;Add text at the position r. Size is a relative parameter; use&lt;br /&gt;
    trial-and-error here.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    global obj_ind&lt;br /&gt;
    obj_id = &amp;#039;text_{}&amp;#039;.format(obj_ind)&lt;br /&gt;
    obj_ind += 1&lt;br /&gt;
    rot = [np.pi/2, 0, 0] if rotation is None else rotation.tolist()&lt;br /&gt;
    bpy.ops.object.text_add(location=r.tolist(), rotation=rot)&lt;br /&gt;
    obj = bpy.context.active_object&lt;br /&gt;
    obj.name = obj_id&lt;br /&gt;
    obj.data.name = obj_id&lt;br /&gt;
    obj.data.body = text&lt;br /&gt;
&lt;br /&gt;
    # Set the font&lt;br /&gt;
    obj.data.font = text_font&lt;br /&gt;
&lt;br /&gt;
    obj.data.offset_x = -2*size&lt;br /&gt;
    obj.data.offset_y = -2*size&lt;br /&gt;
    obj.data.shear = 0.0&lt;br /&gt;
    obj.data.size = 8*size&lt;br /&gt;
    obj.data.space_character = 1&lt;br /&gt;
    obj.data.space_word = 4*size&lt;br /&gt;
    obj.data.extrude = size/3&lt;br /&gt;
&lt;br /&gt;
    obj.data.materials.append(text_material)&lt;br /&gt;
&lt;br /&gt;
    return obj_id&lt;br /&gt;
&lt;br /&gt;
def add_line(r1, r2, w=0.01, rel_w=True):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;Add a &amp;quot;line&amp;quot; (cylinder) between the points r1 and r2. The width is&lt;br /&gt;
    either w (if rel_w is False) or w*|r2-r1| (if rel_w is True).&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    global obj_ind&lt;br /&gt;
    obj_id = &amp;#039;line_{}&amp;#039;.format(obj_ind)&lt;br /&gt;
    obj_ind += 1&lt;br /&gt;
    rc = (r2+r1)/2 # Centroid&lt;br /&gt;
    rr = r2-rc # Position of r2 relative to centroid&lt;br /&gt;
    r = np.sqrt(np.sum(rr**2))&lt;br /&gt;
    theta = np.arccos(rr[2]/r)&lt;br /&gt;
    phi = np.arctan2(rr[1], rr[0])&lt;br /&gt;
    bpy.ops.mesh.primitive_cylinder_add(vertices=16,&lt;br /&gt;
            radius=.5*w*(r if rel_w else 1), depth=2*r,&lt;br /&gt;
            location=rc.tolist(), rotation=(0, theta, phi))&lt;br /&gt;
    obj = bpy.context.active_object&lt;br /&gt;
    obj.name = obj_id&lt;br /&gt;
    for pol in obj.data.polygons:&lt;br /&gt;
        pol.use_smooth = True&lt;br /&gt;
    obj.data.materials.append(line_material)&lt;br /&gt;
&lt;br /&gt;
    return obj_id&lt;br /&gt;
### End generic Blender rendering code&lt;br /&gt;
&lt;br /&gt;
def frame_change(scene):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;Update the plot for a given frame.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    frame = min(max(scene.frame_current, 0), n_frames - 1)&lt;br /&gt;
    plot_function(x, k, funcgen(t[frame]), colourfunc=colgen(t[frame]))&lt;br /&gt;
    # Update the t-indicator&lt;br /&gt;
    bpy.data.objects[ttext_id].data.body = &amp;#039;t = {: &amp;gt;4.3f}&amp;#039;.format(t[frame])&lt;br /&gt;
&lt;br /&gt;
if __name__ == &amp;#039;__main__&amp;#039;:&lt;br /&gt;
    # Set up x, y and t data&lt;br /&gt;
    n_frames = 51&lt;br /&gt;
    nx = 101&lt;br /&gt;
    nk = 101&lt;br /&gt;
    xscale = 1/2&lt;br /&gt;
    kscale = 1/3&lt;br /&gt;
    zscale = 2&lt;br /&gt;
    x = np.linspace(0, 10, nx)*xscale&lt;br /&gt;
    k = np.linspace(0, 4*np.pi, nk)*kscale&lt;br /&gt;
    t = np.linspace(0, 10, n_frames)&lt;br /&gt;
&lt;br /&gt;
    # Function to plot&lt;br /&gt;
    func = lambda x, k, t: np.exp(1j*(k*x-omega*t))*zscale&lt;br /&gt;
    # Generator for plottable function f(x, k) at time t&lt;br /&gt;
    funcgen = lambda t: lambda x, k: np.real(func(x, k, t))&lt;br /&gt;
    # Colour generator&lt;br /&gt;
    colgen = lambda t: lambda x, y, **kwargs: \&lt;br /&gt;
            heatmap((np.imag(func(x, y, t))+1)/2)&lt;br /&gt;
&lt;br /&gt;
    # Absolute z range for axes&lt;br /&gt;
    azmin = -1*zscale&lt;br /&gt;
    azmax = 1*zscale&lt;br /&gt;
&lt;br /&gt;
    # Axis marks&lt;br /&gt;
    xmarks = [(i*xscale, str(i)) for i in range(1, 11)]&lt;br /&gt;
    kmarks = [(j*np.pi/2*kscale, &amp;#039;{}π/2&amp;#039;.format(j if j != 1 else &amp;#039;&amp;#039;) \&lt;br /&gt;
        if j % 2 == 1 else &amp;#039;{}π&amp;#039;.format(j // 2 if j != 2 else &amp;#039;&amp;#039;)) \&lt;br /&gt;
        for j in range(1, 9)]&lt;br /&gt;
    zmarks = [(z/10*zscale, str(z/10)) for z in range(-10, 12, 2)]&lt;br /&gt;
&lt;br /&gt;
    # Hide the 吸牛 splash screen&lt;br /&gt;
    bpy.context.user_preferences.view.show_splash = False&lt;br /&gt;
&lt;br /&gt;
    # Remove existing meshes&lt;br /&gt;
    for item in bpy.context.scene.objects:&lt;br /&gt;
        if item.type == &amp;#039;MESH&amp;#039;:&lt;br /&gt;
            bpy.context.scene.objects.unlink(item)&lt;br /&gt;
    for item in bpy.data.objects:&lt;br /&gt;
        if item.type == &amp;#039;MESH&amp;#039;:&lt;br /&gt;
            bpy.data.objects.remove(item)&lt;br /&gt;
    for item in bpy.data.meshes:&lt;br /&gt;
        bpy.data.meshes.remove(item)&lt;br /&gt;
&lt;br /&gt;
    # Set the camera position&lt;br /&gt;
    bpy.data.objects[&amp;#039;Camera&amp;#039;].location = (11, -6, 5.5)&lt;br /&gt;
    bpy.data.objects[&amp;#039;Camera&amp;#039;].rotation_euler = (1.1, 0, 0.8)&lt;br /&gt;
&lt;br /&gt;
    # Let all texts face the camera&lt;br /&gt;
    rot = np.array(bpy.data.objects[&amp;#039;Camera&amp;#039;].rotation_euler)&lt;br /&gt;
&lt;br /&gt;
    # Initial t=0 plot; this also sets up the axes.&lt;br /&gt;
    print(plot_function(x, k, funcgen(0),&lt;br /&gt;
        True, labels=(&amp;#039;x&amp;#039;, &amp;#039;k&amp;#039;, &amp;#039;z&amp;#039;), text_rot=rot, xmarks=xmarks,&lt;br /&gt;
        ymarks=kmarks, zmarks=zmarks, zmin=azmin, zmax=azmax,&lt;br /&gt;
        colourfunc=colgen(0)))&lt;br /&gt;
&lt;br /&gt;
    # Text label indicating current time&lt;br /&gt;
    ttext_id = add_text(np.array((5.6, -1.2, 0)), &amp;#039;t = {: &amp;gt;4.2f}&amp;#039;.format(0),&lt;br /&gt;
        size=0.05, rotation=rot)&lt;br /&gt;
&lt;br /&gt;
    # Set min/max/current frame&lt;br /&gt;
    bpy.data.scenes[&amp;#039;Scene&amp;#039;].frame_start = 0&lt;br /&gt;
    bpy.data.scenes[&amp;#039;Scene&amp;#039;].frame_end = n_frames - 1&lt;br /&gt;
    bpy.data.scenes[&amp;#039;Scene&amp;#039;].frame_current = 0&lt;br /&gt;
&lt;br /&gt;
    # Add frame change handler. This is what makes the animation happen!&lt;br /&gt;
    bpy.app.handlers.frame_change_pre.append(frame_change)&lt;br /&gt;
&lt;br /&gt;
    # Add some environment lighting&lt;br /&gt;
    wld = bpy.data.worlds[&amp;#039;World&amp;#039;]&lt;br /&gt;
    wld.light_settings.use_environment_light = True&lt;br /&gt;
    wld.light_settings.environment_energy = .5&lt;br /&gt;
&lt;br /&gt;
    # Add a white backdrop plane&lt;br /&gt;
    plane_material = bpy.data.materials.new(&amp;#039;backdrop&amp;#039;)&lt;br /&gt;
    plane_material.diffuse_color = (1, 1, 1)&lt;br /&gt;
    plane_material.use_shadeless = True&lt;br /&gt;
    bpy.ops.mesh.primitive_plane_add(location=(0, 0, -5))&lt;br /&gt;
    bpy.context.active_object.scale = (50, 50, 0)&lt;br /&gt;
    bpy.context.active_object.data.materials.append(plane_material)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Output video ==&lt;br /&gt;
[[File:Animated 3D plot.ogv]]&lt;/div&gt;</summary>
		<author><name>Link</name></author>
	</entry>
</feed>