Degrafa: Declarative Graphics Framework

Degrafa Blog

Get Degrafa Now

Posts Tagged ‘autoshape’

Degrafa + HYPE Basic Example

Sunday, November 1st, 2009

On Halloween Branden Hall and Joshua Davis released the HYPE framework into the wild. As they describe it, the Hype framework is:

… a creative coding framework built on top of ActionScript 3. A major goal of HYPE is to allow newcomers to Flash and ActionScript to creatively play and express themselves while they are learning how to program.



After seeing Joshua Davis give a talk at Adobe MAX I was excited to start playing around with the framework. Well, that and seeing how Degrafa AS3 and HYPE might work together.

Below is a basic example I put together that takes some of what Branden Hall walked through in a demo and some of what was demoed at 360|Flex Indy. The example uses one of Degrafa’s Gear AutoShapes, which is drawn to a MovieClip and manipulated with the HYPE framework.

As I have more time I’d like put together some more complex examples. In the mean time, if anyone else has an example of Degrafa + HYPE, we’d love to see it.

Download the Source

Say Hello to SuperShape2D

Tuesday, June 9th, 2009

During the Degrafa presentation at 360|Flex Indianapolis, there were a number of things demoed that really seemed to peek people’s attention. One of those things was a new type of geometry called SuperShape2D.

In a sense, SuperShape2D is kind of like an AutoShape (like a Gear, Star, etc.) with properties specific to this geometry. However, behind the scenes each property is tied to some pretty complex math. The results of what you can accomplish by specifying a few values for each of these properties will give you a sense in why this geometry is called SuperShape2D. You can do some pretty wild stuff. Click the image to see the example.

SuperShape2D

With this new geometry you can now make a variety of interesting shapes, but that’s just part of the utility. You can also “morph” between shapes. This functionality was something Tom Gonzalez demoed as a part of his Axiis presentation at 360|Flex as a way to move from a plot chart to a bar chart. The crowd seemed to like that :-)  Click the image to see the example.

SuperShape Morph

So, how is all this possible? Well, it’s based on the way Degrafa geometry is drawn. In this case the base geometry is broken into a series of segments, which you can control. With more segments, the more detail you have to work with. Morphing shapes is achieved by gradually manipulating each segment that makes up the shape.

Progress is being made to wrap up the SuperShape2D and make it available for people to use. Who knows, we may even see a SuperShape3D.