<?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>3D rotation | Learn C Games Programming Blog</title>
	<atom:link href="https://learncgames.com/tag/3d-rotation/feed/" rel="self" type="application/rss+xml" />
	<link>https://learncgames.com</link>
	<description>A blog about C, programming games and my ebook(s).</description>
	<lastBuildDate>Fri, 15 Jan 2021 10:18:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://learncgames.com/wp-content/uploads/2020/03/cropped-favicon-32x32.png</url>
	<title>3D rotation | Learn C Games Programming Blog</title>
	<link>https://learncgames.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">181446779</site>	<item>
		<title>Doing 3D Math(s) in C</title>
		<link>https://learncgames.com/doing-3d-maths-in-c/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=doing-3d-maths-in-c</link>
		
		<dc:creator><![CDATA[David]]></dc:creator>
		<pubDate>Sat, 16 Jan 2021 00:00:24 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Techniques]]></category>
		<category><![CDATA[3D rotation]]></category>
		<guid isPermaLink="false">https://learncgames.com/?p=2409</guid>

					<description><![CDATA[<p>If you&#8217;re interested in seeing how 3D math(s) are done, this article by ex Googler Andy Sloane is about a program he wrote called donut.c. The name is doubly appropriate as not only is the source code shaped like a Donut (doughnut for us Brits), when run on Linux, it outputs an animated 3D donut. [&#8230;]</p>
The post <a href="https://learncgames.com/doing-3d-maths-in-c/">Doing 3D Math(s) in C</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></description>
										<content:encoded><![CDATA[<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:247,&quot;href&quot;:&quot;https:\/\/www.a1k0n.net\/2006\/09\/15\/obfuscated-c-donut.html&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260204124427\/https:\/\/www.a1k0n.net\/2006\/09\/15\/obfuscated-c-donut.html&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 13:07:03&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 15:13:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-15 23:31:08&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-19 21:28:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-23 12:24:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-02 11:43:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-06 16:48:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-10 02:18:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-14 16:28:01&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 21:02:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-26 22:11:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-02 10:05:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-07 18:47:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-11 06:50:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-15 14:28:20&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-20 05:28:18&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-25 19:02:44&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-25 19:02:44&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:248,&quot;href&quot;:&quot;https:\/\/www.a1k0n.net\/2021\/01\/13\/optimizing-donut.html&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20251225052914\/https:\/\/www.a1k0n.net\/2021\/01\/13\/optimizing-donut.html&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 13:07:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 17:39:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-15 23:31:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-19 21:28:40&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-23 12:24:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-02 11:43:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-07 13:44:09&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-10 17:43:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-16 14:27:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-23 14:30:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-26 22:11:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-03 00:55:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-07 18:47:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-12 20:32:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-16 08:10:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-20 05:28:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-25 19:02:44&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-25 19:02:44&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:249,&quot;href&quot;:&quot;https:\/\/www.a1k0n.net\/2011\/07\/20\/donut-math.html&quot;,&quot;archived_href&quot;:&quot;http:\/\/web-wp.archive.org\/web\/20260109171108\/https:\/\/www.a1k0n.net\/2011\/07\/20\/donut-math.html&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-06 13:07:45&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 17:39:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-15 23:31:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-19 21:28:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-23 12:24:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-02 11:43:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-07 13:44:09&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-10 17:43:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-16 14:27:47&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-23 14:30:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-26 22:11:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-03 00:55:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-07 18:47:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-12 20:32:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-16 08:10:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-20 05:28:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-25 19:02:43&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-25 19:02:43&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'></div>
<p><img fetchpriority="high" decoding="async" class="alignleft size-medium wp-image-2410" src="https://learncgames.com/wp-content/uploads/2021/01/donut.c-300x266.png" alt="Donuts.c" width="300" height="266" srcset="https://learncgames.com/wp-content/uploads/2021/01/donut.c-300x266.png 300w, https://learncgames.com/wp-content/uploads/2021/01/donut.c.png 473w" sizes="(max-width: 300px) 100vw, 300px" />If you&#8217;re interested in seeing how 3D math(s) are done, <a title="Link to original Donut.c article" href="https://www.a1k0n.net/2006/09/15/obfuscated-c-donut.html" target="_blank" rel="nofollow noopener">this article</a> by ex Googler Andy Sloane is about a program he wrote called donut.c. The name is doubly appropriate as not only is the source code shaped like a Donut (<em>doughnut for us Brits</em>), when run on Linux, it outputs an animated 3D donut. This was an attempt at obfuscated C back in 2006.</p>
<p>Now 15 years later <a title="Link to blog entry to new Donuts.c" href="https://www.a1k0n.net/2021/01/13/optimizing-donut.html" target="_blank" rel="nofollow noopener">he&#8217;s updated it</a> to work without using the math library. Interesting is the explanation of how he did all the mathematics without using sin and cos directly. Also it includes a version that uses 10 bit integer arithmetic; no floats at all. If you&#8217;re interested in understanding how Donuts.c works, read <a title="Link to blog post about how Donuts.,c works" href="https://www.a1k0n.net/2011/07/20/donut-math.html" target="_blank" rel="nofollow noopener">this post</a> from 2011.</p>
<p>I like articles like this- they&#8217;re a bit different and add to programming knowledge. and you can never get enough of that</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>The post <a href="https://learncgames.com/doing-3d-maths-in-c/">Doing 3D Math(s) in C</a> first appeared on <a href="https://learncgames.com">Learn C Games Programming Blog</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2409</post-id>	</item>
	</channel>
</rss>
