www.delorie.com/gnu/docs/xaos/xaos_10.html   search  
 
Buy GNU books!


An fast realtime interactive fractal zoomer

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1.4 Viewport functions:

Current viewport is part of fractal context, but I describe it here separately to simplify orientation in this document. XaoS uses 4 numbers to specify viewport--first two are real and imaginary coordinate of center of view and next two are real and imaginary ranges. I decided to use both ranges instead of "rectangular" view to allow specify viewport more exactly to make animation nice even in unusual window dimensions. Of course you should use both numbers equal. Viewport is before calculation scalled according to current window dimension and smalles possible viewport where image is correct(i.e not too wide/shrink) containing whole selected viewport is displayed. So you should expect a bit more stuff on the screen than you choosed.

Function: (angle float) (* - Just when fastrotate mode is disabled)
Set rotation angle in degrees

Function: (view float float float float) (*)

This function simply sets viewport.

Function: (animateview float float float float) (*)

This function is very similiar to previous one, except that it is expected that view will be changes just slightly so recaluclation with just ANIMATE priority (see fastmode command) is performed.

Function: (moveview float float)

This is animation function. For whole time selected by usleep after this frame will be spent by moving smoothly center of viewport to selected one

Function: (morphview float float float float)

This function is similiar to previous one except it allows also zooming/unzooming

Function: (fastrotate boolean)
Enables/disables fast rotation mode. When fast rotation mode is on, XaoS is slower, but changing of angle does not require recaluclation.

Function: (morphangle float)

This function smoothle morphes current angle to new one. Parameter is in degrees. Requires fastrotation mode enabled

Function: (autorotate boolean)
Enables automatical continous rotation. Works just when fastrotate mode is enabled.

Function: (rotationspeed float)
Adjust rotation speed. Parameter is in degrees per second.

Function: (zoomcenter float float)

This function sets center where you want to zoom/unzoom (where you pointed mouse in ugly interface). Parameters are not screen coordinates but coordinates in the fractal.

Function: (zoom)

Starts zooing to point choosed by zoomcenter. This works in same way as button1 in the ugly interface. I don't recommend using this in manualy done scripts since it is not easy to expect result and result should differ slightly at different platforms/framerates. After zooming stops it is recommended use animateview to fix this possible error. In manually writeln scripts I expect Zooming is performed until stop command is executed.

Function: (unzoom)

Like zoom but starts unzooming

Function: (stop)

Stops zooming/unzoming (not imediately but after short time required for slowdown)

Function: (maxstep float)

Selects speed of zooming/unzooming. Step specifies how large amount of range will be taken away each 1/20 of second. (0 means nothing, 1 means everything - this value is incorrect) Higher values means faster zooming

Function: (speedup float)

When zooming/unzoming every 1/20 of second the speedup value is added to current step until maxstep is reeached. So this value selects speedup/slowdown of animation. Both this functions are more for internal use of XaoS then for manually wrote scripts.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003