|
|
in news:web.5c102131fed5bd3748892b50@news.povray.org jr wrote:
> and yet, accomplished. looks quite impressive already. Q - how do
> you keep state between frames? is the animation using the fabrik.inc
> macros (only)?
>
Fabrik is only initilised once and 'returns' its own resulting
datastructure that I use for the new target. Scene below, if you run it
with the .inc in p.b.scene-files you'll get a better result than in this
clip as some speed up optimalisations are turned off. Still a few little
jumps left then.
ingo
---%<----%<-----%<---
//Pov-Ray : 3.8
//Scene File: FABRIK.inc
//Author : Ingo Janssen
//Date : 11-12-2018
// +a0.1 +KFF300 -KC +W640 +H480
#version 3.8;
#include "FABRIK.inc"
#global_settings{assumed_gamma 1.0 }
#default{pigment{rgb 1} finish{ ambient 0.2 diffuse 0.9 }}
light_source{<1000,1000,-1000>, rgb 1}
plane{y,0 pigment{checker rgb 0.05 rgb 0.1}}
camera{location <0,4.5,-12> look_at <0,4.5,0>}
plane{z,0 pigment{checker rgb 0.05 rgb 0.1}}
#declare F = dictionary{
["Index"] : dictionary{
["Chains"] : array[5]{"Base", "Left", "Right", "Right1", "Right2"},
["SubBases"]: array[2]{"LRB", "RRR"}
},
["Proc"] : array[7]{"Right1", "Right2", "RRR", "Right", "Left",
"LRB" ,"Base"},
["Base"] : dictionary{
["Joint"] : array[5]{<0,0,0>, <0,1,0>, <0,2,0>,<0,3,0>, <0,4,0>},
["Type"] : "BaseSubbase",
["SubBase"]: array mixed[1]{"LRB"}
},
["Left"] : dictionary{
["Joint"] : array[4]{<0,4,0>, <-1,5,0>, <-2,6,0>,<-3,7,0>},
["Type"] : "SubbaseEnd",
["SubBase"]: array mixed[1]{"LRB"}
},
["Right"]: dictionary{
["Joint"] : array[4]{<0,4,0>, <1,5,0>, <2,6,0>,<3,7,0>},
["Type"] : "SubbaseSubbase",
["SubBase"]: array mixed[2]{"RRR", "LRB"}
},
["Right1"]: dictionary{
["Joint"] : array[3]{<3,7,0>, <4,8,0>, <5,9,0>},
["Type"] : "SubbaseEnd",
["SubBase"]: array mixed[1]{"RRR"}
},
["Right2"]: dictionary{
["Joint"] : array[3]{<3,7,0>, <2,8,0>, <1,9,0>},
["Type"] : "SubbaseEnd",
["SubBase"]: array mixed[1]{"RRR"}
},
["LRB"] : dictionary{
["Index"] : array[3]{"Left", "Right", "Base"}
["Type"] : "SubBase",
["Centroid"]: <0,0,0>
},
["RRR"] : dictionary{
["Index"] : array[3]{"Right1", "Right2", "Right"}
["Type"] : "SubBase",
["Centroid"]: <0,0,0>
}
};
#declare S = FABRIK(F);
#declare SL = spline{
natural_spline
0 , <-3,7,0>,
0.25, <-1,3,0>,
0.5 , <-3,1,0>,
0.75, <-4,3,0>,
1 , <-3,7,0>
}
#declare T = dictionary {
["Index"] : array[3]{"Left", "Right1", "Right2"},
["Right1"]: array mixed[1]{<5,9-6.5*clock , 0>}, //<5,9,0>
["Right2"]: array mixed[1]{<1,9-5.7*clock, 0>}, //<1,9,0>
["Left"] : array mixed[1]{SL(clock)}, //<-3,7,0>
};
SetTarget(S, T)
PillMan(S)
Post a reply to this message
|
|