http://vimeo.com/moogaloop.swf?clip_id=16337818&server=vimeo.com&fullscreen=1&show_title=1&show_byline=1&show_portrait=0&color=01AAEAI often meditate on this video by Lazarus Plath.
.
This is some code to help focus on how Quasz works and what you can do. It is not Terry's code but Makc's, which i have altered to use as an explanatory tool
public function doMandelbrot (centerX:Number, centerY:Number,centerZ:Number, centerH:Number, zoom:Number, power:Number, Z:IComplex, C:IComplex, startY:int = 0):void {
bmp.lock ();
for (var i:int = 0; i < 465; i++)
for (var j:int = 0; j < 232; j++)
for (var k:int = 0; i < 232; k++)
for (var w:int = 0; j < 232; w++) {
var cx:Number = centerX + (i - 232.5) / zoom;
var cy:Number = centerY + (j - 116.0) / zoom;
var cz:Number = centerZ + (k - 116.0) / zoom;
var ch:Number = centerH + (w - 116.0) / zoom;
C.init (cx,cy,cz,ch);//
There is an option to customise this initial scalar set in the parameters section of Quasz//
Z.init (cx, cy,cz,ch);// '' //
var m:int = 0, n:int = 20;
while (m < n) {
// Z = Z^P + C
Z.pow (power); Z.add (C);//this sequence is only applicable to the mandelbrot et al, Quasz provides a function
//input facility//
// bail out?
cx = Z.re ();
cy = Z.im ();
cz = Z.imj ();
ch = Z.imk ();
if (cx * cx + cy * cy > 4) break;//although this should be generalised, Terry seems to have left it as it is.
m++;
}
bmp.setPixel (i, j + startY, 0x10101 * int (255 * m / n));
bmp.setPixel (k+ startZ, w + startH, 0x10101 * int (255 * m / n));//this would probably involve another layer, or some kind of offset, or even layers.//
}
bmp.unlock ();
}//
Based on code by makcQuaternion Surface Zplot, is a sophisticated application which is based on the extension to the "complex" couples we call the quaternion quads or quats! That unenviable foursome of "real" scalars that Hamilton ordered
into existence after the unruly triples or threesome
would not behave! Well they do say "three is a crowd!"
Quasz is sophisticated because it has its own parser, limited but nonetheless powerful, and this enables it to parse compile and link user ( thats you and me -hi
) generated code and formulas, and then run them. You will notice it doing this when you put your own code in.
However Quasz has its own inbuilt or precompiled library of functions and you often do not need to put your own stuff in. so the first thing you can change is your function.
To do his you go to the
edit menu and go to
functions and typesAfter you have chosen what function you want to create or explore press
ok and wait.
You do not have to let it complete the plot but you do have to let it compile your choice.
The next choice in the
edit menu is
parameters Here you will set up the fixed value for the quaternion tensorvector that will be used later in the mandelbrot process or the julia process or, surprise surprise
octonion, or cquat processes.
The main controls you might alter here are the scalar of iterations or the bailout scalar.
There is a section called "slice" but it would be better called "dimension parameters", or "tape measures".
Simply put we have a tool that cuts space in 3 dimensions. We are going to represent this on a surface which only has 2 dimensions cut out of space, so we are going to go mental!
We have to "imagine the 3rd dimension as coming out of the screen! imagine that!
Hey,it gets worse!
In quads we have four ordered scalars, that is four tape measures, so we can not easily squash
this data set into our 2 dimensional screen even if we imagine the 3rd and fourth dimensions as coming out of the screen !
So What we do is just show three and match them up with the 3 dimensions on the screen
X to the right and horizontal
Y to the top of the screen and vertical
, and
Z coming "right atcha" and horizontally near or far from you
But then we have rotation!
The easiest way to grasp this is with your hands! Make out like you are going to pick up a tray ! then your left hand has a thumb, for the
Y direction an index finger for the
Z direction and a second finger for the
X direction. your right hand gives you the mirror image and helps with those >π turns!. You still got to imagine z as coming out of the screen.
With this in mind the negative scalars represent "
clockwise" rotation! These "digits' are the axes of rotation, and i guess its best to start with a
Z axis to rotate around.Good Luck
When you have chosen press
draw or
ok and let the app compile your new settings and plot the image.