Re: Frame System

"Miguel Angel Gómez Márquez" <[email protected]> Sun, 1 Oct 2006 05:20:53 +0200
Newsgroups gmane.comp.kde.devel.kpovmodeler
Message-ID <[email protected]>
--===============1082752710==
Content-Type: multipart/alternative; 
	boundary="----=_Part_51830_5624002.1159672853800"

------=_Part_51830_5624002.1159672853800
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

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 =3D 0.000000 ;
  gf2 =3D 0.350000 ;
 gf3 =3D -0.980922 ;
  rf2 =3D 0.000000 ;
#end
 #if (clock > 1 )
 gf1 =3D 0.000000 ;
  gf2 =3D 0.350000 ;
 gf3 =3D -0.962587 ;
  rf2 =3D 0.049835 ;
#end
 #if (clock > 2 )
 gf1 =3D 0.000000 ;
  gf2 =3D 0.350000 ;
 gf3 =3D -0.944004 ;
  rf2 =3D 0.285889 ;
#end
 #if (clock > 3 )
 gf1 =3D 0.000000 ;
  gf2 =3D 0.350000 ;
 gf3 =3D -0.925669 ;
  rf2 =3D 0.518417 ;
#end
 #if (clock > 4 )
 gf1 =3D 0.000000 ;
  gf2 =3D 0.350000 ;
 gf3 =3D -0.907086 ;
  rf2 =3D 0.556885 ;
#end
 #if (clock > 5 )
 gf1 =3D 0.000000 ;
  gf2 =3D 0.350000 ;
 gf3 =3D -0.888503 ;
  rf2 =3D 0.778915 ;
#end
 #if (clock > 6 )
 gf1 =3D 0.000000 ;
  gf2 =3D 0.350000 ;
 gf3 =3D -0.869921 ;
  rf2 =3D 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 =3D mesh {
   smooth_triangle { <-1.08479, -0.0862892, -2.37674>, <0.999839, -0.013794=
1,
-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=F3mez - Engrane
::Be Elite::

------=_Part_51830_5624002.1159672853800
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

It shouldn't be too hard, i mean, povray already included the clock paramet=
er.<br><br>I will explain a little bit of what i did with flash, and how co=
uld it be implemented in Kpovmodeler.<br><br>Well, if we&nbsp; group object=
s (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).
<br><br>I used flash and actionscript to report the objects positions and o=
rientations each frame, then it generated a TXT&nbsp; which i would input i=
nto a parser i made and well this parser turned it into POVRay code (didn't=
 have another real option)&nbsp; and well i got my animation done.
<br><br>Look:<br>#if (clock &gt; 0 )<br>&nbsp;gf1 =3D 0.000000 ;<br>&nbsp; =
gf2 =3D 0.350000 ;<br>&nbsp;gf3 =3D -0.980922 ;<br>&nbsp; rf2 =3D 0.000000 =
;<br>#end <br>&nbsp;#if (clock &gt; 1 )<br>&nbsp;gf1 =3D 0.000000 ;<br>&nbs=
p; gf2 =3D 0.350000 ;<br>&nbsp;gf3 =3D -0.962587 ;
<br>&nbsp; rf2 =3D 0.049835 ;<br>#end <br>&nbsp;#if (clock &gt; 2 )<br>&nbs=
p;gf1 =3D 0.000000 ;<br>&nbsp; gf2 =3D 0.350000 ;<br>&nbsp;gf3 =3D -0.94400=
4 ;<br>&nbsp; rf2 =3D 0.285889 ;<br>#end <br>&nbsp;#if (clock &gt; 3 )<br>&=
nbsp;gf1 =3D 0.000000 ;<br>&nbsp; gf2 =3D 0.350000 ;<br>
&nbsp;gf3 =3D -0.925669 ;<br>&nbsp; rf2 =3D 0.518417 ;<br>#end <br>&nbsp;#i=
f (clock &gt; 4 )<br>&nbsp;gf1 =3D 0.000000 ;<br>&nbsp; gf2 =3D 0.350000 ;<=
br>&nbsp;gf3 =3D -0.907086 ;<br>&nbsp; rf2 =3D 0.556885 ;<br>#end <br>&nbsp=
;#if (clock &gt; 5 )<br>&nbsp;gf1 =3D 0.000000 ;<br>&nbsp; gf2 =3D=20
0.350000 ;<br>&nbsp;gf3 =3D -0.888503 ;<br>&nbsp; rf2 =3D 0.778915 ;<br>#en=
d <br>&nbsp;#if (clock &gt; 6 )<br>&nbsp;gf1 =3D 0.000000 ;<br>&nbsp; gf2 =
=3D 0.350000 ;<br>&nbsp;gf3 =3D -0.869921 ;<br>&nbsp; rf2 =3D 0.806015 ;<br=
>#end <br><br>Each clock second could be represented by a frame, and well t=
hat code you see there, is the one i used for a aircraft animation of cours=
e its like&nbsp; clock &gt; 120&nbsp; (long) i put it as example.
<br><br>And this would be a mesh structure for that code:<br><br>#declare F=
5 =3D mesh {<br>&nbsp;&nbsp; smooth_triangle { &lt;-1.08479, -0.0862892, -2=
.37674&gt;, &lt;0.999839, -0.0137941, -0.0114426&gt;, &lt;-1.08218, 0.10745=
6, -2.38276
&gt;, &lt;0.999839, -0.0137941, -0.0114426&gt;, &lt;-1.10685, 0.0503131, -4=
.46911&gt;, &lt;0.999899, -0.0127858, -0.00616726&gt; }<br>&nbsp;&nbsp; smo=
oth_triangle { &lt;-1.10685, 0.0503131, -4.46911&gt;, &lt;0.999899, -0.0127=
858, -
0.00616726&gt;, &lt;-1.11227, -0.129925, -5.37924&gt;, &lt;0.999918, -0.012=
2813, -0.00352831&gt;, &lt;-1.08479, -0.0862893, -2.37674&gt;, &lt;0.999804=
, 0.0174006, -0.00940568&gt; }<br>&nbsp;&nbsp; smooth_triangle { &lt;-1.107=
21, -0.00928228
, -5.37859&gt;, &lt;0.999117, -0.0419519, 0.00235229&gt;, &lt;-1.11227, -0.=
129925, -5.37924&gt;, &lt;0.999918, -0.0122813, -0.00352831&gt;, &lt;-1.106=
85, 0.0503131, -4.46911&gt;, &lt;0.999899, -0.0127858, -0.00616726&gt; }
<br>}<br>object { F5 material { F5Material }<br>rotate &lt;rf1, rf2, rf3&gt=
;<br>&nbsp;&nbsp; scale &lt;hf, hf, hf&gt;<br>&nbsp;&nbsp; translate &lt;gf=
1,gf2,gf3&gt;<br>}<br><br><div><span class=3D"gmail_quote"></span>The frame=
s could be represented by a Slider or ruler or something.
<br>And&nbsp; making checkpoints, then doing the proper math.<br><br>well, =
something like that.<br><br>And that 3D freeview thingy, it would be nice, =
but!, it would need some intresting vector math. (for the proportions of ho=
w the mouse will move the object withing the angle).
<br>And well if someone is willing to do it, i would like to help with the =
math.<br><br>I was reading about the new KDE coming, well, it would be a ni=
ce surprice.<br><br>I think i drank too much caffeine.<br>Have a nice day f=
ellows.
<br><br>Miguel Angel G=F3mez - Engrane <br>::Be Elite::<br></div>

------=_Part_51830_5624002.1159672853800--

--===============1082752710==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


List archive and information: https://mail.kde.org/mailman/listinfo/kpovmodeler-devel
--===============1082752710==--