<?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>Trevor Pythagoras Maths &#187; computing</title>
	<atom:link href="http://trevorpythag.co.uk/tag/computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://trevorpythag.co.uk</link>
	<description>Maths help and revision for GCSE, A/AS Level and Further Maths</description>
	<lastBuildDate>Wed, 25 Jan 2012 07:42:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>3D Graphics</title>
		<link>http://trevorpythag.co.uk/2008/compting/3d-graphics/</link>
		<comments>http://trevorpythag.co.uk/2008/compting/3d-graphics/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 17:16:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Compting]]></category>
		<category><![CDATA[Juggling]]></category>
		<category><![CDATA[3D graphics]]></category>
		<category><![CDATA[computing]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[maths]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://trevorpythag.wordpress.com/?p=85</guid>
		<description><![CDATA[Explanation or derivation of 3D graphics equations.]]></description>
			<content:encoded><![CDATA[<p style="text-align:right;"><strong>Now at <a title="Breakingwave - 3D grpahics" href="http://breakingwave.hyperphp.com/breakingwave/master.php?page=3dgrpahic.php&amp;grp=maths">www.breakingwave.co.nr</a> &#8211; the home of trevorpythag</strong></p>
<p>This is a brief explanation of how to create basic 3D graphics. There are many different packages that will allow you to program using pre written 3D graphics library&#8217;s, such as Java 3D but this is aimed at using and understanding the actual formula that can be used to draw the graphics yourself.</p>
<p>This assumes you are looking straight ahead from a single point and will map points in the 3D space in front of you onto a single plane at a fixed distance in front of you, probably 1 unit to keep it simple.</p>
<p>First of all consider the vertical direction, y axis. If we consider the right angled triangle formed by taking the line from you eye to the  point, the line from your eye to beneath the point (ie the line where y =0) and the final verical equal to the y cordinate, we can use trigonometry to work out the height that need to be displayed.</p>
<p>From this we can work out the angle at your eye would be tan<sup>-1</sup>(y/(x<sup>2</sup>+z<sup>2</sup>))<br />
This is because the length of the &#8220;opposite&#8221; is equal to the y co-ordinate and the adjacent can be found using pythagoras from the x and z co-ordinates.</p>
<p>We now can use the angle we have found to work out where the point needs to be displayed in our plane. Again we need to form a triangle similar to the first one but where the top corner is the final position of the point when it is projected. Ie the opposite is the y co-ordinate we need.<br />
therefore,<br />
y = tan(t)((x/z)<sup>2</sup>+1)<br />
y=<span style="text-decoration:underline;">y((x/z)<sup>2</sup>+1)</span><br />
(x<sup>2</sup>+z<sup>2</sup>)</p>
<h3  class="related_post_title">Also see</h3><ul class="related_post"><li><a href="http://trevorpythag.co.uk/2009/mathematics/geometry/area-of-a-triangle/" title="Area of a Triangle">Area of a Triangle</a> (3)</li><li><a href="http://trevorpythag.co.uk/2009/mathematics/number-theory/proof-by-contradiction/" title="Proof by Contradiction">Proof by Contradiction</a> (0)</li><li><a href="http://trevorpythag.co.uk/2009/mathematics/trigonometry/auxiliary-angle-method-for-solving-trigonometry-equations/" title="Auxiliary Angle Method for Solving Trigonometry Equations">Auxiliary Angle Method for Solving Trigonometry Equations</a> (0)</li><li><a href="http://trevorpythag.co.uk/2009/mathematics/number-theory/rational-and-irrational-numbers/" title="Rational and Irrational Numbers">Rational and Irrational Numbers</a> (5)</li><li><a href="http://trevorpythag.co.uk/2009/mathematics/algebra/how-to-use-surds-add-multiply-and-rationalise/" title="How to use Surds &#8211; Add, Multiply and Rationalise">How to use Surds &#8211; Add, Multiply and Rationalise</a> (1)</li><li><a href="http://trevorpythag.co.uk/2009/mathematics/mechanics/moments-turning-forces/" title="Moments &#8211; Turning Forces">Moments &#8211; Turning Forces</a> (6)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://trevorpythag.co.uk/2008/compting/3d-graphics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL: mysql dump &gt; using to upload database</title>
		<link>http://trevorpythag.co.uk/2008/compting/mysql-mysql-dump-using-to-upload-database/</link>
		<comments>http://trevorpythag.co.uk/2008/compting/mysql-mysql-dump-using-to-upload-database/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 17:24:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Compting]]></category>
		<category><![CDATA[computing]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://trevorpythag.wordpress.com/?p=69</guid>
		<description><![CDATA[I recently created a website in PHP, with page details stored in a database using MySQL and then came acorss a problem when trying to upload it. Basically mysqldump is a command that allows creates a file which contains all the sql statements required to rebuild the database or table you want. This is usefull [...]]]></description>
			<content:encoded><![CDATA[<p>I recently created a website in PHP, with page details stored in a database using MySQL and then came acorss a problem when trying to upload it.</p>
<p>Basically mysqldump is a command that allows creates a file which contains all the sql statements required to rebuild the database or table you want. This is usefull for creating backups or allowing you to upload your database to your host server.</p>
<p>The command to do this is as follows<br />
<strong>mysqldump &#8211;user=username &#8211;password=password databasename &gt; locationofdump.sql</strong></p>
<p>Note this should be entered in the normal command prompt, cmd.exe on windows, not the mysql command line tool thingy else it wont work. You can then use this to import the database on your host using phpmyadmin.</p>
<h3  class="related_post_title">Also see</h3><ul class="related_post"><li><a href="http://trevorpythag.co.uk/2008/compting/3d-graphics/" title="3D Graphics">3D Graphics</a> (0)</li><li><a href="http://trevorpythag.co.uk/2008/compting/basic-arithmatic-in-binary/" title="Basic Arithmatic in Binary">Basic Arithmatic in Binary</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://trevorpythag.co.uk/2008/compting/mysql-mysql-dump-using-to-upload-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic Arithmatic in Binary</title>
		<link>http://trevorpythag.co.uk/2008/compting/basic-arithmatic-in-binary/</link>
		<comments>http://trevorpythag.co.uk/2008/compting/basic-arithmatic-in-binary/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 17:29:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Compting]]></category>
		<category><![CDATA[addition]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[binary addition]]></category>
		<category><![CDATA[binary arithmatic]]></category>
		<category><![CDATA[computing]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[subtraction]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://trevorpythag.wordpress.com/?p=29</guid>
		<description><![CDATA[This is a simple guide in using binary and performing simple arithmetic like addition and subtraction What is Binary Binary is an alternative number system that uses base 2, opposed to our normal system that uses base 1. Binary is used extensively in computers as it allows numbers to be represented by a current being [...]]]></description>
			<content:encoded><![CDATA[<p>This is a simple guide in using binary and performing simple arithmetic like addition and  subtraction</p>
<p><b>What is Binary</b></p>
<p>Binary is an alternative number system that uses base 2, opposed to our normal system that uses base 1. Binary is used extensively in computers as it allows numbers to be represented by a current being on or off and therefore allowing them to do calculations.</p>
<p><b>Counting in binary</b></p>
<p>In base 10, our usual number system, we have 10 characters (0,1,2,&#8230;,9), and when we want to add 1 to our last character, 9, we have to move across to the next colloum, ie 9 + 1 = 0 carry 1. In binary we have 2 characters (0 and 1) and when we want to add one to one we move to the next colloum, so 1+1=0 carry 1.</p>
<p>so how do we read the binary number. Well on the far right we have our units (1&#8242;s) the same as in bas 10, however the next colloum across we have our 2&#8242;s instead of tens. Then we have 4&#8242;s instead of 100&#8242;s. So each collum is the next power of 2 across.</p>
<p>here are some numbers in binary and decimal(base 10):</p>
<p>decimal:binary<br />
1 = 1<br />
2 = 10 * 2<sup>1</sup><br />
3 = 11<br />
4 =100 * 2<sup>2</sup><br />
5 = 101<br />
6=110<br />
7 = 111<br />
8=1000 * 2<sup>3</sup><br />
9=1001<br />
10=1010 *10<sup>1</sup><br />
15=1111<br />
16=10000 * 2<sup>4</sup><br />
20=10100<br />
100=1100100 * 10<sup>2</sup></p>
<p><b>Adding in binary</b></p>
<p>In binary each number is either a 1 or 0, so if we have a 1 and we want to add 1 we have to put 0 and carry 1 to the next colloum.</p>
<p>eg 1+ 1 = 0 carry 1 = 10<br />
eg 11011+10010 = 101101</p>
<p>In binary there are four combinations of digits that can be added</p>
<p>0+0 = 0<br />
1+0=1<br />
0+1=1<br />
1+1=0 carry 1</p>
<p>You can add binary numbers in collums like you do with decimals, only it so much easier cos its only 1 and 0.</p>
<p><b>Subtraction</b></p>
<p>Subtraction is just the reverse of addtion so:</p>
<p>1-0=1<br />
1-1=0<br />
0-1= 0 carry 1 (to the left this time)<br />
0-0=0 (obviously)</p>
<h3  class="related_post_title">Also see</h3><ul class="related_post"><li><a href="http://trevorpythag.co.uk/2008/compting/3d-graphics/" title="3D Graphics">3D Graphics</a> (0)</li><li><a href="http://trevorpythag.co.uk/2011/mathematics/vectors/writing-vectors-in-component-form/" title="Writing Vectors in component form">Writing Vectors in component form</a> (0)</li><li><a href="http://trevorpythag.co.uk/2010/mathematics/vectors/an-introduction-to-vectors/" title="An introduction to vectors">An introduction to vectors</a> (0)</li><li><a href="http://trevorpythag.co.uk/2009/mathematics/geometry/area-of-a-triangle/" title="Area of a Triangle">Area of a Triangle</a> (3)</li><li><a href="http://trevorpythag.co.uk/2009/mathematics/number-theory/proof-by-contradiction/" title="Proof by Contradiction">Proof by Contradiction</a> (0)</li><li><a href="http://trevorpythag.co.uk/2009/mathematics/trigonometry/auxiliary-angle-method-for-solving-trigonometry-equations/" title="Auxiliary Angle Method for Solving Trigonometry Equations">Auxiliary Angle Method for Solving Trigonometry Equations</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://trevorpythag.co.uk/2008/compting/basic-arithmatic-in-binary/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

