|
|
Stefan Riedel wrote:
>
> How is it possible to call a C? function (one which takes a time and a
> day and gives back
> a direction vector - the sun's position for an animation of shadows over
> a year)
If you only need to call the function once per frame, and know the
calling parameters before you start to render the frame, you can write
the function as a standalone program that takes a command line and saves
a text file containing the desired vector. Then, in your .ini file, add
a line like this:
PreFrameCommand=C:\Stuff\Sun.exe -t 0800 -d 03041999 -p 800315e472238n
--- or whatever parameters your program takes. Then use the file
reading ability of 3.1 to read in the vector in the pov code for the
frame. Or get the macro SunPos (by ingo) at
http://twysted.net/macroscope, tinker it a bit to output your desired
format, and do the calculations with it strictly in your POV code.
Jerry Anning
cle### [at] dholcom
Post a reply to this message
|
|