Minimalist4DGroupInit Actionscript

Table of contents | Previous document | Download Minimalist4DGroupInit.as | SWF!T Homepage

RCSfile: Minimalist4DGroupInit.as,v  Revision: 1.2  Date: 2003/03/17 22:53:05  

Copyright 2003 Orgdot AS. All Rights Reserved. http://dev.swfit.com
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.


Init values for a minimalistic/experimental 4D Camera that films flash movie clips:
author      Olaf Havnes
version     Revision: 1.2  Date: 2003/03/17 22:53:05  
since       SWFIT1.0


Factors for scaling up from the mathematic world to the flash stage.

/:POS_FACTOR_4D = 200;
/:SCALE_FACTOR_4D = 300;

A very experimental rotation

/:ROTATE_FACTOR_4D = 360;

The number of particles

NUM_PARTS = 10;
pcounter = 0;

Randomize the start values

CENTER_X = 0;
CENTER_Y = 0;
CENTER_Z = 1;
CENTER_Q = 0;

RANDOM_POS_DIVISOR = 1000;
RANDOM_POS_OFF_DIVISOR = 10000;
RANDOM_SPEED_DIVISOR = 100000;

px = CENTER_X + (random (1000) - 500) / RANDOM_POS_DIVISOR;
dpx = (random (1000) - 500) / RANDOM_POS_OFF_DIVISOR;
vx = (random (1000) - 500) / RANDOM_SPEED_DIVISOR;

py = CENTER_Y + (random (1000) - 500) / RANDOM_POS_DIVISOR;
dpy = (random (1000) - 500) / RANDOM_POS_OFF_DIVISOR;
vy = (random (1000) - 500) / RANDOM_SPEED_DIVISOR;

pz = CENTER_Z + (random (1000) - 500) / RANDOM_POS_DIVISOR;
dpz = (random (1000) - 500) / RANDOM_POS_OFF_DIVISOR;
vz = (random (1000) - 500) / RANDOM_SPEED_DIVISOR;

pq = CENTER_Q + (random (1000) - 500) / RANDOM_POS_DIVISOR;
dpq = (random (1000) - 500) / RANDOM_POS_OFF_DIVISOR;
vq = (random (1000) - 500) / RANDOM_SPEED_DIVISOR;

len = Math.sqrt (px * px + py * py + pz * pz + pq * pq);