|
|
On Mon, 8 Apr 2002 16:51:49 +0200, "Rune" <run### [at] mobilixnetdk> wrote:
> In POV-Ray x is defined as right and y is defined as up.
here is my imagination of internal behaviour :
// get dimensions from script
#declare GridX=100;
#declare GridY=100;
// get function from script
#declare Content = function (x,y,z) { ... };
// create internal image as grid of values like other images
#local Image=array[GridX][GridY];
// run loop over function - array coordinates are coordinates on xy plane
#local Z=0;
#local X=0;
#while ( X/(GridX-1) <= 1 )
#local Y=0;
#while ( Y/(GridY-1) <= 1 )
#local Image[X][Y] = Content(X,Y,Z); // nothing is reversed in grid
#local Y=Y+1;
#end
#local X=X+1;
#end
// now content is array with image/grid of values
// put it to general procedure for all image types
// this is unified procedure for all images
// no internal handling for function images
#macro CreateFunctionFromImage(x,y,z,Image)
#local ImageX = X;
#local ImageY = 1-Y // becouse first line of image is top line on screen
function{ Image( ImageX , ImageY, 0 ) }
#end
ABX
Post a reply to this message
|
|