Super Shape in 3D

Super Shape in 3D

Couple of days before I stumbled upon Andre Michelle Super Ellipse example. You can think – nothing special but it is like magic how fast it performs and deforming in different 3D shapes. Next thing after Super Ellipse is Super Shape. It is a lot more complex in computation and I thought Flash would stack with it. But after some test it turns to be possible.
You can find a lot more info on subject at Paul Bourke website.
I have created a demo application that shows basic usage of Super Shape class. Hype project was used for Sound Spectrum control and options adjustments upon sound change. This is a very dirty 3D rendering using built in Flash methods with very very primitive triangle Z sorting.

Here is the source for the class
Demo Application

Simple code example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// create instance with resolution 24
var ss3d:SuperShape3d = new SuperShape3D(24);
 
// update shape by applying 2 Super Shapes parameters
ss3d.update(1.0, 1.0, 7.0, 0.2, 1.7, 1.7,
			1.0, 1.0, 7.0, 0.2, 1.7, 1.7);
 
var proj:PerspectiveProjection = new PerspectiveProjection();
proj.fieldOfView = 75;
var matrix:Matrix3D = new Matrix3D();
matrix.appendScale(64, 64, 64);
matrix.appendTranslation( 0, 0, 128);
matrix.append(proj.toMatrix3D());
 
Utils3D.projectVectors(matrix, ss3d.wVerts, ss3d.projectedVerts, ss3d.uvts);
 
this.graphics.clear();
ss3d.draw(this.graphics, 1, 0x333333, 0);

13 Responses to “Super Shape in 3D”


  1. 1 makc

    needs some easing, smooth transformations would make it perfect

  2. 2 Clemente Gomez

    I was thinking the same as the poster above me. The jaggedness makes it seem like its not following the beat. But other than that this is pretty cool. I haven’t messed around with PerspectiveProjection yet but this is a cool demo.

    P.S. On a side note, what track are you playing in that demo??

  3. 3 Eugene

    @makc @Clemente Gomez
    I know that easing and better 3D render and a lot more could be done. But this is fun for me. If I need more I will do it ;)

    Sound: Ratatat – 9 Beats – track 5

  4. 4 Dominic

    that’s really cool, how did you do the lighting effect ?
    I did something a little like that a while ago, well I didn’t have any cool shapes or sound going on but the shading was pretty nice http://www.signalsondisplay.com/blog/?p=219, and http://www.signalsondisplay.com/blog/?p=204.

    Great work as usual!!

  5. 5 dVyper

    A very nice visualiser! Perhaps you could code it so that we could input our own music?

  6. 6 Jloa

    As said above, ‘add some smooth transitions’. Well, or don’t cause i’m about to do it as soon as my downloading finish ^_^

  7. 7 tm

    these visuals look quite similar to the visualizer that barbarian group developed (and eventually sold to Apple for iTunes, and is now the default visualizer)

  8. 8 francoe

    Can you point me how can I use the code example?
    I want to learn how it works, but I don’t know how implement it.
    If I simply create a clip and apply the code to a frame, and store the class with it, tells me that can`t find the ru.inspirit.geom path. If I recreate that folders, and point the class inside it, gives me severals debub errors.

    Can you show me a simple starting point?

  1. 1 » astatic notes – Adobe Flash experiments and stuff » Russian Online Rel
  2. 2 Supershapes [Flash, Hype] - Audio-reactive superformula creations // app by | CreativeApplications.Net
  3. 3 Supershapes [Flash, Hype] : monogocoro ものごころ
  4. 4 Supershapes audio visualizer by Eugene. via CreativeApplications — Some Random Dude
  5. 5 2 “new” 3D “primitives” | HIDIHO!

Leave a Reply