Archive for the ‘Uncategorized’ Category

PureMVC Presentation by Cliff Hall

January 22, 2009 Comments off

You can’t get much better than the creator of PureMVC himself 🙂  This Connect session was recorded at the San Diego ADUG meeting.

View here and enjoy!


Geolocation in Papervision 3D

January 8, 2009 Comments off

The title says it all – a great blog post by Andy Zupko.  Check it out!

Categories: Uncategorized

PV3D – Quaternions and Slerp

December 31, 2008 Comments off

If you’re interested in learning more about quaternions and slerp, there are some good demos online at the site.

Quaternion Explorer

Slerp Explorer

enjoy and good luck with your PV3D efforts!

Vertex Animation in Papervision

November 10, 2008 Comments off

I’m still really jammed up on time right now, but have to take a couple minutes to post some props for this really nice vertex animation demo using PV3D.

Source code is a available – thanks to Bartek for both the source and a nice demo!

Using Xray with Papervision

October 29, 2008 Comments off

If you are a regular user of PV3D, you’ve probably already seen this, so this notice is for those who may have been away from Papervision for a while (like me).  John (aka Superman) Grden has modified Xray to work with Papervision so you can get detailed information on the objects in your scene.  While clearly useful for debugging, I can also see numerous opportunitites for using this tool in optimization as well.

Read more about it here and take time to pass only some props to John!

Papervision Daily

September 26, 2008 1 comment

So, are you looking for a regular fix of Papervision coolness (lucky you – no 3D in my immediate future)?  Then, look no further than the Daily Papervision 3D blog.  Adding this one to the blogroll and I do check it daily 🙂


Spline Tangents

September 15, 2008 1 comment

In calculus, we are taught that the slope of the tangent to a curve, y = f(x) at some point x=c is f'(c). What about a parameteric curve?  The curve is parameterized on t, not on x.  We do have derivative information, but the derivatives are with respect to the curve’s parameter.

Fortunately, the chain rule provides the necessary result; dy/dx = [dy/dt]/[dx/dt].  All Singularity parametric curves (including composite curves) return position and derivative at a parameter value. This information can be used to compute the slope of a tangent to a spline such as Catmull-Rom, as shown below.

Tangent to a Catmull-Rom Spline

Tangent to a Catmull-Rom Spline

If dx/dt is sufficiently small, the tangent slope approaches infinity and this should be tested and compensated for in application code.  The demo from which the above screenshot was taken allows an arbitrary number of points to be defined in the drawing area.  A Catmull-Rom spline is fit to those points. Move the slider to watch a 40px segment drawn tangent to the curve as the parameter varies from 0 to 1.

To compute the tangent segment, the slope of the spline at the specified parameter along with a small positive and negative perturbation in x is used to generate two points on the tangent in opposite directions.  Unit vectors in each direction are created.  Two points, each 20px along each unit vector, are generated to create the line segment.

The demo is contained in a single MXML file and may be obtained from the Downloads section in this blog. Or, you can download the .zip file here along with Singularity here.  You need to have Singularity on your computer in order to build a Flex project from the supplied MXML file.

If we have a well-defined tangent to a curve at a point, not only can we orient sprites along the curve, we know the angle the tangent makes with horizontal.  That information, combined with arc-length parameterization allows sprites to be distributed uniformly along the curve with orientation control.  Stay tuned for a new demo in a few days illustrating these observations.