Welcome, mortal, to my Unholy Cathedral-- BWHAHAHAHAHA--*ahem*. I am Friar Tom, and this is my little workshop. Here I study various topics of interest, from anime drawing to 3d game programming. In my travels, I have learned many interesting things, and there are so many more yet to discover!
These are exciting times in which we live: personal compueters and the Internet are combining to change our lives in innumerable ways. The potential of these new technologies is staggering, and the best part is: anyone can get in on ground-zero! If you want to help the Internet grow, create some really amazing stuff, and have great fun while doing so, you have come to the right place.
Here I will be posting my insights and discoveries in the areas of computer graphics programming and anime-style drawing. Mark my words--these two disciplines have more in common than you might think! The two go together like salt and french fries.
Disappointed at the lack of zen-based instruction on the art of programming and drawing, I have taken it upon myself to compile information that may prove useful to the graphics programmer and artist alike. May this site inspire you to seek the Truth.
-- Thomas G. WeeksEver since I began learning about computers at the tender age of 9, I've always sensed a certain aura of mystery about them. I remember writing programs in 10th grade to scan all the hardware port addresses for signs of life; I felt like a SETI operator waiting for an intelligent signal to bounce back. I remember when I first learned how to scan memory, how I'd stare at the RAM dumps for hours trying to gleen some special information from the inscrutable code.
My curiosity was insatiable, and I dug deeper and deeper into the inner-workings of the machine, peeling away layer after layer until I finally hit solid rock: the hardware. At last I could go no further without getting into the realm of electrical engineering. At last I understood--at least in theory--how all aspects of the IBM personal computer worked, from the BIOS routines all the way up to the DOS command prompt. It was a sobering moment.
But times change. DOS is dead, and when it died, most of my hard-earned knowledge suddenly became obsolete. Of course I knew DOS was on its way out when I began my quest; I just had to know how it worked before it left. Now that it's demise is official, it's time to move on. While I was so busy learning about the XT architecture, something called the World Wide Web popped up out of nowhere and suddenly everyone is throwing around acronyms like HTML, CSS, XML, DHTML, ASP, PHP, CGI, SQL, and other funny words I didn't understand. One thing is clear: there is a lot of money to be made if you know even a little bit about these funny words. Quickly, I replaced all my DOS books with WWW books, and the new millenium began.
My sojourn into the Underworld of programming taught me that software is best understood in terms of abstraction layers. Computer hardware is very complex, and performing even the simplest task like plotting a pixel or reading a keystroke requires many many steps of machine language. Kernel designers hide these details by condensing all the steps into a smaller number of simple functions: Plot_Pixel(), Read_Keystroke() etc. Then GUI designers can write a function like Draw_Window() that uses many Plot_Pixel()s and other functions to do its job. Then application programmers can write games that use many Draw_Window()s to perform something even MORE complicated, and so on and so forth, ad infinitum. The same principal can be extended to the Internet. The web browser is in the application layer, and the web document floats above the whole mess.
When I started learning about computers, it seemed to me the best way to go was from the bottom up, starting at the lowest levels of software and working up the abstraction chain until you got to wheverever we are today. Now I see that actually the only sane way to do it (unless you're an electrical engineer) is to start at the top and go down. Start at the most abstract, simplest level, and then peel away as much as you need until you satisfy your curiosity. Otherwise, you waste a lot of time learning low-level stuff that, while interesting, is not always necessary for the task at hand.
Therefore, I'm going to write this stuff down in the order I wish I'd followed when I started learning it: top to bottom. But while we're diving, we mustn't forget to come up for air from time to time to make sure we aren't missing anything!
Having said that, we're ready to get started. The first stop on our voyage into the heart of the computer is the most visible face of the Internet: The World Wide Web.
From a user's perspective, the WWW is nothing more than a bunch of webpages connected through clickable hypertext links. Of course there are about a million little details that make it all happen, but we have to start somewhere. Most people know that webpages are written in a simple language called HTML, and everybody from grandmas to little kids are learning it and writing their own little homepages. If you don't know HTML yet, now is the time! It's very easy to learn, and even if you don't intend to make a webpage, there are many benefits to knowing how to write it, including greater control over your message-board posts, and a plethora of interesting tricks you can use when writing HTML-based email.
HTML and it's big brother XML are descended from the mark-up language mother tongue, SGML. As far as I can tell, SGML is an ultra-generic language used for defining more specific mark-up languages. HTML and XML are thus termed "SGML applications". You can get really deep into this mark-up language stuff if you want (I was surprised at how much there is to know!), but we won't do so here because SGML is pretty useless in the real world. Some would say that learning HTML is also a waste of time since there are many fine HTML generators out there to do the work for you, from the humble Netscape Composer to the much more elaborate Adobe GoLive and the extremely cool Macromedia Dreamweaver. These applications are very handy indeed, and can save you a lot of time in layout and making image maps (not to mention managing large websites). Nevertheless, if you want maximum control over your webdesign, you need to learn HTML; it's as simple as that.
Even if you have no programming experience whatsoever, HTML is a breeze. I won't go into the basics since there's so many other sites already explaining it. But I will note that many such sites are a wee bit dated (still talking about HTML 3.0!), and may encourage bad programming practices that are obsolete now in the age of Style Sheets and XML.
I do all my mark-up in XHTML 1.0 Strict. Why? Because it's going to replace HTML very soon. By using it now, we get a jump on the newest trends in web design, including XML-browser compatability and greater portability with embedded browsers in cell-phones, PDAs, and the like. As an added bonus, XHTML code is perfectly readable by HTML 4-compliant browsers (provided a few simple guidelines are followed).
The rules for XHTML are much more consistant than those for HTML. My skeleton for a simple XHTML document looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link href="stylesheetname.css" rel="stylesheet" type="text/css" />
<meta lang="en-us" name="Author" content="Your Name" />
<title>Title goes here...</title>
</head>
<body>
Stuff goes here...
</body>
</html>
The first line is an XML declaration: you don't need it, but it's highly recommended you leave
it there for the benefit of the XML browsers of the future. The rest is the usual HTML boilerplate.
If you're wondering about the <LINK>
tag and the strange <META>
above it, it's for declaring external stylesheets (which
is always a good idea). We'll get more into those later on...
As you can see, XHTML is pretty much the same as HTML 4.01. In fact, they're almost exactly identical! XHTML (the "X" stands for "eXtensable") is really just HTML re-written in XML. HTML was originally written in big bulky SGML, but in the interests of making it simpler and more portable, the W3C redefined the whole language in smaller, sleeker XML so that it wouldn't be quite so akward to work with. There are many other more compelling reasons for the rewrite, but for now just think of XHTML as a special style of writing HTML so that it's more portable with the browsers of the future.
<p><b>Hello!</b></p>
<-- Note that we close the <b> before the <p>.META
and BR
. For those guys do something like this: <br />
<img width="300" height="400" src="blabla.jpg" />
These are all good practices to follow when writing HTML as well, so it's a good idea to get in the habit of coding this way.
No discussion on mark-up languages would be complete without a tag reference. The tags used in XHTML are, of course, the same ones used in HTML 4, and you can see the entire list at the W3C homepage. The list is quite long, and there are several tags and attributes that are of dubious value indeed. Therefore, in the interests of saving you some time, I have compiled a reference of all the tags that I thought were worthwhile. I've removed all the deprecated tags and attributes that are going out of style, and instead I'm only going to list the stuff that will be most compatable in the years ahead.
<html>
: This tag is the root of every XHTML document.
<head>
: Document Header
<title>
: Every XHTML document must have a title.
<meta http-equiv name content scheme>
: Generic meta-information.
http-equiv:
HTTP response header name
name:
meta-information name
content:
associated information
scheme:
select form of content
<body onload onunload>
: Generic meta-information.
onload:
document has been loaded
onunload:
The document has been removed