#define FINISH_PFV_FNP "" \
    "/*\n" \
    " * Per-Frame Variables Epilogue\n" \
    " * Copyright (C) 2010, 2011 Sebastien Bourdeauducq\n" \
    " *\n" \
    " * This program is free software: you can redistribute it and/or modify\n" \
    " * it under the terms of the GNU General Public License as published by\n" \
    " * the Free Software Foundation, version 3 of the License.\n" \
    " *\n" \
    " * This program is distributed in the hope that it will be useful,\n" \
    " * but WITHOUT ANY WARRANTY; without even the implied warranty of\n" \
    " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n" \
    " * GNU General Public License for more details.\n" \
    " *\n" \
    " * You should have received a copy of the GNU General Public License\n" \
    " * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n" \
    " */\n" \
    "\n" \
    "	_Xo = _Xi\n" \
    "	_Yo = _Yi\n" \

#define INIT_PVV_FNP "" \
    "/*\n" \
    " * Per-Vertex Variables Prologue\n" \
    " * Copyright (C) 2010, 2011 Sebastien Bourdeauducq\n" \
    " *\n" \
    " * This program is free software: you can redistribute it and/or modify\n" \
    " * it under the terms of the GNU General Public License as published by\n" \
    " * the Free Software Foundation, version 3 of the License.\n" \
    " *\n" \
    " * This program is distributed in the hope that it will be useful,\n" \
    " * but WITHOUT ANY WARRANTY; without even the implied warranty of\n" \
    " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n" \
    " * GNU General Public License for more details.\n" \
    " *\n" \
    " * You should have received a copy of the GNU General Public License\n" \
    " * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n" \
    " */\n" \
    "\n" \
    "	x = i2f(_Xi)*_hmeshsize\n" \
    "	y = i2f(_Yi)*_vmeshsize\n" \
    "	rad = sqrt(sqr(x-0.5)+sqr(y-0.5))\n" \
    "\n" \
    "        /* TODO: generate ang */\n" \

#define FINISH_PVV_FNP "" \
    "/*\n" \
    " * Per-Vertex Variables Epilogue\n" \
    " * Copyright (C) 2010, 2011 Sebastien Bourdeauducq\n" \
    " *\n" \
    " * This program is free software: you can redistribute it and/or modify\n" \
    " * it under the terms of the GNU General Public License as published by\n" \
    " * the Free Software Foundation, version 3 of the License.\n" \
    " *\n" \
    " * This program is distributed in the hope that it will be useful,\n" \
    " * but WITHOUT ANY WARRANTY; without even the implied warranty of\n" \
    " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n" \
    " * GNU General Public License for more details.\n" \
    " *\n" \
    " * You should have received a copy of the GNU General Public License\n" \
    " * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n" \
    " */\n" \
    "\n" \
    "	/* Zoom */\n" \
    "	_invzoom = 1/zoom\n" \
    "	_xz = _invzoom*(x-0.5)+0.5\n" \
    "	_yz = _invzoom*(y-0.5)+0.5\n" \
    "\n" \
    "	/* Scale */\n" \
    "	_xs = (_xz-cx)/sx+cx\n" \
    "	_ys = (_yz-cy)/sy+cy\n" \
    "\n" \
    "	/* Warp */\n" \
    "	_warptime = time*fWarpAnimSpeed\n" \
    "	_invwarpscale = 1/fWarpScale\n" \
    "	_f0 = 11.68 + 4.0*cos(_warptime*1.413 + 10)\n" \
    "	_f1 = 8.77 + 3.0*cos(_warptime*1.113 + 7)\n" \
    "	_f2 = 10.54 + 3.0*cos(_warptime*1.233 + 3)\n" \
    "	_f3 = 11.49 + 4.0*cos(_warptime*0.933 + 5)\n" \
    "	_ox2 = 2*x-1\n" \
    "	_oy2 = 2*y-1\n" \
    "	_xw = _xs+warp*0.0035*(\n" \
    "		sin(_warptime*0.333+_invwarpscale*(_ox2*_f0-_oy2*_f3))\n" \
    "		+cos(_warptime*0.753-_invwarpscale*(_ox2*_f1-_oy2*_f2)))\n" \
    "	_yw = _ys+warp*0.0035*(\n" \
    "		cos(_warptime*0.375-_invwarpscale*(_ox2*_f2+_oy2*_f1))\n" \
    "		+sin(_warptime*0.825+_invwarpscale*(_ox2*_f0+_oy2*_f3)))\n" \
    "\n" \
    "       	/* Rotate */\n" \
    "	_cosr = cos(rot)\n" \
    "	_sinr = sin(0-rot)\n" \
    "	_u = _xw-cx\n" \
    "	_v = _yw-cy\n" \
    "	_xr = _u*_cosr-_v*_sinr+cx\n" \
    "	_yr = _u*_sinr+_v*_cosr+cy\n" \
    "\n" \
    "	/* Translate */\n" \
    "	_xd = _xr-dx\n" \
    "	_yd = _yr-dy\n" \
    "\n" \
    "	/* Convert to framebuffer coordinates */\n" \
    "	_Xo = f2i(_xd*_texsize)\n" \
    "	_Yo = f2i(_yd*_texsize)\n" \

