“Let there be a firmament in the midst of the waters, and let it divide the waters from the waters.”


Previous algorithm 1
Originally uploaded by ad_havoc


Previous algorithm 2
Originally uploaded by ad_havoc

Since I now have a better algorithm for random points on a sphere, I redid my program. I can’t do a distribution test like I previously did, so instead I’ll just generate some maps and compare them.

Here are two made with the old algorithm.



New algorithm 1
Originally uploaded by ad_havoc


New algorithm 2
Originally uploaded by ad_havoc

Here are two made with the new algorithm.

Don’t pay too close attention to the amount of land visible. I may need to monkey with the sea level settings.



You can clearly see the improvements.

Yeah, you’re right. I can’t see any difference either. But trust me! The code is much cooler.

Ponderables

Maybe I should buy a new car. I don’t really care for the stations my car’s radio is tuned to. I mean, they were fine nine years ago, but lately they haven’t been that good.

Earth Hour Update

So that was Earth hour.
I have learned that I really depend on electricity for my entertainment and well being. I turned off the laptop and all the lights. And then the boredom set in quickly. There really wasn’t anything for me to do. I obviously couldn’t do computer work. I couldn’t clean up my home because it was too dark. Reading a book? You need light to do that as well.
So as an event, it felt like I’ve lost an hour of my life that I’m not getting back.
However, I did find a solution. I had a flashlight that is totally green. It doesn’t use batteries, instead you wind it up and it stays lit for quite some time. (It is dangerous for me to hold, because my hands always like to be doing something, and so I’ll start winding it for no good reason.)
I started reading a book with the flashlight sitting on my shoulder. And that is how I spent my Earth hour.

Money in and money out

I had an avoidable purchase today. I got my hair cut. It wasn’t an emergency; I could have waited two weeks before getting it. But that would have been unethical. I made the appointment two months ago, and it is a nice luxury to have a good haircut.
It does mean I have to be even more careful about my spending habits. I only have a bit more than a week to go.
I do have other luxuries. I saw a play today. They don’t take credit cards, so I’m not breaking any goals by doing that. It wasn’t that good a play though. But that might be because I found it depressing, and I like more comedy in my theatre. What did I expect from a play based around three funerals.
A part of me is thinking of selling my scooter. It is fun to drive, but is it worth the money I paid to get it and pay to upkeep it? I don’t like selling things. It makes me feel like I am admitting that it was bad to purchase it. That is probably why I still have the same car after nearly ten years.
The scooter doesn’t save me any money. I’ve noticed that it has the same gas mileage as my car. That sounds weird, but I think it has to do with the car being able to add efficiencies due to its size. And I drive like a maniac, which probably takes more gas out of the scooter than is wise.

Dietary requirements

When I came back from visiting my parents, I didn’t have a chance to go grocery shopping. So yesterday I ran out of milk. This meant that for breakfast I had oatmeal. I like oatmeal on days that I am running because it doesn’t bounce in your stomach. However, it also digests very easily, which causes me problems when I’m not running.
Since it is out of my stomach so quickly, I get hungry earlier. So I have to move all my meals up. Also, I don’t think it has as much nutrition. In the afternoon I ran out of energy; Lethargic for the rest of the day. I tried to eat more for dinner, but by then it was too late. I went to bed early and conked out.
I need to go on a diet.
However, I need to do it in the strictest sense of the word. Basically, to change my eating habits. I need to eat more. Much more. With all the running I do, I’m burning off calories faster than I can put them on.
I am not a fan of eating. I do enjoy a good meal, but I also don’t mind skipping a meal if I am not hungry. Most Saturdays are without lunch for myself.
I heard that people have stopped listening to their body and can’t tell when they are thirsty any more. I don’t have a that problem; I have a hunger problem.
Right now I am ignoring my body. I should be making a dinner.

Google comes to the rescue

I’m feeling pretty stupid. I’ve been struggling with calculus to try and figure out the best way to randomly pick a point on a sphere. And then today I find a web page entirely devoted to the subject. It even has formulas that are far more convenient than what I was trying to come up with.
Hooray for math and the internet.

Sphere map test

I got back to my map generating program. I decided to check my algorithm for making maps on a sphere. I was always a little concerned about it. A big part of the operation is based off of finding a random point on the surface of a sphere.

The way I was doing it was based off of the methodology of the rest of the algorithm. Essentially I was taking a random point in a cube and projecting that on to the sphere in question. For the most part that is good. But is it really random? I had a theory that it wasn’t, so I devised a test. I ran the program again, but this time I took out the random element. I went through almost every point within the cube and used that as a projection. Then it generated a map from using all of those points. If my random method was good, then the map would be completely uniform. There would be no mountains and no oceans. But that wasn’t the case. Instead the map looked like this:


Sphere map test
Originally uploaded by ad_havoc

White indicates higher elevations and black is lower. So we can see that there is clumping at what would be the corners of the cube and along the edges. Just as I suspected.
So now I have to use a different method.

I can’t just use random latitude and longitude because that would cause clumping at the poles. (If you think about it, the north and south poles would be just as likely to be chosen as the equator, despite being vastly different in size.)
However, I think I can use something like it. I just have to compensate for it. For this I will need to try and remember how to use calculus to come up with a formula. Finally university math is going to be useful.

Mountains of Madness

I did some running today and it was glorious. I’m visiting my parent’s near the Kananaskis. I left their place this morning and went to the highway and then started running. It is hilly so I got some good training in that way.
The first part was somewhat boring. There was a nice valley immediately, but after that it were a lot of long straightaways in the trees. It would have been nice to have been listening to my iPod at that point, but that probably isn’t the safest thing to do when you are effectively playing in traffic. When I passed Bragg Creek, the mountains opened themselves up to me and I had no need of distraction.
Luckily my family had driven ahead to take the dog for a walk in the park. So at the end of my run I got a ride back home.

Swag!

I did my run today, focusing on speed work instead of hills. In theory I will do hills when I am in the mountains this Easter, visiting the family.
At the store though there was a celebration. Well, there was supposed to be. Except the mayor was running late, so all the groups left before we even knew he would be there.
But, the important thing, more important than meeting political figures and watching them accept giant checks, is loot! A clerk at the store was handing out free double guest passes to an advance screening of Run Fatboy Run. So, next Thursday I get to go see a comedy about running. Woot!

I was there!

For movie night I saw The Transporter. No one else showed up, so I watched it by myself. That was probably a good thing because I didn’t find it that good.
My main complaint was the plot. I will admit it was only there to hang the action scenes off of. But it stretched credibility. The characters never seemed to be consistent. That girl, was frankly annoying.
The best part was the opening scene. It looked familiar. Then I realized that the promenade they were driving around is the same one I smeared myself on. I guess that is the benefit of being a world traveler. You get to recognize places in movies.

Footloose and financial free

Lately I’ve been locking myself up in my home on the weekends. Except for the regularly scheduled activities (running, brunch) I’ve been playing computer games. And as I am wont to do, I am playing an old game. Diablo 2 reminds me on every startup that it was made in 2001. Hopefully I will finish it one of these days.
This has helped me in my plan to conserve finances. If I don’t leave the house, it is harder to spend money.
I actually used my credit card for the first time today. I went to the after-run brunch at a restaurant. This is regularly scheduled, so it is an approved expense, but I need to keep these as minimal as possible. It has actually been ten days since this exercise started, so I think I’m doing well. (Ten days since my credit card statement starts, which is the limiting factor I’m working on.)
I do see some charges coming up when I drive to Calgary to visit family. Gas isn’t free.

Teaching the body

If I wake up early, I usually don’t have any luck falling back asleep. I lie there and pretend to sleep.
This morning when I woke up too early I decided to teach my body a lesson. I got out of bed, and went for a run on the treadmill.
That’ll teach it.
Maybe next time it will appreciate sleeping.

Gluttony vs. Sloth

I’m not gorging myself enough. I need to eat more.
I’m sure this is a problem many other people would like to have.
After the really long run yesterday, I made some french toast. Then I went off to go gaming with some friends. While I was out I had a small dinner. When I got back at around 9:00 I was hungry. But I was also lazy. I went to bed on an empty stomach.
I have now fallen behind in my eating. I’ve had all my regular meals but I’m always feeling hungry early for them. What I really need to do is eat a huge meal and get myself back on track.
Or realize that I do have plenty of food in my fridge; Many of which can be cooked quickly in case of laziness.

So what do you call me now? Deathier?

So, I am officially “Goofy” because of the Disneyworld marathon. But I can be even stupider.
There is also the Death Race. We runners are an easily influenced bunch. One of us had the idea of doing the entire race. Solo. Get together a bunch of people and all try to stick together and finish it. 125 km over (not around) three mountain peaks. One other guy fell for this, so then there were two. They quickly got a third. And now they are all eyeing me. And I’ve been telling them that it would be stupid to do it. (It doesn’t help that they all agree.) I told the original instigator that I haven’t signed up.
But that is a lie. I signed up two weeks ago, but he is apparently too lazy to look at the official registry where I’m one of the first names you see. The second runner saw it promptly and called me an “idiot”. But he was away this week.
So it was amusing to watch the other two try to goad me to sign up. They kept saying how humiliating it will be for me with other people having the medals and how they will rub it in my face.
Honestly, I don’t know if I can do it. I ran 29km today and it was tiring. I have until August though. My mother did just find out, and she isn’t at the point yet where she is supportive. Hopefully that will come. EIther that or I get disinherited. Could go either way.

Aftersmash

The building I work in has been getting a number of upgrades lately. I hear that there are new owners who want to spruce it up. For the longest time there has been a large brick tower that has a rotating sign on it in the front. At least the sign is supposed to be rotating, but except when the wind blows, I haven’t seen it move in half a year. In fact, I think I’ve seen pigeons sneak into it.
This afternoon, at about 5:00 a large crane came and started to tear it down. It was so cool! It banged around the fiberglass panels on the rotating cube on the top. Eventually that came down in pieces. Then it started scraping away at the bricks. With one particular motion, the entire thing shuddered and a horizontal crack appeared as the top half rotated relative to the bottom.
Unfortunately, I had decided to throw a party today so I couldn’t stay to watch. I hear that it eventually did go down in a big crash.
I do feel sorry for the pigeons though. While work was still going on, I saw one poking through the rubble. I hope it hadn’t left anything important in there.
But after being in Venice, I don’t seem to have a lot of sympathy for the sky-rats.

Balms for the poor

Several years ago I noticed that my credit card bills were fairly high. This wasn’t a big concern, as I pay off the balance every month. But I recalled a time when it never went over $300. I use my card to do almost all my purchasing, so it easily goes over that.
As a test of character, I decided to do my best to make sure my credit card bill was as low as possible for a month. I would still use the card for all the purchases I would normally do, but just try and not do them; No paying cash for things I would normally use the card for. That would be cheating.
At no time was I in financial peril. It was just an experiment. And I’ve proven it is possible for me to do it. In fact I’ve repeated the exercise every so often.
And now it is time again. After all the heavy purchasing I’ve done over the past few months, I need to get some discipline back in my life. For the month of March I will try and be a good shopper and only buy things that I actually need. Costco may provide me an out though; They don’t accept credit cards so I have to pay via debit.
This will also restrict movie nights somewhat, as I’ll be borrowing from friends instead of renting. But I have lots of friends who buy too many DVDs. All in all, this is probably good for me.
Oh, and I checked my old credit card bills. The time I recalled was a lie. I’ve never had a credit card bill below $300, except when I do these vows of poverty.

Vote free or die hard

I have to vote tomorrow. I still don’t know who for.
I think of myself as a conservative, but mostly because I like fiscal responsibility. None of the parties really seem to be showing that. The Conservatives have been in power for 37 years in this province. Part of me likes a good tradition, but they are acting like they are destined to run the place. Which is a pity, because Ed does look like he could make a good premier.
I just wish he would raise the royalty rate.
In my riding the Liberals came close to winning last election. So if I was just interested in not having a Conservative win my riding, it is clear I should vote for the Liberals. But they haven’t done anything to inspire me. I usually like voting Green. It makes me feel good, and they have described themselves as fiscally responsible.
NDP are off the table. I don’t trust them to run the government. I am still glad they exist because their presence allows for minority governments.
In the end, it really doesn’t matter. The Conservatives always win in Alberta.
In the election for the “Leader of the Free World”, for which I do not have a say, I usually like the Democrats. But they’ve been sparring against each other for so long that they are both beginning to look bad. I used to like Hilary, because she had experience, but then they are both saying they don’t like NAFTA. McCain does seem like he would be a good leader. But the Republicans are not the party of business, but of the religious, and I support the separation of church and state.