Wednesday, October 03, 2007

It has been a busy summer! We were in Japan for August (and man was that nice or what!), then we spent most of September moving and settling in to the new farm (and man is this nice or what!). That being that, it has been a bad summer for blogging, I have a number of posts I hope to make in the next little while. Hopefully it will be like when Mitch Hedberg pinches the microphone cord -- he lets go and a whole bunch of jokes come out...

I've been reading a great book by Charles Petzold:

3D Programming for Windows: Three-Dimensional Graphics Programming for the Windows Presentation Foundation

I'll post a fuller review once I'm fully through it, but the great thing about all his xaml books is he starts using code and builds from there to markup. Imo Xaml is 99% useless, but at its heart it is at least the new GDI. If you know your way around it in code, you can either ignore the markup, or use it and not be pissed off every time you 'compile'. So this is what makes his Xaml book not just good, but actually essential.

The man has a friggin Windows tattoo. That was a shock. And still a great book.

But first up, in Japan I was working on and off on triangulation to display vectors in directX. It was intensely hot. The long and short of it is A) Converting that stuff efficiently is fairly tedious, but interesting (is that even possible, to be both?), and B) there are a lot of triangles in a typical Flash vector drawing. Like 4 tons of triangles per square inch. I don't think it will even work for the default approach, where curves are 'curve fitted' using lots of little triangles. ZMan was kind enough to send me a link to a very interesting approach from MS Research I've done a few tests, tried a few ideas that didn't work, and this seems like the best approach I've seen so far.

Also while in Japan, I found a body... I guess not everyone is happy. I'm not sure why that is so surprising, but there it is. I'm really sorry that is true.

Here is the code. The code really looks like it bubbled up during a one month on and off sloppy experimentation extravaganza in 40 degree humidity. In fact it is. Worse, it isn't even finished. But it really is almost finished (just need one more segment add routine, but I'm all busy doing swf action code stuff. Oh and need to clean up, aka start over -- but it is the thought that counts right?). That being said, here it is:

Le Code

Zoom in and out with the A-Z keys, arrows for direction. To get the other xaml files to run (in Game1.cs), you have to disable hull removal (the part that isn't finished). That is the RemoveToSegment method, on line 243 of Delauany.cs. I'll try to finish it up, and convert it to something useable, and post again. Did I mention it is messy?

Btw, if you are interested in this stuff, there is but one starting point on the web, and that is this page: Jonathan Shewchuk is the guy

Ok, who can resist a screen shot? The mighty letter R.

Ok, what were you expecting then?

posted @ 1:12 AM | Feedback (0)

Blog Stats

  • Posts - 120
  • Stories - 1
  • Comments - 380
  • Trackbacks - 47

.Net Blogs

01101 Blogs

Flash Blogs

Graphics

People