Sunday, November 22, 2009

Fractal Viewer v0.1

This past week I sat at my desk and munched on a Subway meatball sandwich while browsing through Wikipedia.  I read an article on the Mandelbrot fractal, which I think is pretty darn neat.  So neat, in fact, that I started planning on programming my own real-time viewer of this impressive mathematical piece of artwork.  This came to some dismay of my coworkers (as my meatball sandwich contained an impressive amount of delicious but odoriferous peppers and onions) when I asked them questions like, "How does one solve (A + Bi)^0.5.  It was a legitimate question, though not one necessary for the computation of a fractal.  That's actually pretty easy.

And when I got home I started programming.  Feverishly.  I have been consumed by learning to develop in C# and in particular programming the GPU.  Along the way I discovered some of the shortcomings of the older shader models.  Of particular vexation is that the older shader models support only a very limited number of instructions on the GPU.  Relatively old video cards will support shader model 2.0.  This shader model has a maximum number of instructions on the GPU of 96.  I'm using 1296.  Oops.  Thus this program requires shader model 3.0 and a relatively newer video card.  Without it, the program just crashes.  Maybe I should introduce some sort of check to see if the user video card can support it?

Anyways: too many words, not enough pictures!




















The Mandelbrot Set





















And the Julia Set

Here's the download.  You'll also need the XNA runtime library.  Try it out.  But be sure to read the readme file.  It has instructions on how to zoom in and out as well as pan around.

Saturday, October 24, 2009

Structural Engineering Liscensing Exam

I took the SE1 exam yesterday and wanted to share my thoughts on it.  I can't actually talk about the questions themselves as NCEES requires all test-takers to sign a non-disclosure agreement swearing to not discuss the actual questions.  I can give, however, give my general impression on the exam.

Most of the questions were relatively straight forward and easy to figure out.  The practice exam tests that I studied with were loaded with trick questions and wording that was designed to trip you up.  The actual exam did not seem that way.  Exactly 20% of the questions in the morning and the afternoon were bridge related design problems.  Given that my experience is in buildings and I have zero non-school experience in designing bridges, I decided to just completely skip these problems and come back to them after I was finished with all of the other problems.  This worked well, as the 32 non-bridge problems took me about 2 hours to do.

I went back through the bridge questions and began working on them in the order of whichever one I thought was the easiest.  Most of these problems I was able to solve not through extensive studying of the code, but by flipping to the index and looking up keywords from the question.  This took me to the correct section in the code and I skimmed through it looking for the information needed to solve the problem.  My strategy was to focus hard on the materials I did know, and could know all of.  That's 80% of the exam (and probably a passing grade).  Any bridge question that I got correct was just a free gift.

My advice to anyone taking them exam:
  • Bring the codes.  All of them:
    • IBC 2006 (yes, I used it)
    • ASCE7-05
    • AISC 360-05 (Manual of Steel Construction)
    • AISC 341-05 (Seismic Spec)
    • ACI 318 (Concrete)
    • ACI 530 (Masonry)
    • 2005 NDS (Wood)
    • AASHTO Bridge Spec
  • Learn where things are in the code.  You don't have to memorize it, but know how they lay out appendices, commentary and the like.  You may need to use some of these.
    • Learn where everything is in Structural Engineers Reference Manual. It came in handy for the geotech, wood and a few bridge questions.
    • Learn the AISC Manual of Steel Construction!  I cannot emphasize this enough.  Non-composite steel member design in the AASHTO spec is identical to AISC.  The beam tables and equations for moments and deflections in common beam conditions is handy.  AISC also includes a large number of useful charts and figured behind the Misc. tab at the very end of the book.  Forget what the equation for moment of inertia of a cylinder is?  It's in the Misc section.
    • Don't bother studying bridges if you're not already familiar with them.  Unless you have a full-time job working with it, you'll never understand it well.  You're better off focusing your time on the building design materials you aren't familiar with.  Learn where things are in the bridge code.

    Friday, September 4, 2009

    VB bites the dust.

    So last week, in a fit of frustration, I switched from VB.net to XNA.  XNA (it's not an acronym) has a bunch of built-in tools for both 2D and 3D graphics.  I'm liking it so far.  I also have access to all of the direct3D 10 features as well.  Not that I can really use them: it's taken me a week just to write shaders that will do basic lighting operations.  And I don't even have shadows working yet.

    There's two ideas for games that I have that I would like to develop.

    1)  A tower defense game with a new twist.

    It's set in a post apocalyptic world where energy resources are scarce.  The player defends a high-tech civilization that dwells inside of a volcano.  The base of the volcano has been capped with a structure that draws power from the magma.  This provides all the power that the player needs to develop their civilization.  It's also under an extreme amount of pressure.

    The other civilizations in the world are just a little bit jealous of the sweet gig that the player has at the base of the volcano.  But they lack any sophisticated technology to take the volcano.  So they've taken to throwing large rocks and boulders down the volcano.  It's really not very nice.

    The player has a wide arsenal of weapons to either destroy the boulders or knock them back up and over the side of the volcano.

    2)  Hi-level strategy game set in the ancient world.  I'll have more on this later since it's a rather large topic.

    Sunday, August 23, 2009

    Game Development

    I've still been working on it, but I'm extremely dissastified with the top-down rpg idea. I think I'm going to try and change it into something that fits that style a bit better, like a space shooter or something. On the plus side, most the hard won methods I created would not need to be rewritten.

    Sunday, August 16, 2009

    I hate it.

    I hate my own game. How sad is that?

    Sunday, August 9, 2009

    Update without a screenshot

    No screenshot of the game today.

    Yesterday I implemented collision detection between characters. This wasn't as complicated as I thought it'd be. But now the rat will chase the player around and stop near him and the player can't actually enter the rats area.

    I also set the first action: attacking. There's currently a really terrible attack animation for the player that fires whenever the player presses the space bar. The scale of the "attack" and sword swinging is so off that I feel like I need to adjust the size of character sprites and/or use new textures for the character before continuing. It's distracting at the moment.

    Once I get that taken care of I can add in dealing damage to the rat (and attack radius, etc). This will build on the methods I already developed for collision detection.

    Then after that I need to start building an actual "level" with walls. That will allow me to do more complicated AI tasks such as LOS and path finding.

    Friday, August 7, 2009

    Update to project


    There's now a not-so-cute rat that chases after the player. Cut me some slack, I'm not an artist.

    Basic AI for chasing the player has been setup and works nicely. Now I just need to add the ability to attack (and more artwork showing this). I've also been completely unable to get this to work on anyone elses computer. I have a feeling it has something to do with the directX SDK.

    Thursday, August 6, 2009

    New Project


    It's a very simple game. The only buttons that do anything right now are WASD. And here's the download. It took me a year to figure out object oriented coding and the directx library. It took me about 5 hours to make this. The program needs directX and .NET 3.5 to run. Most windows installations should already have this.

    Tuesday, August 4, 2009

    Blog 2.0

    This blog has been upgraded to the obligatory 2.0.

    Woo.

    Yea, I'm even less excited than you are. But I am happy with the nifty links section to the comics I read on the right.

    Wednesday, March 18, 2009

    An Open Letter

    To Mr. Ross:

    I haven’t done any debunking in about a year. But imagine my surprise when I visited your website recently and found that you had finally crafted a “response” to my refutation of your “Moment Transfer in WTC1” “paper”. Please note the words that I have in quotations: response and paper. This is because I hold these items in contempt, not because they’re imaginary. I also find your lack of testicular fortitude contemptible. When in a lively internet discussion such as the one that we have had, try to have necessary courage to actually inform your opponent that you’ve said something. Otherwise it would appear (as it does now) that you’re afraid of a real response. Let’s take a look at what you’ve written and I’ll respond to it paragraph by paragraph.

    If only you could investigate 911 as thorough as you investigated my name.

    A few people have written to me over the past few months regarding an article by Mr. Trevor Self, from Albuquerque I believe, styling himself Newton’s Bit. Rather than continue to answer these individually it will save time and effort if this reply is placed on the web and freely available. I have not previously bothered to answer this article because I did not believe that anyone would be taken in by his rubbish, riddled as it is with very basic errors, but for those who have not studied the subject it may prove beneficial to have some of these errors explained. Firstly I will deal with the arithmetical errors, then I will explain the engineering errors.

    You’ve outed me! You have done a wonderful investigation and examined all the various clues I’ve left of myself over the internet and figured out my real name! I fear the massive unwashed hordes of Truthers hounding my every step. Or maybe I would, if I wasn’t sure that the hygiene-challenged Truthers were huddled in their parent’s basements playing the latest Halo game.

    First of all the conversion from degrees to radians used by Mr Self is incorrect. There are pi (3.142) radians in 180 degrees, except apparently in New Mexico. This introduces an error of 200%.

    You got me, an arithmetic error. I intended to use 30 degree angles (pi/6) but incorrectly used 15 degrees (pi/12). Unfortunately for you, 15 degrees still falls within the bounds of my “fudging”. You see, steel columns have ruptured by 8-12 degrees anyways. Let’s just call this one a wash. I made an error, but it doesn’t matter.

    There are four rotations in a three point buckle except in the mind of Mr Self who believes there are only three. A further error of 133%.

    Incorrect. This should be self-explanatory to an engineer, but I guess you didn’t have to take any Mechanics of Materials classes. Under an arbitrary amount of work, the top and bottom buckle points will rotate X degrees, however the middle one will rotate an angle of 2*X. Each buckle point absorbs the same amount of energy. Let me know if you need me to explain this further, it’s a tad bit complicated (I’m lying here: I’m trying to protect your feelings, it’s really not complicated at all).

    Mr Self uses a slenderness ratio which assumes that the columns in the towers were fitted with hinges on every storey. A casual glance at the towers proves this false, and the very fact that they stood for many years would help to confirm the non existence of these hinges. The error in slenderness ratio is 200%.

    Do not put words into my mouth, HVAC designer. I never said that the tower was fitted with hinges. I can only surmise that you are making the same basic mistake that Tony Szamboti made regarding the effective length factor “K”. Please see my response to him, I’m really getting tired of having to correct this insanely basic concept of engineering. Here’s the link.

    Educate yourself.

    Mr Self chooses to call himself Newton’s bit for some reason but his refusal to accept Newton’s laws would have that famous man turning in his grave. Isaac Newton, or “whirling Isaac” as he is now known told us that each action has an equal and opposite reaction, but Mr Self chooses to ignore this fact conveniently allowing him to understate the energies involved by half. An error of 200%.

    Hmm. I’m not sure how my handle has anything to do with what I write. Nor do I see where this “error” occurs as my paper only deals with recalculating things you did incorrectly.

    Mr. Self ignores the strengthening and bracing effect of the spandrel plates, core bracing, etc. The error is more difficult to quantify but is clearly significant. Why else would they have been included in the original design?


    The spandrel plates do not brace from buckling in a direction orthogonal to their length. They provide stiffness to in-plane forces (thus a moment frame) to deliver shear forces to the bottom of the structure. This is basic engineering mechanics. There is no excuse for not understanding this.

    These errors when combined add up to ridiculous. It is easy to see therefore why I have previously dismissed this article without much comment. The only interesting part of this episode has been the manner in which supporters of the official story have latched onto it. There are those without the specialised knowledge to judge, who have betrayed their own unthinking bias by adopting Mr Self’s article without question. More importantly there are those who are or claim to be engineers and who do or should have that specialised knowledge and yet they have allowed the article to stand and allowed

    Mr. Self to continue to embarrass himself, even when these most basic errors have been pointed out.
    I hope that this clears up a few issues for some people, but if questions continue then please do not hesitate to contact me.

    As an aside, I have always thought that the custom on the web of allowing everyone to choose their own nickname is a little bit strange. If this were the case in real life then all the Porkys and Kiffys of this world would be calling themselves Ace or Tiger. Mr Self, or Newton’s Bit, as he appears to prefer, is a definite case in point.

    You managed to find an arithmetic error (that's posted on the JREF forums) that doesn't actually change any results.  You also showed how ignorant you are of structural design.  Anyhoo, this has been pretty dang entertaining for me.  When you have more “problems” (this quotation is both for contempt and because it’s imaginary), please actually grow a pair and let me know about them instead of hiding it on your website.

    Cheers!
    Trevor Self

    P.S.  My middle name is Newton.  And my blog is my bit.  Hence: Newton's Bit.  Do you get it?