CLS '======================================================================== PRINT "PV3D effect animation file generator V1.00" PRINT "By L Lecointe Copyright 1993" PRINT PRINT "Sample program to generate a *.EFF file for the PV3D Modeler software" PRINT '======================================================================== 'flag parameter sx% = 1 'PV3D X scale (not POV scale) float sy% = 2 'PV3D Y scale (not POV scale) float sz% = 4 'PV3D Z scale (not POV scale) float tx% = 8 'X axis translation float ty% = 16 'Y axis translation float tz% = 32 'Z axis translation float rx% = 64 'X rotation in degre 0->360 int ry% = 128 'Y rotation in degre 0->360 int rz% = 256 'Z rotation in degre 0->360 int cr% = 512 'Red colors 0.0->1.0 float cg% = 1024 'Green colors 0.0->1.0 float cb% = 2048 'Blue colors 0.0->1.0 float ca% = 4096 'Alpha colors 0.0->1.0 float 'Constant control$ = "PV3D_EFFECT" nbframe% = 0 noused% = 0 noused2 = 0 flag% = &HFFFF degre.to.rad = 3.14116 / 180 CLS INPUT "Input the file name.EFF : ", name$ INPUT "Imput the description file :", descrip$ INPUT "Input the number of step : ", nbframe% INPUT "Input the start value : ", startvalue INPUT "Input the end value : ", endvalue 'flag construction 'in this case all parameter are available with this formula in PV3D 'flag% = sx% + sy% + sz% + tx% + ty% + tz% + rx% + ry% + rz% + cr% + cg% + cb% + ca% 'if only translation and alpha 'flag% = tx% + ty% + tz% + ca% 'select only translation in TX TY flag% = tx% + ty% OPEN name$ FOR OUTPUT AS #1 PRINT #1, control$ PRINT #1, descrip$ PRINT #1, nbframe%, 13, flag%, noused2 stepvalue = (endvalue - startvalue) / nbframe% PRINT stepvalue FOR i = 1 TO nbframe% sx = 1: sy = 1: sz = 1 tx = 0: ty = 0: tz = 0 rx = 0: ry = 0: rz = 0 cr = 1: cg = 1: cb = 1: ca = 1 'put the formula here 'sample formula ' ' y=sin (startvalue) ' y=cos (startvalue) ' y=startvalue^2 ' y=a*(startvalue)+b 'if n=1 you have a heart figure n = 1 R = 1 + SIN(n * startvalue * degre.to.rad) ' Equation polaire de la courbe. tx = R * COS(startvalue * degre.to.rad) ' Convertir les coordonnées polaires ty = R * SIN(startvalue * degre.to.rad) ' en coordonnées cartésiennes. PRINT tx; ty PRINT #1, sx; sy; sz; tx; ty; tz; rx; ry; rz; cr; cg; cb; ca startvalue = startvalue + stepvalue NEXT i CLOSE #1