<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:iweb="http://www.apple.com/iweb" version="2.0">
  <channel>
    <title>Thoughts from Ash</title>
    <link>http://www.ashley-mills.com/Home/Blog/Blog.html</link>
    <description>Some interesting bits and bobs</description>
    <generator>iWeb 3.0.1</generator>
    <image>
      <url>http://www.ashley-mills.com/Home/Blog/Blog_files/IMG_0217.jpg</url>
      <title>Thoughts from Ash</title>
      <link>http://www.ashley-mills.com/Home/Blog/Blog.html</link>
    </image>
    <item>
      <title>wow!</title>
      <link>http://www.ashley-mills.com/Home/Blog/Entries/2009/5/26_wow%21.html</link>
      <guid isPermaLink="false">9121a530-5fbc-48ee-986c-7b0abca00727</guid>
      <pubDate>Tue, 26 May 2009 11:49:22 +0100</pubDate>
      <description>&lt;a href=&quot;http://www.ashley-mills.com/Home/Blog/Entries/2009/5/26_wow%21_files/Picture%204.jpg&quot;&gt;&lt;img src=&quot;http://www.ashley-mills.com/Home/Blog/Media/object003_1.jpg&quot; style=&quot;float:left; padding-right:10px; padding-bottom:10px; width:358px; height:170px;&quot;/&gt;&lt;/a&gt;My two new iPhone apps were accepted into the store yesterday, and &lt;a href=&quot;../../Astro_Clash/main.html&quot;&gt;Astro Smash&lt;/a&gt; became my best seller overnight! After the failure of &lt;a href=&quot;../../DoubleFlip/main.html&quot;&gt;Double Flip&lt;/a&gt;, I was pretty sure that gaming wasn’t the way to go, so I’ve no idea where all the sales came from, and I figured that &lt;a href=&quot;../../Curry_Finder/main.html&quot;&gt;Curry Finder&lt;/a&gt; would be my money spinner. It looks like I was wrong. Let’s hope I can keep it up.</description>
      <enclosure url="http://www.ashley-mills.com/Home/Blog/Entries/2009/5/26_wow%21_files/Picture%204.jpg" length="27004" type="image/jpeg"/>
    </item>
    <item>
      <title>Keep 'em coming</title>
      <link>http://www.ashley-mills.com/Home/Blog/Entries/2009/5/19_Keep_em_coming.html</link>
      <guid isPermaLink="false">f94e3501-a1ba-482b-ba8b-f373ec9a1d34</guid>
      <pubDate>Tue, 19 May 2009 01:18:00 +0100</pubDate>
      <description>&lt;a href=&quot;http://www.ashley-mills.com/Home/Blog/Entries/2009/5/19_Keep_em_coming_files/IMG_0328.jpg&quot;&gt;&lt;img src=&quot;http://www.ashley-mills.com/Home/Blog/Media/object001_1.jpg&quot; style=&quot;float:left; padding-right:10px; padding-bottom:10px; width:358px; height:172px;&quot;/&gt;&lt;/a&gt;I submitted my fourth application to Apple for review last night, less than 2 months from my first approval. I was planning on one a month, so I’m pretty pleased with my progress so far. I’m even more pleased with my latest app, &lt;a href=&quot;../../Astro_Clash/main.html&quot;&gt;Astro Smash&lt;/a&gt;. It’s awesome! It took a while, and a bit of maths, but it plays perfectly. It’s similar in style to the 70s classic, Asteroids, but on steroids. Asteroidsteroids, sort of.&lt;br/&gt;&lt;br/&gt;The roll of honour so far:&lt;br/&gt;	•	&lt;a href=&quot;../../No_Chalk_Required/main.html&quot;&gt;No Chalk Required&lt;/a&gt;&lt;br/&gt;	•	&lt;a href=&quot;../../DoubleFlip/main.html&quot;&gt;Double Flip&lt;/a&gt;&lt;br/&gt;	•	&lt;a href=&quot;../../Curry_Finder/main.html&quot;&gt;Curry Finder&lt;/a&gt;&lt;br/&gt;	•	&lt;a href=&quot;../../Astro_Clash/main.html&quot;&gt;Astro Smash&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;</description>
      <enclosure url="http://www.ashley-mills.com/Home/Blog/Entries/2009/5/19_Keep_em_coming_files/IMG_0328.jpg" length="32404" type="image/jpeg"/>
    </item>
    <item>
      <title>DoubleTwist now in the App Store</title>
      <link>http://www.ashley-mills.com/Home/Blog/Entries/2009/4/24_DoubleTwist_now_in_the_App_Store.html</link>
      <guid isPermaLink="false">125a9202-504a-48fc-b057-4e6d56f51ea5</guid>
      <pubDate>Fri, 24 Apr 2009 10:52:06 +0100</pubDate>
      <description>&lt;a href=&quot;http://www.ashley-mills.com/Home/Blog/Entries/2009/4/24_DoubleTwist_now_in_the_App_Store_files/Picture%203.jpg&quot;&gt;&lt;img src=&quot;http://www.ashley-mills.com/Home/Blog/Media/object000_1.jpg&quot; style=&quot;float:left; padding-right:10px; padding-bottom:10px; width:358px; height:170px;&quot;/&gt;&lt;/a&gt;I’ve not had the official email from Apple yet but my new game, &lt;a href=&quot;../../DoubleFlip/main.html&quot;&gt;DoubleTwist&lt;/a&gt;, is now available on the app store.&lt;br/&gt;&lt;br/&gt;It’s catering to a little less of a niche market than &lt;a href=&quot;../../No_Chalk_Required/main.html&quot;&gt;No Chalk Required,&lt;/a&gt; so I’m hoping for big things!&lt;br/&gt;&lt;br/&gt;In the meantime, development of retro arcade style Astro Miner continues apace... I’m expecting to have something ready to test by the end of next week.</description>
      <enclosure url="http://www.ashley-mills.com/Home/Blog/Entries/2009/4/24_DoubleTwist_now_in_the_App_Store_files/Picture%203.jpg" length="32925" type="image/jpeg"/>
    </item>
    <item>
      <title>... and a torus too</title>
      <link>http://www.ashley-mills.com/Home/Blog/Entries/2009/4/17_..._and_a_torus_too.html</link>
      <guid isPermaLink="false">a4b94855-95fd-4d58-af8e-3bfa64233017</guid>
      <pubDate>Fri, 17 Apr 2009 12:43:36 +0100</pubDate>
      <description>&lt;a href=&quot;http://www.ashley-mills.com/Home/Blog/Entries/2009/4/17_..._and_a_torus_too_files/Picture%202.jpg&quot;&gt;&lt;img src=&quot;http://www.ashley-mills.com/Home/Blog/Media/object017.jpg&quot; style=&quot;float:left; padding-right:10px; padding-bottom:10px; width:358px; height:170px;&quot;/&gt;&lt;/a&gt;Following on from the previous post, here’s a similar function to create the points for a torus:&lt;br/&gt;&lt;br/&gt;GLfloat * createTorus (GLfloat aRadius, GLfloat bRadius, GLfloat step, int *pointCount)&lt;br/&gt;{&lt;br/&gt;    NSLog(@&amp;quot;Torus&amp;quot;);&lt;br/&gt;    GLfloat uStep = DEGREES_TO_RADIANS (step);&lt;br/&gt;    GLfloat vStep = uStep;&lt;br/&gt;&lt;br/&gt;    int totalPoints = ((2 * M_PI) / uStep) * ((2 * M_PI) / vStep) * 12.0 *1.5f;&lt;br/&gt;&lt;br/&gt;    GLfloat * torusPoints = calloc(totalPoints, sizeof(GLfloat));&lt;br/&gt;&lt;br/&gt;    int point = 0;&lt;br/&gt;&lt;br/&gt;    for (GLfloat u = 0.0f; u &amp;lt;= (2 * M_PI); u += uStep) {&lt;br/&gt;        for (GLfloat v = -M_PI; v &amp;lt;= M_PI; v += vStep) {&lt;br/&gt;&lt;br/&gt;            point++;&lt;br/&gt;		torusPoints[(point - 1) * 3] = (aRadius + bRadius * cosf(v)) * cosf(u);             // x&lt;br/&gt;		torusPoints[((point - 1) * 3) + 1] = (aRadius + bRadius * cosf(v)) * sinf(u);       // y&lt;br/&gt;		torusPoints[((point - 1) * 3) + 2] = bRadius * sinf(v);                             // z&lt;br/&gt;&lt;br/&gt;		point++;&lt;br/&gt;		torusPoints[(point - 1) * 3] = (aRadius + bRadius * cosf(v + vStep)) * cosf(u);&lt;br/&gt;		torusPoints[((point - 1) * 3) + 1] = (aRadius + bRadius * cosf(v + vStep)) * sinf(u);&lt;br/&gt;		torusPoints[((point - 1) * 3) + 2] = bRadius * sinf(v + vStep);         &lt;br/&gt;&lt;br/&gt;		point++;&lt;br/&gt;		torusPoints[(point - 1) * 3] = (aRadius + bRadius * cosf(v)) * cosf(u + uStep);&lt;br/&gt;		torusPoints[((point - 1) * 3) + 1] = (aRadius + bRadius * cosf(v)) * sinf(u + uStep);&lt;br/&gt;		torusPoints[((point - 1) * 3) + 2] = bRadius * sinf(v);&lt;br/&gt;&lt;br/&gt;		point++;&lt;br/&gt;		torusPoints[(point - 1) * 3] = (aRadius + bRadius * cosf(v + vStep)) * cosf(u + uStep);&lt;br/&gt;		torusPoints[((point - 1) * 3) + 1] = (aRadius + bRadius * cosf(v + vStep)) * &lt;br/&gt;                                                 sinf(u + uStep);&lt;br/&gt;		torusPoints[((point - 1) * 3) + 2] = bRadius * sinf(v + vStep);&lt;br/&gt;        }&lt;br/&gt;	}&lt;br/&gt;&lt;br/&gt;	*pointCount = point;&lt;br/&gt;&lt;br/&gt;	return torusPoints;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;There’s something not quite right with the calculation of totalPoints though (hence the 1.5 multiplier), so if you figure it out, please let me know :-)</description>
      <enclosure url="http://www.ashley-mills.com/Home/Blog/Entries/2009/4/17_..._and_a_torus_too_files/Picture%202.jpg" length="34008" type="image/jpeg"/>
    </item>
    <item>
      <title>How to draw a sphere in 3D    </title>
      <link>http://www.ashley-mills.com/Home/Blog/Entries/2009/4/16_How_to_draw_a_sphere_in_3D____.html</link>
      <guid isPermaLink="false">d5db71d3-3097-42e9-b1ad-17938a194af3</guid>
      <pubDate>Thu, 16 Apr 2009 00:35:02 +0100</pubDate>
      <description>&lt;a href=&quot;http://www.ashley-mills.com/Home/Blog/Entries/2009/4/16_How_to_draw_a_sphere_in_3D_____files/Picture%202.jpg&quot;&gt;&lt;img src=&quot;http://www.ashley-mills.com/Home/Blog/Media/object018.jpg&quot; style=&quot;float:left; padding-right:10px; padding-bottom:10px; width:358px; height:170px;&quot;/&gt;&lt;/a&gt;Working through the &lt;a href=&quot;http://www.starstonesoftware.com/OpenGL/&quot;&gt;OpenGl SuperBible&lt;/a&gt;, and converting the examples for the iPhone, I came across a problem – the book’s use of GLUT makes sphere drawing a simple task. Just a quick call to glutSolidSphere and it’s done. This, of course, isn’t available on the iPhone, so I needed to figure out some way create a sphere myself. Maybe my Googling ability isn’t up to par, but I struggled to find much useful info out there... I guess most other people have GLUT to rely on.&lt;br/&gt;&lt;br/&gt;Luckily though, I do have a copy of Kreyszig’s &lt;a href=&quot;http://www.amazon.com/Advanced-Engineering-Mathematics-Erwin-Kreyszig/dp/0471154962&quot;&gt;Advanced Engineering Mathematics&lt;/a&gt; gathering dust on a shelf, and page 493 gave me:&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;which translates into:&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;The tricky bit was figuring out the path for the triangle strips, but a bit of trial and error gave me the following:&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Source for exercises up to 4.1 here: &lt;a href=&quot;http://files.me.com/ashleymills/jg2uam&quot;&gt;files.me.com/ashleymills/jg2uam&lt;/a&gt;.&lt;br/&gt;</description>
      <enclosure url="http://www.ashley-mills.com/Home/Blog/Entries/2009/4/16_How_to_draw_a_sphere_in_3D_____files/Picture%202.jpg" length="31755" type="image/jpeg"/>
    </item>
  </channel>
</rss>
