DPS Theory

February 5, 2009

90% of good thinking is good notation, and Video Games

Filed under: 1 — Peter @ 3:45 pm

I keep meaning to get back to this blog, but every time I start thinking about it, I remember what pulled me away from it to begin with.

My next post on video game math should be on the basics of first person shooters, and how to describe the DPS that you can expect from a gun. Grenades, rockets, melee weapons, etc. can be more complicated, but they pretty much build off of the next thing I mean to post about.*

My problem is that I am no good at writing math on this blog. I’d like to be able to talk about cross sections, and notate them with a σ, I’d like to be able to show derivatives in Leibniz notation (and/or Newton dot notation), and I’d also like to use partial derivatives. And I want to show some integrals.

There are tools available that can generate images of mathematical functions, but they are cumbersome to use. There is something called math ML that might work for me, too. I just haven’t put the time into learning a method, and then wrestling with it to get it to do what I want it to.

I’ll go work on figuring that stuff out, and maybe I’ll have some formulas put together for a substantive post next week. Maybe. 

*Have been meaning to post about for months….

January 9, 2009

Math and Nature*…

Filed under: Math, Science — Peter @ 8:02 pm

I am looking for a cool site full of book reviews and recommendation of books that I would love to read, but that it would never occur to me to look for myself. You know what I mean?

Here’s a sight that is clearly not what I’m looking for. Checking them out, I immediately went to their hard science section, and clicked here for this book on General Relativity.  The publisher’s website associates this quote with the book:

” Mathematics is not the language of Nature. It is the language of mathematicians. “

This is so true! Although, honestly, the rest of the book seems like complete bunk. But really, there is the enduring mystery of why nature† is so well described by math. Well, I guess it sort of is well described by math. Simple arithmetic isn’t so good for describing quantum mechanics, but the theory of partial diffential equations does a pretty great job of it, if you interpret it correctly–which is a straightforward, if not intuitive, process.

Some people think it’s quite profound that math is so good at describing nature. It’s really really good for it, almost as if nature was written in math by a cosmic mathematician. Math is really everywhere, not just in physics, but in biology…and I suppose that exhausts all of nature. And the same math comes up so often, in seemingly unrelated problems; for example things like Laplace’s equation, which comes up in heat transfer, diffusion, wave mechanics, quantum mechanics, and lots of other things that don’t have anything to do with that stuff, like probably economics.

Well, here’s why math is so successful at describing nature. It’s because that’s what people have been creating math to do. Math is a tool, created by people, to do things with**. And we have expanded our ideas of what math is until we could use it to describe nature with high precision. Now, maybe it’s remarkable that nature is so predictable that it can be described at all, but given that the universe has been stable enough over the past 4 billion years for us to evolve, it only stands to reason that the universe we see should be predictable.

As fer the strange coincidence of some equations and constants (Euler’s constant comes to mind) popping up everywhere, that has more to do with those equations and constants being very easy to make approximations than that systems really behave that way. I mean, they do behave that way, but only if you aren’t looking closely enough.

*and video games

†I really do mean to get  on with the fascinating project of describing video games mathematically, really!

**it’s been somewhat frustrating to me that math professors seem oblivious to the fact that a lot of the math that they teach was developed with specific problems in mind. I think math education would be much easier on the student if students were introduced to the types of practical problems that math is good for before they are introduced to the proofs and theorems of the theory.

December 24, 2008

The Moral Ambiguity of Genocide, etc.

Filed under: 1 — Peter @ 7:33 pm

At no point have I lost interest in the math behind video game mechanics, and how to tune that math to produce a rich narrative experience for the player.  But after my long long hiatus from my most obscure of blogs, I’m still not gonna blog about that…Now I think of it, I have some New Year’s Resolutions to make.  What was I saying?

Oh, yeah.  When I was in high school, I was assigned an essay about a my personal hero.  Wow, not really a hero worshipper here, didn’t know how to approach it.  So I subverted it, and wrote an entirely tasteless piece about the poor, misunderstood Mr. Nazi, the WWII German spandexed superhero, who led the world down the path to genocide on a yellow brick road mortared together with good intentions.

Now, I’m not a talented writer.  I’m a less talented public speaker.  And I wrote this knowing I’d have to stand up in front of my class and read it.  Yeah, that wasn’t fun.  I don’t know what my classmates thought of it.  Thanks for indulging my pointless digression.

So, haha, I’m wondering if maybe somewhere there’s an awkward, warped, excessively sarcastic high school student writing the same thing about George Bush’s America.  Or perhaps even  some serious, sober adult who should know better, and writing it unironically.  You know who I bet would know about such things?  I’m gonna go check out Glenn Greenwald and see if he’s seen anyone writing or saying anything like that.

July 9, 2008

G W Bush, environmental visionary

Filed under: Irrational Bush Hatred, Politics — Peter @ 6:58 pm

Cuz now, after he’s been obstructing national and international efforts to mitigate climate change for years, shirking responsibility for reducing the emissions in the number one greenhouse gas producing nation (per capita, about 4x what China produces), he’s willing to encourage his successor (please please please be Obama) to take some steps to reduce greenhouse gas emissions.

Now, I understand that implementing a sustainable energy policy will be hard, and there are those who think that the growing pains will be economically painful.  Especially if you make most of your money investing in  greenhouse gas emitting fuels, I suppose.  So of course, Bush wouldn’t have wanted to be associated with that.  But I’m willing to concede that he meant well all this time, and just wanted to check the figures himself before really endorsing a climate change policy.  And now that his feet will be off the fire, he’s willing to put someone else’s there.  Because that’s just the kinda guy he’s always been.  Uhm, nice and well meaning, I mean, not irresponsible and habitually blameless.

Well, since Bush woulda vetoed it…

Filed under: Politics — Peter @ 6:47 pm

NPR reports today, July 9, 2008, the day Congress overruled the 4th amendment, that Bush would have vetoed the FISA update bill if it didn’t include the telecom amnesty provision.  So I guess Congress’s hands were tied.  Except that, what NPR didn’t mention, was that we don’t need the stinking FISA update that was being offered at all.  So the veto “threat” shouldn’t have carried any weight.  Civil libertarians would have been perfectly happy with a veto, and national securitarians (or whomever) would have barely missed the FISA revisions.  Well, they have a bit less work to do now when setting up wiretaps.  Namely, they don’t have to get warrants as often.  And the warrants don’t have to actually be based on anything.  But FISA warrants weren’t hard to get anyway.  Of course, if you really want to use the government’s wiretapping authority to perform illicit, illegal wiretaps on intranational US communications, that’s now much easier to do.  So there’s that, if you’re into that sort of thing.  None of which do I recall NPR mentioning in the past few weeks.

Stellar reporting job, NPR.  Thanks for that.  Very much.  Now go fuck yourselves.

June 22, 2008

I’m Bitter

Filed under: Grammarian, Obama '08, Politics — Peter @ 10:13 pm

Geesh, people are still bringing up Obama’s “bittergate” gaffe.

Let me paraphrase what he was trying to say:

People in small towns want a politician who can stand up for their economic interests, and do what it takes to promote job stability and job growth, e.g. keep their jobs in their towns instead of moving overseas, making good health care available, etc.  But they have become bitter when they vote those issues because no-one’s been doing that for them.  But there are Republicans who will work for other values, such as protecting their gun rights and, i guess, promoting their religious values.  So they have been reliably voting Repub, since Repubs have been reliable on those issues.  If Dems will start being reliable on the economic issues that are important to them, they’ll start voting Dem.

Granted, the way Obama phrased it was open to misinterpretation.

You see the argument, you made it

Filed under: Minutiae — Peter @ 4:27 pm

HAHAHAHAHAHA. Expanding domestic oil drilling is practically pointless, but politically, it makes advocates look stupid.

FISA and telecom immunity don’t protect us from terror

Filed under: Politics — Peter @ 10:32 am

I am totally baffled about why Pelosi, Reid, Obama, et al have caved on the issue of a FISA update and telecom immunity. As I keep hearing, no-one (except a few of us) cares about it. And there is absolutely no need for the expanded surveillance powers in the new FISA update, so there was no need to “compromise” on the issue of immunity. Therefore, they should feel free to do what’s right, i. e. oppose telecom immunity and keep the wiretaps on a short leash. Instead, they are capitulating to those who want broad surveillance powers.

And you know who benefits from broad surveillance powers, of course. Not the ordinary citizen, who’s afraid of terrorist attacks. That’s silly. The old FISA can be tweaked to provide all the surveillance authority we need to spy on legitimate terrorist suspects. It can probably be reined in a bit–the FISA court doesn’t allow much real oversight. The companies that will get the contracts to do the spying, data collecting, and data sifting are the big winners here. But I’m sure that anyone with access to the information will be able to find some ways to make their lives easier by, say, spying on their political opponents or business rivals.

Oops, I let slip a secret about me. I’m not really all that concerned about terrorist attacks. Sure, there was 9/11 in the US. And one in Britain, and one in Spain…a ton in Iraq, frequent attacks in Israel, etc. Timothy McVeigh in Oklahoma City. There was also Katrina in New Orleans, wildfires in California, flooding in Cedar Rapids and all along the Mississippi, a bridge collapse on I35, a cyclone in Myanmar, earthquakes in China. And auto accidents. 45000 US auto accident fatalities per year since 2001. 4000 US terrorist fatalities in the same time period. You know what? Life sucks. Terrorism, a tiny blip in the general suckitude of life. Not really worth getting upset about (in the US*). So, unlike you, I don’t go out with a bullet-proof vest and gas mask all the time. Oh, you don’t either?

*If you live around Iraq, Israel, Palestine, then your specific fear of terrorism is totally justified, I’m sure. And if you live anywhere besides the US, it’s probably reasonable to be terrified of the US looking at you the wrong way. Because our military incursion into Iraq cost about–who knows how many lives? We didn’t bother to count. Reasonable attempts at counting put it at 200k-1M+ deaths and 2M displaced.

June 20, 2008

Why I didn’t vote Gore in 2000

Filed under: Politics — Peter @ 8:52 pm

I hate the 2 party system. I mentioned the other day that 2 parties are almost as corruptible as a single party is. So, when I have the luxury, I want to vote 3rd party. In 2000, I thought I had that luxury.

In 2000, I thought that the Democrats and the Republicans were both too far right, in the pocket of corporations and unresponsive to the people and the principles of freedom, and not brave enough to do what we need to protect and promote liberty for everyone. There are definitely some people in government who value liberty and equality, and there are those of us who are willing to sacrifice and take some chances for it–I don’t think the risks are all that great for most of us, but they are greater for the politicians, I suppose. But for the most part, legislating for the principle of freedom for all requires doing some things that protect the few against the wishes of some large voting blocks (who may often pretend that they’re being asked to sacrifice for the privileges of some minorities, but really, who loses if there are some people in the US who aren’t Christian? who loses if gay couples can marry?)

After 4 years of Bush, erosion of civil liberties, starting aggressive wars, the withdrawal from the international community; the reality denial, the lies, the wishful thinking, ignoring the climate and energy problems; pandering to the religious right, the racists, the patriarchs, the homobigots, the jingoists; gutting our protections against authoritarianism, interpreting the presidency as a dictatorship; siphoning wealth from the poor up to the wealthy; the selling out of the American dream; I realized that the difference between the Dems and the Repubs was too great to ignore. I voted Kerry, not because I liked Kerry, but because I hated Bush so much.

Now I want to be involved, I want to help steer the Democratic party toward the liberal end…not just liberal for relatively conservative US politics, I want the US to be a shining beacon of liberalism in the world–like Canada, but warmer, maybe. Like those socialist utopias in Scandinavia but with diversity, perhaps. Well, I guess I don’t want the US to be a shining beacon of liberalism so much as I want the whole world to be a shining beacon of liberalism, but I guess I have to start at home. Should be easy, you’d think, what with it being woven into our foundation myth and all.

And now, in 2008, we were offered several Democratic presidential candidates who all looked pretty good. We ended up with Barack Obama. I voted for him in the Ohio primary, too. Sure, he’s about center-center-right, about where most democrats are. Not liberal exactly, but reality based. And a long way from a proto-fascist, like the far right Repubs we’ve been living with. And dying for.

So maybe I shouldn’t be surprised that slightly right Obama has decided that it’s just fine to break the law as long as the President tells you to break the law. He’s probably better than McCain, who I expect imagines that it’s criminal to refuse to break the law if the President tells you to break the law. But the president is not dictator. I don’t want a president who thinks it’s ok to play dictator, as long as you mean well. Because sooner or later, you get a president who doesn’t mean well (even if he really means to…) and then we lose our freedom, and we lose our America, and we lose ourselves.

I don’t have many people to vote out of office from here…my Congressman is already a Republican, so he’s not getting my vote anyway. Maybe I won’t support Obama for a second term.

Otherwise, if this pisses anyone else off (and they read this, but no-one does), support Obama ‘08, but don’t like it. Get involved in the Democratic party, help move them leftward (cuz right now, the difference between Dems and Repubs isn’t so much left vs. right, it’s reality based vs. batshit crazy, and I still prefer reality based right to batshit crazy right). And then, once we have two reality based parties in the US, start bolstering 3rd parties. Or work to move 2 parties further left. Do both, it takes all kinds…

Thermodynamics for Climate Change Denialists

Filed under: Math, Politics, Science — Peter @ 7:00 pm

Let’s take a look at the latest ideas in global warming denialism (with a screencap, in case the original source ever gets embarrassed by this). It goes something like this:

Greenhouse gasses can’t increase the temperature of the Earth: they don’t add heat to the climate (causing global warming), they just trap what heat is already there, slowing down any cooling. Those are two different things.

It’s a nonsense argument, so trying to really understand it is impossible, but I think that’s a decent approximation. My first reaction was similar to PZ’s, that it’s true as far as it goes, but omits the effects of any external source of heat.* But really, it’s not even true if you forget about the sun (but remember anything else about the climate). If you slow the cooling of the Earth at evenings and during the transition from summer into winter, you will increase the average temperature of the Earth without increasing the maximum temperature of the Earth. Therefore, the globe will warm.

But let’s see what happens when we don’t forget that big hot yellow Sun that’s heating us up. Generally, as you pour more energy (sunlight, and to a much lesser extent these days geothermal energy) into a system, the system heats up, temperature rising. As the temperature rises, the body (the planet Earth) emits radiation, shedding heat into its surroundings (in the case of the Earth, the radiation is primarily infrared, although atmosphere evaporating into space would count, too). The rate that heat is radiated off is proportional to the temperature of the Earth. The rate that heat is trapped is proportional to the reflectance r (albedo) or absorbance A = 1- r of the object, as well as surface area, and maybe some other things that will be constant here. The temperature T equation looks like this:

CdT/dt = AP0 – kBT

with C the heat capacity, heat per unit temperature, of the Earth, P0 = the (constant) rate of energy flow into the system, from the sun (Isun•σ), geothermal sources, cosmic rays, whatever, and kB the constant describing the rate of heat loss per unit temperature due to radiation (and other sources, such as evaporating atmosphere or maybe chemical reactions, which are mostly constant-”conduction” and “convection” wouldn’t really apply to the planet Earth as a whole). Roughly speaking, to determine the temperature of the Earth, you solve this equation for dT/dt = 0, the thermal equilibrium condition where heat flow in is equal to heat flow out. Increasing the absorbance of the Earth by increasing greenhouse gas concentrations increases the equilibrium temperature, which we’ll interpret as an increase in extreme temperatures of the climate, as well as increased average temperature.

Of course, the fine details of weather and climate are MUCH MUCH MUCH more complicated than this–but they’re much more complicated that you’d expect to see on a children’s climate website, too, and they’re more complicated than Kate and Hans Schreuder seem to realize, too.

*It’s amazing to me that they have made fundamentally the same mistake that some people make when they claim that evolution violates the 2nd law of thermodynamics, i. e. they forget that there is a Sun.

Alright, here goes: the atmosphere looks like a thin film, with light shining down, with no transmission through the surface of the earth, some absorption, some reflection; some of the reflected sunlight is reflected by greenhouse gases back to the Earth’s surface, and either absorbed or re-reflected back to the atmosphere to be re-re-reflected, and so on. With each reflection back to the surface, a bit more gets absorbed; each reflection back to the atmosphere a little more gets back out to space; and also, there is a bit perpetually trapped reflecting back and forth between surface and atmosphere (which helps keep us from dropping to near 0 kelvins at nights). Turn the Sun off, and that trapped bit will decay exponentially, but the Sun isn’t going anywhere anytime soon.

Chemical reactions and some other things are technically additional degrees of freedom, and change the heat capacity C of the system. More chemical reactions, for example, would slow down temperature rise, but not necessarily the rate of heat gain or loss.

Older Posts »

Blog at WordPress.com.