« Archives in October, 2012

Planet Around Alpha Centauri

While I’m posting stuff (I really do need to be more consistent. Was it Mark Twain that said the hardest thing in the world was actually keeping a journal?)

The European Southern Observatory has found an earth-massed planet orbiting Alpha Centauri (Earth Massed, but it is far too close to be within the habitable band).

http://www.space.com/18089-earth-size-alien-planet-alpha-centauri.html

Planets orbiting further out are possible, and the search is still ongoing.

Shapelib

So, I was thinking one day when working on this scheme I have for this unstructured finite difference PDE thing that is one of these never-ending ongoing programming projects of mine.

Wouldn’t it be great if you could take shapes and operate one them as if they were data-types?

Well now you can! At least in 2d. This is pretty much still a work in progress on my part. I intend to add the 3d version of this same logic after I work up the plane-projection and point identification nonsense.

This library has some limitations, but it basically provides you with some shape classes and binary operators (union, intersect, difference). (fairly wide-open ones at that – I’ve tried the whole keeping data private thing, and it just introduces a lot of rigidity IMO. Eventually you want to feed these to some other algorithm, or pry them apart to do something else with, and doing that through entirely redundant set and get members is a waste of time. Why is this part of OO coding practice?)

The shape classes can have arbitrary holes. It’s based on oriented planar straight-line graph stuff.

Anyway, what do you think? Does this sound useful to you guys? I can post the code when it’s properly commented and cleaned up if so. It’ll be useful to me when I finally get the 3d stuff working, so I can build arbitrary 3d shapes.

First Java Applet

So, I just finished looking through some example code from a Java Applet games contest, and managed to wrap my head around their AWT windowing and event system. (It was hard though – the guy who wrote the applet I was parsing a few minutes ago had all sorts of helpful variable names like i,j,sg,bl and piled everything into fifteen nested levels of loops in a single method. :-P)

But it was informative.

And now, I present, my very first java applet:
(For some reason, this sucker just will not display from within a wordpress page. Link to HTML:)
ColorPatch Applet

And the source code:
src

Closing the Forum

So, I thought to build and administer one of those PhPBB forum things for my friends and family to post on. It was also a good experiment in administering database-backended php/javascript applications. The whole thing was a productive learning experience.

However, none of my acquaintances used it for much. In addition, it has been absolutely flooded with spambots. CAPTCHA does nothing -apparently someone has managed to get a decent OCR attached to their spambot system. I get hundreds of registrations per day from automated spam posters. It’s pretty annoying. I don’t know why people do it either. They couldn’t possibly get any add revenue from a spew of wordsalad advertising viagra and other less mentionable things in languages that the site can’t even display properly. Seriously, why put so much skill into creating programs to do something so useless?

Grrr. Anyway, even though registrations have to be approved, I have a backlog of several thousand now that are just clogging the database. Maybe if/when I have more interest in my blog, I can try again.