Being a Wizard

It recently came to my attention that one thing I truly lacked in life was a wizard hat. Aside from the fact that it complements my crazy hair, it also sounded like a fun project.

The fun part about this was the mix of skills. I sew on occasion, but haven’t done much with leather. I also happened to have a bunch of leather lying around, but no pattern. I decided to use a method a friend of mine uses for stuffed animals – model the item in blender3d, unwrap the texture UVs, and use that as a pattern.3457It worked flawlessly, especially considering I really didn’t like any of the hats on google images. After scaling the picture and printing out the pieces, I cut out the leather and sewed it all together with a simple cross stitch. The whole process took two evenings, but the end result is pretty epic.22046949_10212555959352028_1496685822161072134_n

As a bonus, I play as a warlock in D&D so now I have something to wear every time.

Advertisements

atan() vs. atan2()

Math can be fun, and occasionally challenging. When trying to calculate the angle a character is facing relative to the rotation of a camera and the joystick input from a controller, headaches are born.

One might say, “Hey, let’s use trig.” Cool. find slope based on XY coordinates, and plug that into an arctan function to figure out radians. Multiply that by some stuff and get degrees. Flawless.

Even better, one may realize, “Wow, C++ has an atan() function built in! Neato!” And one would be correct.

However, when one applies said flawless, perfect math to this application, they may find that for half of the joystick rotation, it works just as planned. Up makes the character go forward, left goes left, right goes right, down goes up… and now one might pull their hair out for three hours straight, wondering what isn’t working correctly.

Long story short, atan() calculates the radians from the slope in quadrants 1 and 4 of a 2d plane. atan2(), however, calculates within all four quadrants, and was the solution to all of my problems.

Thorough description: https://stackoverflow.com/questions/283406/what-is-the-difference-between-atan-and-atan2-in-c

Long live thorough documentation.3457

First Steps

Creating a wordpress website was overall fairly intuitive. The domain availability lookup was fairly slow, and made me wonder if it was even working at first. Also, the verification email to confirm my address took forever to actually send. Then I realized that UWSP’s email filtering service was actually holding the confirmation email from going to my inbox. Most of the time spent on this was me trying to figure that out.

Selecting a template was a bit confusing, as there is a “customize” button next to “Themes”, with no clear indication that “Themes” itself was a button. Overlapping buttons are annoying and that particularly annoyed me.

Adding a widget was pretty easy, the hardest part was deciding what widget to add since most have very specific uses. I settled for a random picture I had in my drive. I have no regrets.