Povray --- My first results
A few words about my first month and years with povray. I didnt code for povray all the days, there are other things to do in life, but a few month of free-time per year I invest in it.
Very first results
I started programming with povray in 2017, because I liked to check out 3D-development since years. And it was far away from a disappointment, I never expected how fast the first picture appeared on the screen. I installed povray on my Raspberry pi, copied some example-script out of the internet, and there was the
yellow sphere in front of me. Unbelievable.
The spheres quickly changed into cylinders because I mainly started with povray to see some space-related ideas get visual. Fictional and non-fictional spacecrafts, that I have had in my head and wanted to see them before my eyes, not in my thoughts only.
I started with a very simple module of a space-station, which showed me quickly, how time-intesive the development from small details can be, and without many details no model looks like a real one.
Much better the thing isnt even two years later, because I am a programmer and not a designer. Instead the programmer started to use its small module to stick many of them together to build up the
International Space Station. Doesnt look very well but i did it. Maybe it will grow and get more detailed with one of my
planned projects.
That was nice for the beginning, but still not enough for a programmer.
Stars
Somewhen a more or less realistic-looking sky filled with stars waited for me, to place my space-models before a appropiate background. By using PHP I converted a SQL-database consisting star-positions into a povray-compatible array and displayed a sphere for every star.
The most complicated part of it was to convert the values of the database, given in right ascension (RA) and declination (DE), into povray-vectors. That was far away from my math-skills, but with some help of Wikipedia and the will to accomplish it I was successful during the third bottle of beer. The result of about two to four hours hard work:
#macro MA_Deg2Vector (mRA, mDE, mRadius)
#local mRect = radians(mRA);
#local mDecl = radians(mDE);
#local mPosX = mRadius * sin(mDecl) * cos (mRect);
#local mPosY = mRadius * cos(mDecl);
#local mPosZ = mRadius * sin(mDecl) * sin (mRect);
#local mVector = <mPosX, mPosY * -1, mPosZ>;
mVector
#end
First bigger Animations
Even bevor the starry sky I realized that single pictures are nice, an animation with hundreds of single pictures looks even better. I created movable objects like robotic arms and unfolding solarcells, their scripts arent operational at the moment. But my two telescopes are, with an unfinished robotic arm inside.
Over the month and years the animations become more and more complex, that an easy-to-use timing-macro was needed. Meanwhile I can pack all the movements of the telescopes and camera into arrays to synchronize and adjust them on an easy way.
Every position of both telescopes ist defined by four values:
- rotation lower hinge
- tilt angle lower hinge
- tilt angle upper hinge
- rotation upper hinge
These I save in arrays, simulated by comma or semicolon separated strings.
SCR_Register_Base("tele-stowed", "+000,-090,+090,+000")
SCR_Register_Base("tele-stowed-half", "+000,-050,+050,+000")
SCR_Register_Base("tele-null", "-000,-000,-000,-000")
SCR_Register_Base("tele-camera", "+000,+000,+000,+070")
Alternatively:
#local mPosStowed = "+000,-090,+090,+000";
#local mPosStowedHalf = "+000,-050,+050,+000";
#local mPosNull = "+000,+000,+000,+000";
#local mPosCamera = "+000,+000,+000,+070";
#local mPos1 = "+000,+000,-040,-050";
#local mPos2 = "+000,+000,+020,+130";
I dont know yet, which of the variants will survive. Maybe the first, because this one doesnt need a concat in the next step.
The positions will be stowed into an array, which describes the timeline.
#local mArray = array[17][3] {
{ " 0", "tele-stowed", mPosStowed }
{ " 1", mPosStowed, "=1" }
{ " 4", "tele-null", mPosStowed }
{ " 6", mPosNull, "tele-null/t:-0.5" }
{ " 7", mPos1, mPos2 }
{ " 9", mPos1, mPos2 }
...
{ "20", mPos2, mPos3 }
{ "23", mPos2, concat(mPos1, "/t:0.5") }
{ "26", mPosCamera, "tele-camera/t:-0.5" }
{ "27", mPosCamera, "tele-camera/t:0.5" }
{ "28", mPosStowedHalf, mPosStowedHalf }
{ "30", mPosStowed, "tele-stowed" }
}
Index 0 of the array is the timeline in seconds, index 1 the movement of the blue telescope, index 2 of the red.
"tele-stowed" or mPosStowed uses the values declared above.
"=1" copies the position from index 1.
"t:-0.5" substracts 0.5 seconds from the timeline, to easily implement tiny differences.
This done, the telescopes will beome feeded with their informations.
SCR_SetMatrix ( "tele" , "all", mArray, 1 )
SCR_SetMatrix ( "tele2" , "all", mArray, 2 )
The script works with adjustable frames-per-seconds through the whole array and calculates the positions in the gaps.
Far away from finished but even in this early state its nice to work with it. Maybe somewhen in late 2019 I hope to publish the macro-collection, but there is much to do till then.
Earth-Moon-Shuttle
About a year after my first contact with povray I used some of my scripts to create a minute-long animation. A spacecraft folds its solararrays in a low earth orbit, flies to the moon, breaks in a low moon orbit and the journey ends with an
eath-rise like the one filmed by Apollo 8
The video is from April 2018, since then I improved some parts of the animation. The sky shows realistic stars and constellations, the earth horizont looks littlebit better, the spacecraft has some more details and I could publish the whole thing in anaglyph-stereo.
But I didnt renew the animation, to many parts are still in work and others not able to run without errors. Doesnt matter, I have much to do and other animations to render.g.
Single
Stereo-View