Archive for July, 2003

Untitled #163

Uh oh… This sounds like me:

Before and After: Eleven months of Jujusoft [yikes!]

Getting a haircut is never high on my list of things to doNote the change in facial expression: From self-assured smirk to slightly haggard grumpy fatigue, caused by the slow realization that a business does not in fact leap fully formed from one’s brain, as did what’s-her-name from the mind of Zeus. On the contrary, it seems to require planning, commitment, enterprise and sometimes even capital!

Still Faffing

Poncified version of Lunar Lander

But come on… aren’t quadratic curves nice? Isn’t anti-aliasing nice? Of course, I still haven’t got collision detection working with the nice curves (only with their straight edge approximations) and boolean operations are giving me a headache every time I think about them…

And Or Xor

Two dimensional boolean operations seem so elegant in theory, but when I try to come up with an actual implementation it quickly dissolves into a nightmare of different cases. And this is just 2D… I think I’m going to have to spend some quality time with pencil and paper over this. In theory I have found my ugly quartic equation, but getting to the point where I can put it to use may require more work than I originally anticipated. It really needs to be done though, since most of my non-3D graphics work [including font rendering] revolves around the 2D path renderer, so anything which expands that functionality has the potential to add value across several applications.

Like Tetris?

Play Cute-tris!

Then why not try Cute-tris, created by a friend of mine. Go on, it’s got a bunny in it! And it’s a great way to kill time when you’ve got bothersome work to do (or when you’re waiting for someone else to release a piece of software).

What I’m working on right now

I am faffing about with Jujuscript and attempting to get my 2D shape intersection routines working. While this should be useful in general for any of my software which uses the shape renderer, it will also be useful for collision detection in any lame little 2d games I write in Jujuscript ;)

My Brain Hurts

If you happen to know the solution to these equations, please don’t hesitate to let me know! I am seeking to resolve them to quartic equations in m & n.

Am halfway through the painstaking process of solving 2 simultaneous quadratics, of a slightly simpler form that that mentioned in the previous post. I need to find all m & n such that the following 2 equations are satisfied:

Amm + Bm + C = Dnn + En + F
Gmm + Hm + I = Jnn + Kn + L

I’ve spent about an hour and a half on it so far [spread out over 24 hours of course], and I keep making simple substitution errors. I just hope I’m at least on the right track. I was always good at high school maths, but never went much beyond it [except in the ad hoc way that proved useful to programming]. Also I’m over 30 now, which means that my skills are on the decline. If I ever get it right I will post it here in the hope that other miserable programmers like myself will be able to one day do a search for "simultaneous quadratic solution" and actually get a useful result.

Why To Bother?

The reason I want to work this problem out properly is so that I can perform standard boolean operations on quadratic paths… the paths I use for virtually ALL of my non 3D rendering (including fonts). In english that means that it will allow me to easily combine a letter S with a letter U with the result being made up of continuous outlines with no overlap. It may sound simple but mathematically it’s a real pain. Flash offers a good example of what I want to be able to do: when you draw a shape over the top of another, the shape beneath is actually "cut" by the shape on top, so that there is no overlap. For some reason, possibly my inferior searching skills, I have been unable to find such an algorithm documented, which is why I am trying to nut it out myself. *sigh*

Unrelated Things You Should Look At

The Anticlimax of Internet Searching

It is so frustrating when you are searching for an answer to a question and all you find are pedantic comments and clarifications about the question, with no one bothering to give you a freakin’ answer. Here is a perfect example of this ridiculous tendency:

> I would like to know if there is a general solution for any two
> quadratic
> equations of the form shown, solving for x and y which satisfy both:
> A(0)x^2 + B(0)xy + C(0)y^2 + D(0)x + E(0)y + F(0) = 0
> A(1)x^2 + B(1)xy + C(1)y^2 + D(1)x + E(1)y + F(1) = 0

Except for degenerate cases, the solution will involve solving a
fourth-degree equation in x or y (the resultant of these two polynomials
with respect to one of the variables). Geometrically, two conics
can intersect in four points.

The reason I am looking for this solution is that will allow me to intersect quadratic bezier curves (the basis for all my 2D shape drawing), allowing for sophisticated boolean operations.

I already KNOW that the answer will involve a fourth degree equation. I just want to know what it is! This guy’s response is useless and simply wastes my time as I search for an actual answer [this post is from a newsgroup a year ago]. There are too many dickheads in the world who will reply to such a question without actually answering it. When someone asks on a public forum: "How do you achieve X?" the only people who should reply are those who know the answer and are willing to give it.

The Value of JujuScript

In previous post I mentioned that I am creating simple vector graphics games using JujuScript , even though up until now I have constantly acknowleged that maintaining one’s own scripting language is a waste of time. Well I’d just like to point out that I’ve changed my mind and decided I really don’t feel that way at all, because:

  • Jujuscript has been an incredibly interesting project to work on. I think that creating an interpreter helps in the understanding of programming in general.
  • Contrary to obnoxious comp sci rhetoric, it is not a piece of piss to just whip up your own high level language interpreter. If it was then everyone would be doing it, because it’s not like there aren’t millions of well educated geeks out there with free time on their hands.
  • At least one promising application [so far] began its life as a JujuScript program, and would never have been created otherwise. One of the greatest uses of a script language is for prototyping, and I am yet to come across an equivalently simple object oriented script. If I wasn’t using Jujuscript for such things I would be using nothing.

So I guess what I’m saying is: Jujuscript probably is useless to people in general, being yet another C based language, but to me it is incredibly educational and useful, and even though I am probably the only person who will ever use it, it would be stupid to let it slide.

I always wanted a Vectrex

If there’s one thing I absolutely have to be working on right now, it’s a Jujuscript version of Lunar Lander. Ah, the purity of the vector graphics [anti-aliased of course], with the simplest possible shapes employed to represent the ship… there’s just something about it that is so much more pleasing than textured / tesselated models, with lens flare and bump-mapping and all that other bollocks. Maybe it’s just a phase I’m going through, but sometimes it really does seem like some great ideas are being left behind as progress marches on.

Too Much Freedom

Part of the problem with 3d in space is that we really aren’t used to moving in all 3 dimensions. Because of gravity we tend to crawl the planet surface for most of our lives, limiting our freedom to just the 2. This means that a lot of our spatial skills are essentially 2 dimensional. Once you find yourself in [simulated] space, you have so much choice in movement that it becomes really hard to create a gaming environment. In 3D space you constantly find yourself miles away from anything, disoriented as all hell, trying to work out where that enemy ship went to [behind you]. Also in 3D the chances of being hit by say, an asteroid, are really amazingly small, so for an asteroid field to be at all challenging it will have to be ridiculously dense. The same is not the case in 2D.

It all has to do with intersecting lines… for any 2 objects to collide (eg for a bullet to hit its target) the paths of the 2 objects must cross. Even then they won’t necessarily collide, but they certainly can’t collide if their paths do NOT cross. In 2D, any pair of randomly selected paths will cross somewhere (unless they are parallel), so there are plenty of opportunities for things to bump into each other. In 3D however, a pair of randomly selected paths will almost certainly NEVER cross, so we have to add lots of external influences to encourage objects to meet.

Stunning Corporate Video from the NTDF

http://www.theembassyvfx.com/quicktime/tetra.mov

It features a gun-toting third world police robot, so watch it now! [from Boing Boing ] Also visit the company’s main site to check out their other work, because it is a bit rude for me to link directly to someone else’s media files.

The Joy of Skepticism

Turns out there’s a new word which combines the concept of atheism with a healthy disregard for the supernatural. If this describes you then you may consider yourself a Bright

What is a Bright?

  • A bright is a person who has a naturalistic worldview
  • A bright’s worldview is free of supernatural and mystical elements
  • The ethics and actions of a bright are based on a naturalistic worldview

So, next time you’re at a barbecue why not tell your friends you’re a Bright and see how well that goes for you.

Damned Statistics

Here is an interesting bunch of info, correlating higher intelligence with the absence of religious beliefs. I’m pretty confident that the former leads to the latter, but I do find it troubling that atheists are pushed into this position where in order justify our position we necessarily have to imply stupidity on the part of the believer, making it very difficult to open a meaningful dialogue.

Actually I’m happy to accept that such studies might show no correlation at all. Clearly there are many brilliant people in the world who are also believers. From my own experience I can say that the people I’ve met who are not religious also tend to be less likely to believe in ESP, Astrology and perpetual motion. For this I have no choice but to rank them as generally smarter [a completely subjective judgement I am happy to admit]

Here is a site refuting the conclusions drawn by the previous one , written in a slightly smarmy defensive tone, with more exclamation marks.

On Believers vs Skeptics in General

Creationists will often pursue a perverse logic which says that because you can’t completely describe [and experimentally verify] all of the processes which led to the current state of the universe [and how divinely beautiful it clearly is], therefore you must except that the nature of the universe is beyond human understanding and therefore you must accept that there is a divine creator, because as we all know God is beyond human understanding. Mmmm. Apart from the circular, another approach commonly employed [in a Believer's counter-argument to the Skeptic] is to constantly go “aha!” and claim that the Un-Believer has been hoist by his own petard. Fortunately, simply saying this does not make it true.

Such arguments are on about the same level as when famous dickhead John Edward dismissed criticism from famous skeptic James Randi by calling into question the credibility of anyone who would ever go under the moniker: “The Amazing Randi”* James Randi is a professional magician who spends his time fighting ignorance and encouraging people to use their uniquely human capacity for critical thought – magic tricks are very useful for demonstrating how easily people can be fooled.

* unfortunately I cannot find the original source for this comment, but I originally heard it in an interview. I wish I could track it down.

Frikkin’ M__soft

Generally I’m pretty wary of MS bashing, and tend to roll my eyes when online posts rebelliously describe the company as M$ or /\/\icr0$0ft, of whatever. That is not to say that I think they are great however, and here is one issue which regularly causes me to curse their name:

MS *.lit format (for ebooks) is proprietary, meaning that no one can write software to read the format unless MS says so. This is in spite of the fact that it appears to be based on a specification developed by the Open eBook Forum , an XML based standard being developed for the benefit of all. The only good reason for *.lit even existing seems to be to support the dreaded DRM [Digital Rights Management]. Unfortunately MS reader is the only well known reader that seems to support an OEB based format, so when nice people like The University of Virginia make ebooks available for free online, they have little choice but to select the *.lit as one of their 2 downloadable formats (Palm *.pdb is the other one). That is to say: the information they are attempting to give away for free in the most useful format, can only be read by an MS product, because MS appear to have no interest in supporting any form of content distribution over which they do not exercise control. This means that an enterprising young go-getter like myself can NOT make a reader which will read these files, even though I would very much like to [and I'm sure that the providers of such free information would also like to know that individuals such as myself have the opportunity to contribute to their efforts to disseminate free literature] It would have required virtually no additional effort to allow an unencrypted OEB based format (say, *.oeb, comprising at least a subset of the full specification) to be read by MS reader, and also virtually no effort to provide this alternative to all tools which currently generate *.lit files. That the Open eBook Forum does not appear to be promoting the adoption of any such open format marks them as a bunch of oxymorons.

Hubble Telescope Discovers Message From God

1 Bit per pixel

Actually managed to get all the things updated as needed, which is a relief, and now feeling desperately annoyed at my inability to pick colors, hence the new black and white look for the main site. If I could set up some kind of image filter so that all the bitmaps become black and white as well, I probably would, because some days I just can’t find a color I like. I even went for underlined links, something I normally avoid because it seems to add a lot of visual noise.

And of course, tomorrow I’ll look at the changes I’ve wrought ond go Euuyyyuk! and want to change it all again…