Archive for June, 2009

3D Bowling Game Tutorial with PV3D and JiglibFlash

June 24, 2009 1 comment

If you are using Papervision and want to expand into applications that involve physics engines, then you might be interesting in this 3D Bowling Game tutorial at thetechlabs.  Since it’s not a full-blown game, the concepts and code are easier to deconstruct.  You may either continue to expand on the game concept or take the ideas in a different direction.

Read the tutorial here.

Categories: Flex Tags: , ,

Degrafa and FXG

June 22, 2009 Comments off

If you are interested in Degrafa and FXG, this presentation on skinning Flex with Degrafa and FXG by James Whittaker may be of interest.  This blog post includes James’ Flash Camp session slides.

View Presentation Here.

Categories: Degrafa, Flex Tags: , ,

Tiger or Federer?

June 19, 2009 2 comments

Interesting question.  Tennis magazine poses the question of which player’s 14 major championships is a greater achievement; Tiger Woods or Roger Federer?  Readers of this blog know I’m a Federer fan, but I have to confess being a huge Woods fan as well.  In fact, during my golf craze, I was a member at Hank Haney’s golf ranch in McKinney and had the great honor of meeting Tiger.  He’s one of the nicest people you will ever meet.  So, I change my mind on answering this question about every 15 seconds.

In truth, it’s a very difficult question as comparing tennis and golf (at the professional level) is quite hard.  In golf, you truly compete against the course.  It’s rare that two people even play head-to-head in a final round to determine a championship.  The interesting observation about professional golf is the margin of error.  In tennis, you can get away with one or two bad shots and still win a game.  In stroke play in golf, one bad stroke over the course of four days can literally make the difference in a championship.  I think Tiger’s greatest asset is his ability to turn bad shots into par saves that keep the round going without giving up ground.

Tennis, on the other hand, is a direct physical (although not contact) confrontation with the other player.  Golf  affords long careers; tennis in the modern era allows only the smallest window for young players to accomplish the bulk of what they can possibly accomplish in a career.  If Tiger were a tennis player, he would already be on the ‘senior’ tour 🙂

The rate at which Federer has won majors is mind-boggling in the modern game; 14 majors in six years.  Add to that a record 20 consecutive appearances in a grand slam seminfinal.  If it were not for a bout with mono in 2008, it might have been 20 consecutive finals.

So, what’s my final vote?  Ask me in another 15 seconds 🙂

Categories: Tennis Tags: ,

Papervision for Golf

June 18, 2009 7 comments

I went through my golf craze in the 90’s and eventually worked my way to a single-digit handicap.  Although I don’t play any more,  I remember a lot of famous courses and holes, including the 15th hole at Bethpage.  At US Open green speeds, this setup is diabolical, but you can’t really get an appreciation for the difficulty of a hole from a few TV shots.  So, I was really interested when I saw this post from Carlos on a 3D recreation of that hole.   Papervision fans should enjoy the 3D and golfers should gain additional appreciation for the difficulty of the hole.

Degrafa Natural Cubic Spline Demo 3

June 11, 2009 Comments off

I remember my professor in my first numerical analysis course talking about Lagrange interpolating polynomials and sampling the test function f(x) = 1/(1 + x2).  We already knew about oscillations in higher-order polynomials, so this discussion was about sampling increments.  The natural thought is to sample in equal increments across an interval.  Thus started a discussion about Chebyshev polynomials and Chebyshev nodes.  I actually found a good blog post about this very topic at John Cook’s blog.  John has a great blog on math and computation, btw.

I wanted one more demo showing how to create cubic spline nodes in script and highlight sections of the spline that were not necessarily in-between knots.  The new demo samples the above function at Chebyshev nodes in [-5,5] and fits a natural cubic spline to the nodes.  The area under the curve in [-1,1] is highlighted as shown in the screenshot below (by clicking the ‘Show Highlight’ button.

Natural Cubic Spline Approximation to a Function

Natural Cubic Spline Approximation to a Function

Click on the ‘Show Function’ button to show the original function plotted point-to-point to see a visual comparison of the spline approximation.  If you are interested, change the interpolation points and study the change in quality of fit.

Now that my trip down memory lane is complete, next step is to complete the Degrafa spline architecture (which is only about halfway there) and add a parametric spline.  I did correct a typo in the code, so you will need to update SVN.

View demo.

View source.

Categories: Degrafa Tags: , , ,

SuperShapes in Degrafa

June 10, 2009 4 comments

SuperShapes are a mathematical construction popularized by Paul Bourke, allowing a very wide range of cool (2D and 3D) images to be generated by varying parameters in a single formula.  Originally proposed by Johan Gielis [1], the superformula was a means to describe complex shapes often found in nature.  Wikipedia article is here.

You can read up on the mathematical foundation of 2D SuperShapes here.  For those wanting to experiment with 3D SuperShapes, you can start here.  I also highly recommend visiting Bourke’s geometry page here.

While I’ve been doing mundane stuff with splines, the rest of the Degrafa team has been hard at work doing really cool stuff like adding SuperShapes to Degrafa.  You can read all about it here.

[1] Gielis, Johan “A generic geometric transformation that unifies a wide range of natural and abstract shapes”, American Journal of Botany 90, pp. 333–338


June 9, 2009 4 comments

I’m always interested in computer tools for teaching math.  I recently heard about Algebrator by SoftMath and have been checking out the online animated demos.  Seems like this is a good tool for students needing help with basic concepts (kind of like a fixed-cost home tutor) or for teachers to create lessons and use as an interactive teaching aid.  I suppose it might also be useful for technical professionals wishing to quickly solve complex algebra problems, but most people I know already use Mathematica, Maple, or something similar.  Given a cost of about sixty bucks, it seems that individual students and teachers are the primary market for Algebrator.

There does not seem to be an online demo, so I can’t check it out in more detail.  If anyone is using this tool, I’d be interested in your feedback.  Check out Algebrator here.

Categories: General, Math Tags: , ,