banner ad

Wednesday, March 19, 2008

3D carrousel in AS3 v3: rotating menu »

Based on the 3D carrousel  in AS3 post I added z sorting and depth management in the last post where I sorted the array of items by z distance to the camera using the Array.sort() method. The following function is the one that evaluates all z...

Monday, March 17, 2008

3D carrousel in AS3 v2: Depth sorting »

Based on the 3D carrousel v3 post I migrated the code to AS3.  I also added a  3D depth sorting function based on the following work.  The principle is simple, you verify the distance each clip is from the 3D camera using pythagoras...

Wednesday, January 30, 2008

Towards Z in 3D and now in AS3 »

This code is heavily based on the 3D flythrough post  I had written in AS2.  I rewrote it in AS3 since most of if not all of my 3D experiments are based on this engine.  The equation bellow moves each element's Z position to sync with...

Saturday, June 16, 2007

Placing 3D object on Sphere v3 »

Wanted to bring my 3D card flip code into my latest series of  3d spherical placement posts.  Results are as follows.  Interesting, needs some more work though.

Friday, June 15, 2007

Placing 3D object on Sphere v2 »

Follow up on the placing 3D object on sphere.  The following code re-evaluates the xyz properties and their relation to the sphere via the following code. This enables me to set the slider to control the spheres placement in 3D space.  Use...

Thursday, June 14, 2007

Placing 3D object on Sphere v1 »

Follow up on the placing 3D object on sphere.  The following code checks if the clips 3D z property is above 0 and makes the clip switch between frame 1 (where it's orange) and frame 2 where its blue. This gives a better depth illusion and is...

Wednesday, June 13, 2007

Placing 3D object on Sphere v0 »

I created a 2D circle and placed 100 clips on top of it. Basing my calculation from the previous 3D sphere experiment.  The XYZ rotation comes from this post and the skewing is a result of steradian mathematics.  There is nothing new here,...

Thursday, May 10, 2007

Cos bell shaped 3D movement v3 »

Based on the 3D examples previousely posted, You can create any cocktail using trig functions to create all types of curves.  In this case just by playing around, no scientific manner I created this equation: // Set scale this._xscale = this._yscale...

Wednesday, April 18, 2007

3D carrousel v3 : rotating menu »

Based on the 3D carrousel v1 post I added the code of the circular rotating menu  and created the following navigation.  Click on any icon to rotate the caroussel and get the icon to move towards you.  Use the sliders on the left to...

Tuesday, April 03, 2007

3D carrousel v2 »

This is the official update & fix of the heavely commented version of the 3D rotation menu. Based on the 3D carrousel v1 post I create the following rotation variables : var time = 0; // current time var cAngle = 0 // current...

Monday, April 02, 2007

3D carrousel v1 »

In case you never had a chance to see the ultra simple 3D Camera in action, refer to the  3D XYZ post.  The camera script is simple. Based on an object I create whith initial x,y,z and target dx,dy,dz properties and calculate position using...

Thursday, March 29, 2007

3D carrousel v0 »

Alot of people were asking for this revision, so here it is. Using the  3D XYZ post I created a circle in 3D space by placing a conventional 2d circle on the 3D axis (a.k.a the circle y remains 0 whereas we increment xz values) using the following...

Tuesday, January 23, 2007

3D sphere v1 »

Got a sphere to rotate around in 3D sphere. The theorem of the bucky ball turned out to be too complex to implement.  The miniml approach came from the wikipedia sphere definition.   I implemented this equation by creating the following...

Monday, January 22, 2007

3D xyz rotation v7 »

Got a cylinder to rotate around the 3D sphere.  I am still searching for a  simple equation for creating a sphere in 3D.  I found this site that describes the theorem of the bucky ball. Great stuff, based on mathematics also known fullerene...

Friday, January 19, 2007

3D xyz rotation v6 »

In this step for creating a sphere that rotates around a 3D spehere I decided to place my clips using two different functions.  Now I know this can be done more abstractly, but I wanted to show that in order to place clips on 2 different axises...

Thursday, January 18, 2007

3D xyz rotation v5 »

Creating a circle to rotate around a 3D spehere uses the same equations as the 3D XYZ post.  What I am doing here is creationg a circle in 3D space by placing a conventional 2d circle on the 3D axis (a.k.a the circle y remains 0 whereas we increment...

Wednesday, January 17, 2007

3D XYZ rotation v4 »

since I decided to put a hold on the 3D cube experiments, the logical next step would be a 3D sphere. I went back to the xyz rotation post and worked on putting a sphere together. Some of the experiments were successfull and some came as a surprise....

Tuesday, January 16, 2007

3D cube v5 »

I will put a halt on to the 3D cube experiments as I will need to investigate further into the design of solids with freeform surfaces theory for correct 3D shape modeling, rotation and z sorting. I updated the 3D cube v4 post to create an automatic...

Friday, January 12, 2007

3D cube v4 »

Based on yesterdays 3D cube v3 post.  I eliminated the 8 corner clip visuals and used the drawing API line.beginFill to fill the square.  I am experiencing a small problem, though.  The squares 6 sides are not aware of their Z position...

Thursday, January 11, 2007

3D cube v3 »

Using the drawing API we connected the4 clips together to create a square inside the 3D cube v2 example. I added all other point connecteors in the connectDots array to connect all point in a cube.This specifies the order at which I want the drawing...

Wednesday, January 10, 2007

3D cube v2 »

Using the drawing API you can easely connect the dots from the 3D cube v1  modelPoints array.  I created a new array named connectDots in which I specify the order at which I want the drawing API to execute the lineTo (from which dot to which...

Tuesday, January 09, 2007

3D cube v1 »

To get the cube to react to mouse movement, I added the following lines of code. In the 3D  xyz rotation function (named renderRotate), I calculate the mouse x and y position relative to the stage (values range from 0 to 100) and then convert...

Monday, January 08, 2007

3D xyz rotation v3 »

In my last post, I elaborated on the equations to rotate multiple clips in 3D space by adding 3D panning and zooming.   Using those equations, I am now creating 3D models using an array I define as modelPoints in which I have all points positions...

Friday, January 05, 2007

3D xyz rotation v2 »

In my last post, I showed the equations to rotate multiple clips in 3D space around a sphere. In this example I integrate the 3D camera equations based on the 3D pull & camera Zoom post. This enables us full control over our 3d world. //...

Thursday, January 04, 2007

3D xyz rotation v1 »

This is not rocket physics, working off the 3D sphere rotation post, the final  equation needed to rotate multiple clips in 3D space along the x y and z axis is found bellow.  This comes form translating the a clips x,y,z  properties...

Monday, December 18, 2006

3D sphere rotation v6 »

Come a long way from the grid experiments.  Next step would be the rotating cube experiments.  Argh!!!  No I wont, the code and the mathematics to rotate points  in 3D space is written bellow, but I dont want to put one of those...

Friday, December 15, 2006

3D sphere rotation v5 »

I might be in a playfull mood lately, must be the holidays ccoming up. Wither way my script are somehow festive and lack seriouseness.  Nevertheless this one is an interesting visual effect.  I took the 3D sphere rotaion v3 script and added...

Thursday, December 14, 2006

3D sphere rotation v4 »

In my last post, I showed the equations to rotate multiple clips in 3D space around a sphere. What I forgot to show is how to keep z depth values during the rotation.  In other words elements closer to you will rotate and will keep their respective...

Tuesday, December 12, 2006

3D sphere rotation v3 »

In my last post, I showed the equations to rotate multiple clips in 3D space around a sphere. What I forgot to show is how to keep z depth values during the rotation.  In other words elements closer to you will rotate and will keep their respective...

Thursday, December 07, 2006

3D sphere rotation v2 »

In my last post, I showed the equations to rotate a clip in 3D space around a sphere. The effect did not look that great, mostely because skewing a jpeg in 3D space is not what flash does best.  Using the BitmapData class would be alot better...

Wednesday, December 06, 2006

3D sphere rotation »

Looking to rotate a clip in 3D around a sphere?  Simulating the rotaton of a particle around a planet.  I wanted to rotate my clips around this spehere, yet I needed to find an equation where the closest elements rotates away from me and...

Tuesday, December 05, 2006

3D pull and Camera Zoom »

I was looking at the Leo Burnett Big Ideas come out of Big Pencils site and its use of a 3D camera and realised a whole year had gone by since I last posted 3D camera zooming and panning scripts. I also realised that my code had changed throughout...

Friday, December 01, 2006

grid in 3D v3 »

A smart combination of the grid with mask post and the grid 3D v2 post.  With some work using bitmapData or some of the flash 8 filters, I can only assume that results will be more than satisfactory. Move your mouse over the squares to see the...

Wednesday, November 29, 2006

grid in 3D v2 »

This is based off the grid 101 v3 mouse reaction post and simply puts it in 3d.  The effect is eye candy.

grid in 3D v1 »

using the z slider physics code, we can now take our 2D grid and place it in a 3D world.  Each grid cel gets a random z coordinate assigned and given the the camera objects coordinates, places itself within the 3D space.  This creates the...

Thursday, November 02, 2006

3D rotation menu 7 »

This elegant smooth effect is what you get when you use steradians to calculate the rotation of the clip in 3D space.  The mouse cursor x position will rotate left or righ and the code here is the same as for the steradians v6 post except for...

Wednesday, November 01, 2006

steradians v6 »

Making the las stradian rotation incorporate multiple clips. I added the numClip variable to assign the number of clips and the angleIncrement variable that splits the clips insto even increments in our 360  degree pie.  Teh rest of the code...

Tuesday, October 31, 2006

steradians v5 »

I added Z slider physics to the last steradian rotation post to get my clip to rotate around a  radius in 3D space.  Creating this 3D effect relies on assigning two variabl;es to the movieClip being rotated.  The z and _z properties...

Monday, October 30, 2006

steradians v4 »

Based on the steradians post  and the various 3d skew post I have worked on recently. I decided to rework the 3D rotation menu (a popular experiment).  This is a simple MC rotating around a 3D radius.  The effect relies on the z coordinate...

Monday, October 09, 2006

3D flip v5 »

Took the 3D flip v4 code and added a Z axis in order to simulate the flip in 3D space.  Much of the code is based on the Z slider physics post where a focal lenghth defines the scale.  We first calculate the 3D position of the object and...

3d Flip v4 »

Yet another installement of my flip a clip in 3D along the y axis series,  I decided to rework the code and apply it to the 3D skew posts. The following reworks the code, I find it easier to work with and more meneagable for the next series of...

Saturday, September 23, 2006

Z slider physics »

This series is dedicated in understanding slider movements.   Create 10 identical clips and arrange them one after the other along an imaginary z axis.  Create a camera object and compute its position throught the slider.This version explores...

Tuesday, September 12, 2006

3D flip v3 »

Following through with my flip a clip in 3D along the y axis series,  I decided to rework the code and apply it to the 3D skew posts. The following code skews a clip by changing its _xscale from -100 to 100.  if the value of the scale is...

Friday, September 08, 2006

3D flip v2 »

This bases itself on the code found in my flip a clip in 3D along the y axis  post. The following code adds  a blur effect to make the whole flip look more real. The blur code is straigtforward, import the class (flash 8 only), create your...

Monday, August 21, 2006

3D rotation menu v5 »

Use your mouse to rotate left/right and choose your item in this latest addition to the previous 3D rotation menu.  I added one extra lines to the code, it simply tracks the user horizontal mouse  position and adds or substracts to the rotation...

Wednesday, August 09, 2006

3D flip »

If you want to work in 3D and flash you will soon notice that a  mocieClip has no depth (a.k.a it is 1 pixel deep) and no back side.  I mean, if you were to rotate a clip in 3D along the y axis you will soon find out that the back is only...

3D rotation menu v4 »

I had to add a blur effect on the last 3D rotation menu. Many people commented on its necessity as it makes this carousell feel real.  I added a few extra lines to the code, mostely implementing the blur class and changing clips blur values according...

Monday, July 31, 2006

3D rotation menu v3 »

Updating on the last 3D rotation menu post. The perspective needed to be tilted in order to fully get the 3D script to look realistic.  I added an extra line to the code, changing the clips y variable hence correcting the items y position according...

Saturday, July 29, 2006

3D flyThrough v1 »

The 3D engine it resides in this simple 3D flyThrough is buit using my previous 3D perspective equations and is robust enough to get modified in a million ways. In the following posts I will be adding rotation and mathematical charting using this...

Friday, July 28, 2006

3D rotation menu v2 »

Popular demand lead me to update the 3D roation menu v1 script.  What was lacking in the previous version was some type interactivity.  The Items were rotating yet you cannot flip and stop among the elements.  The following code improves...

Wednesday, May 03, 2006

3D particles animation »

Based on the particle animation v1 script, I decided to add a 3D engine with pullthrough.  Now particles deviate from their rotation angle and find new paths to follow while residing in a three dimensional space. I have to admit that the resultung...

Thursday, April 13, 2006

Circular rotation v3 »

The last few posts, I have been deconstructing the mini usa roofstudio site done by San Francisco design firm EVB. The foolowing script is a reconstruction of the effect found on the site.  to get the cool 3D effect I combined both  circular...

Circular rotation v2 »

This is an attempt to recreate a similar menu I have seen on a website no to long ago. I Added some fun into the circular rotation post I wrote a week ago. I decided to use a second "for" loop to get the circle to loop 3 times on different...

Tuesday, April 11, 2006

Pullthrough v2 »

Working on the previous example I decided to apply a similar patterns to the circular rotation script I had written a few posts back.  Results are nice especially when playing with the sliders

Pullthrough v1 »

When immersed in a 3 dimensional world, 3D items can pull towards or away in two ways.  One of them is the camera pull, similar to a zoom  we often do when taking a picture on our digital cameras. The second is a  item  moving along...

Thursday, April 06, 2006

3D sherical navigation »

In my laste 3 posts I described the basics behind the following script.  The 3d  xz rotation post explained the rotation of an object in 3D space on both the x and z axis, the mouse tracking post described a technique that makes mouse movement...

Wednesday, April 05, 2006

3D circle rotation »

Based on the mathematics of the last 3D XZ rotation script I decided to play around and make use of those equations to create cool 3D effects. The experiments gave way to the following example.

3D XZ rotation »

The following  is leading to a 3d spherical navigation script.  First we need to know how to rotating along the x axis and the z axis.  The combination of both will trigger a nice spherical effect. Mathematicaly, the equation is based...

Wednesday, March 22, 2006

Simple 3D flythrough »

I tried to write the simplest 3D flythrough script, as short as a few lines.  In the following example, individual items move in 3D space along the z axis by increasing their z value.  I realise that for quick and dirty 3D worlds, making...

Friday, March 10, 2006

3D starfield simulator »

3d starfield simulations are fun, expecially for screensavers.  I sightly modified the 3D panning script by adding the following speed varaible, see full code bellow. //Increase z position with speed this.z -= this._parent.oCamera.s; On...

Monday, March 06, 2006

3D Panning »

In my previous examples, I made sure to explore elements of a 3D engine.  Mathematics put asside, once one can zoom in a 3D world, one usually wants to pan left and right using the mouse cursor. I used the following to lines to create panning,...

Monday, February 20, 2006

3D skew v2 »

Skewing is not available in ActionScript outside of the transformation matrix. Macromedia's article Using Matrices for Transformations  is well written yet a bit advanced for normal users who want to simulate 3D skewing in some part of their projects....

Sunday, February 19, 2006

3D skew basics »

With the new transformation matrix in flash 8; I suddenly realised that most people had forgotten how to skew images in flash.  Using pre built classes can be a lengthy process.  The basis of all 3D engines is the simulation of an image rotating...

Monday, February 13, 2006

3D linked menu »

Sometimes the  most complex things can evolve by correctly combining 2 or 3 basic scripts.  In the following example I used the 3D camera and combined it with the hi lo hitTest technique.  The results are convincing and quite nice; dont...

Wednesday, January 25, 2006

3D rotation menu v1 »

I was looking at the beautiful and elegantly well programmed site comcastic. The site was a joint collaboration between goodby silverstein, eric natzke and the barbarian group. The site has lots of kinematics. A subject...

Tuesday, January 24, 2006

3D rotation v4 »

I was playing around the 3D perspective camera and the 3D rotation equations last night and came up with some type of abstract 3D sculpture reminiscent of what people like to do with processing.  Here it goes :

Monday, January 23, 2006

3D Zoom menu v3 »

I often refer back to robert penners motion tween math functions since they are easy to use and often make a big difference in a script. Some programmers in the flash community truely beleive he is THE true guru. Even if it was published more than...

Friday, January 20, 2006

3D Zoom menu v2 »

I wanted to rework thepreviousely posted  3D zoom menu engine. I reworked the 3D scale formula which became // current z position var zpos = (z-oCamera.z); // Calculating actual scale values scale = fl/(fl+z) var scale = focalLength/(focalLength...

3D tilted rotation v3 »

Here is a nice example of the 3D tilted rotation example using multiple clips.

3D tilted rotation v1 »

Ever wanted to rotate something around a circle but wanted it to have somekind of a tilted angle.Like the moon around the earth or earth around the sun.  Using the 3D rotation post, I added one variable to get things to tilt. Although I had to...

3D rotation v3 »

 Here is a nice example of the 3D rotation example using multiple clips

3D rotation v2 »

We are trying to get a 3 dimensional point in flash, but you must do that by taking what is called an ordered triplet and turn it in to an ordered pair. this is an ordered triplet: (x,y,z) this is an ordered...

Wednesday, January 18, 2006

3D rotation v1 »

There are three ways to orbit (or rotate) an object in 3D. Z-rotation is the one we use when we manualy rotate an Movie Clip using the flash transform tool or through the  _rotate property. Z-rotation is similar to rotating a steering...

Tuesday, January 17, 2006

3D Zoom menu »

I was looking at the latest bbdo worldwide and matthew mahon site; noticed its a the latest trend; creating 3D navigations and using them as menu to watch the content.  Also notice that the guys at wefail.com used it alot. Since a monitor...

Monday, January 16, 2006

3D perspective part 2 »

As seen in the previous 3D perspective example; Once a 3d camera scripted, we can start playing around with object positioning on the x,y and z axis.  In the following example I am placing 20 Items in random x, y and z coordinates.  The moving...

3D perspective part 1 »

I want to make a brief explanation of 3D perspective. Actually I meant of simulated 3D perspective, since true 3D does not exist inside a computer screen.  The basic formula for 3D perspective is f : focal point z : object position scale...

Monday, January 09, 2006

3D part 1: focal point »

Simple rule to respect when we want to simulate 3D in flash. Focal point vs the computer screen. The focal point being the point far away in the horizon where things fade away.  In the following example I used the equation: f : focal point z...

Friday, January 06, 2006

3D part 3 : multiple Items  »

Using yesterdays scripted threeD example, we simply have to add a for loop in order to get many particles to spin in our newly created 3D world.  Using a sweet randomiser function that returns a random integer between two specified parametrers...

3D part 2 : positioning »

BYour eye perceives the world in two dimensions only. 3D vision is a construction of your brain; Have you ever seen a mirage? On a hot day, warm air trapped near the surface of the road reflects the blue sky and you think you are seing a puddle of...