Digits
07-18-01, 01:11 PM
A couple of questions I have wanted to ask for awhile and I just can't hold it in anymore. *Lets out deep breath*
1. The Interpolate Function.
[VarSet,startX,0]
[VarSet,endX,1000]
[Interpolate, 0.25, startX, endX] Returns an interpolated value (startX*(1.0-0.25))+(endX*.025)
This one is pretty straight forward, a straight line from 0 to 1000. The result from this would be a value of 250 at a time of .25
[Interpolate,0.25,list1,list2,list3] Returns an interpolated list caculated as a spline at t=.25
This one I can't figure out. list 1,2 and 3, can be a number, a varible or a list or array. I take it if you use a list, you still have to index it like this
[VarDef,list1(100)]
[VarDef,list2(100)]
[VarDef,list3(100)]
[RoutineCall,Filluplistswithinterestingdata] //fill up array with stuff
[VarSet,IData,[Interpolate,0.25,list1(1),list2(2),list3(3)]]
What is IData going to be? at 0, .25, .50, .75, 1 second?
A while back Davey explained a couple of things
"[RoutineCall,Digits-example,someX,someY,someZ]
There's plenty more where that came from. If/then/else's, trig functions, 3 kinds of interpolation, and lots more. And yes, ZScripts are simply text files.
You could cut and paste the above into another script, or you could save it with a file name like "Digits-example.txt", then put this in another ZScript:
<ZScript-Insert,Digits-example.txt>"
2. 3 types of Interpolation, what are they?
3. I haven't been able to use his example <ZScript-Insert,Digits-example.txt> to include a file into a script, has the syntax been changed?
Thanks in advance! I know you guys are still doin the Chinese Fire Dance to get things wrapped up
1. The Interpolate Function.
[VarSet,startX,0]
[VarSet,endX,1000]
[Interpolate, 0.25, startX, endX] Returns an interpolated value (startX*(1.0-0.25))+(endX*.025)
This one is pretty straight forward, a straight line from 0 to 1000. The result from this would be a value of 250 at a time of .25
[Interpolate,0.25,list1,list2,list3] Returns an interpolated list caculated as a spline at t=.25
This one I can't figure out. list 1,2 and 3, can be a number, a varible or a list or array. I take it if you use a list, you still have to index it like this
[VarDef,list1(100)]
[VarDef,list2(100)]
[VarDef,list3(100)]
[RoutineCall,Filluplistswithinterestingdata] //fill up array with stuff
[VarSet,IData,[Interpolate,0.25,list1(1),list2(2),list3(3)]]
What is IData going to be? at 0, .25, .50, .75, 1 second?
A while back Davey explained a couple of things
"[RoutineCall,Digits-example,someX,someY,someZ]
There's plenty more where that came from. If/then/else's, trig functions, 3 kinds of interpolation, and lots more. And yes, ZScripts are simply text files.
You could cut and paste the above into another script, or you could save it with a file name like "Digits-example.txt", then put this in another ZScript:
<ZScript-Insert,Digits-example.txt>"
2. 3 types of Interpolation, what are they?
3. I haven't been able to use his example <ZScript-Insert,Digits-example.txt> to include a file into a script, has the syntax been changed?
Thanks in advance! I know you guys are still doin the Chinese Fire Dance to get things wrapped up