Frame System

Miguel Angel Gómez Márquez atomicmx at gmail.com
Sun Oct 1 05:20:53 CEST 2006


It shouldn't be too hard, i mean, povray already included the clock
parameter.

I will explain a little bit of what i did with flash, and how could it be
implemented in Kpovmodeler.

Well, if we  group objects (i am talking about POVRay code) and set them a
translation and rotation actions with variables , then we would have some
mobile structures (i used it for aircrafts, and i would gladly send you the
video).

I used flash and actionscript to report the objects positions and
orientations each frame, then it generated a TXT  which i would input into a
parser i made and well this parser turned it into POVRay code (didn't have
another real option)  and well i got my animation done.

Look:
#if (clock > 0 )
 gf1 = 0.000000 ;
  gf2 = 0.350000 ;
 gf3 = -0.980922 ;
  rf2 = 0.000000 ;
#end
 #if (clock > 1 )
 gf1 = 0.000000 ;
  gf2 = 0.350000 ;
 gf3 = -0.962587 ;
  rf2 = 0.049835 ;
#end
 #if (clock > 2 )
 gf1 = 0.000000 ;
  gf2 = 0.350000 ;
 gf3 = -0.944004 ;
  rf2 = 0.285889 ;
#end
 #if (clock > 3 )
 gf1 = 0.000000 ;
  gf2 = 0.350000 ;
 gf3 = -0.925669 ;
  rf2 = 0.518417 ;
#end
 #if (clock > 4 )
 gf1 = 0.000000 ;
  gf2 = 0.350000 ;
 gf3 = -0.907086 ;
  rf2 = 0.556885 ;
#end
 #if (clock > 5 )
 gf1 = 0.000000 ;
  gf2 = 0.350000 ;
 gf3 = -0.888503 ;
  rf2 = 0.778915 ;
#end
 #if (clock > 6 )
 gf1 = 0.000000 ;
  gf2 = 0.350000 ;
 gf3 = -0.869921 ;
  rf2 = 0.806015 ;
#end

Each clock second could be represented by a frame, and well that code you
see there, is the one i used for a aircraft animation of course its like
clock > 120  (long) i put it as example.

And this would be a mesh structure for that code:

#declare F5 = mesh {
   smooth_triangle { <-1.08479, -0.0862892, -2.37674>, <0.999839, -0.0137941,
-0.0114426>, <-1.08218, 0.107456, -2.38276>, <0.999839, -0.0137941, -
0.0114426>, <-1.10685, 0.0503131, -4.46911>, <0.999899, -0.0127858, -
0.00616726> }
   smooth_triangle { <-1.10685, 0.0503131, -4.46911>, <0.999899, -0.0127858,
-0.00616726>, <-1.11227, -0.129925, -5.37924>, <0.999918, -0.0122813, -
0.00352831>, <-1.08479, -0.0862893, -2.37674>, <0.999804, 0.0174006, -
0.00940568> }
   smooth_triangle { <-1.10721, -0.00928228, -5.37859>, <0.999117, -
0.0419519, 0.00235229>, <-1.11227, -0.129925, -5.37924>, <0.999918, -
0.0122813, -0.00352831>, <-1.10685, 0.0503131, -4.46911>, <0.999899, -
0.0127858, -0.00616726> }
}
object { F5 material { F5Material }
rotate <rf1, rf2, rf3>
   scale <hf, hf, hf>
   translate <gf1,gf2,gf3>
}

The frames could be represented by a Slider or ruler or something.
And  making checkpoints, then doing the proper math.

well, something like that.

And that 3D freeview thingy, it would be nice, but!, it would need some
intresting vector math. (for the proportions of how the mouse will move the
object withing the angle).
And well if someone is willing to do it, i would like to help with the math.

I was reading about the new KDE coming, well, it would be a nice surprice.

I think i drank too much caffeine.
Have a nice day fellows.

Miguel Angel Gómez - Engrane
::Be Elite::
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kpovmodeler-devel/attachments/20061001/792eba3d/attachment.html 


More information about the kpovmodeler-devel mailing list