Tuesday, October 25, 2011

Koch Snowflake - Reloaded

As stated in my last post I played around a bit with Koch Snowflakes and a variation of it.

After figuring out a way to calculate the triangle-count of the next iteration based on the current count it was possible to prevent program crashes due to vertex-/index-buffer overflows.

Another thing made possible is to "merge" the two generation algorithms, i.e. use one method for iteration x and the other for iteration x+1.

The "classic" Koch snowflake algorithm should look something like this:

  1. Start with a triangle (or a tetrahedron made of 4 triangles) and divide every edge in half.
  2. The 3 new points form 4 smaller triangles with half the size.
  3. The triangle in the middle is the base of a new tetrahedron.
  4. Do steps 1 and 3 for every triangle until desired complexity is reached (which is pretty fast).

"Classic" Koch Snowflake subdivision

The variation I (and some others on the web) used nearly does the same, except the smaller tetrahedron is turned that the edges of the smaller base triangle are parallel with the bigger one:


Now I can combine the two different methods to create interesting new patterns. For example:

  1. Start with the initial tetrahedron, then use classic algorithm (C)
  2. Then use variation (V)
  3. Repeat alternations to create the pattern CVCVC
The pattern CVCVC
And some more...
The pattern VCVCV
The pattern CCVVC
The pattern VVCCV
Many more patterns are possible, I was too lazy generating them all. Maybe on personal request...?

Thursday, October 20, 2011

Winter? - Snowflakes!

As the weather suggests it's pretty much winter here. And what's winter without snow?

So I decided yesterday that it would be fun to bring the Koch Snowflake into the third dimension using the XNA Framework and some libraries I'm working on.

Since the result was a bit too regular (see the images on Wikipedia) and I found a nice video on YouTube with something similar but better looking, I changed my code a bit. And voila: Here it is! My version (of many) 3d Koch Snowflakes...

Be prepared, there is (maybe) more to come...

Initial state
After one iteration
After six iterations
If you are interested in the code, feel free to email me at: f(dot)heinz(at)gmx(dot)net

EDIT:
As my girlfriend stated correctly yesterday, this does not look like like a snowflake since I started from a single triangle. So I changed it to a four faced pyramid. This is the result:
After six iterations

Thursday, October 6, 2011

Better living with(out) solid state drives

Well there is this "new" technology. Solid state disks. Pretty much the same as those neat little usb-sticks dangling off your keychain for some years now.

Anyways, they're faster than conventional hard drives, in the same proportion they're more expensive.

So there is this new solid state drive that costs about 10 times as much as an old hard disk which makes it at reasonable prices chronically too small for almost any application.

And then there is this reliability thing: It breaks!
I thought one of the key features of solid state is, that there are no moving parts involved and therefore nothing can happen to your data. In theory. And then there is reality where lots of people in various forums and blogs tell their story about lost data. One guy lost his data ~4 months after purchase, got it replaced and the replaced drive broke again after about half a year.

In conclusion solid state drives are fast.

Use solid state drives if you want to...
...run out of disk space. Fast.
...loose money. Fast.
...loose data. Fast.

Steve Jobs departed

This guy was a genius.

This man changed the world.

Don't want to write an euligy here, there are others who can do that much better.

I didn't know him personally (and I'm not even a big fan of Apple) but I still feel sad about his death.

Internet makes it possible that one gets the feeling of getting to know somebody even when one never met the person. In my opinion caring about a stanger is a good thing.

Tuesday, October 4, 2011

(Don't) communicate!

Right now I received an email as response to some user feedback I entered in the contact form of an amazon marketplace dealer. There I asked why I have to pay four times for shipping when there is absolutely no reason to ship them separately.

In essence, the answer stated something like:
"You did not enclose any reference id. To process your request please give us this information."

Well, ok, I don't know why my order should be any different from all the other orders this company receives. My understanding is that this is a company policy thing and therefore every customer is ripped off when ordering more than one book at a time.

Anyways, what really makes me mad is when people/companies send email from no-reply-addresses. Even better when they request an answer.

Dear amazon marketplace dealer please take a look at another post by Seth Godin.
The post in essence: Either communicate or don't, but don't pretend.
Thanks!

UPDATE:
After providing the required information via the online contact form (due to the lack of a response address) I was told that the amazon system calculates this automatically and that there is no possibility to change that.

I also received a goodwill refund for parts of the shipping costs. Probably not worth the effort (as in: money saved) but if every customer does as I did maybe something will change? Did I already find my way of changing the world?

Long time, no see

Well then, dear blog, I'm back.

A combination of two random circumstances made me re-activate this blog.

1) A recent blog post by Seth Godin about talker's/writer's block animating people (and me) to write daily.
2) A broken harddive that rendered my company notebook useless, reducing my "work" as software engineer/consultant to web research and infinite boredom. So even bad things happen to have some good effects, one has just to see them.

Therefore I'm back, not sure what to expect yet. But there are some ideas flying around in my head.

Not sure if this will save the world - or even change it for that matters. Maybe watch JR's TED talk about how art can change the world or his Inside Out Project Page in the meantime until I figured out my own way to save the world. ;-)