IPO Curve Problem...
2 posters
IPO Curve Problem...
Ok... maybe Im just getting rusty or just too tired (that's what happen when you are "supposedly" working on 3 project at the same time fulltime, anyway)...
Im integrating the IPO of blender... so I export the points of the curve that represent frame & value. I already integrate constant and linear interpolation (no comments here)... but I can't figure out what method blender is using for the bezier...
So I go in example this:
x = frame
y = value
vec2 v1: x = 1 y = -10
vec2 v2: x = 60 y = 10
Im using the following code for the bezier curve, the calculation look right to me but the result is just strange...
Can someone help me out on that one...
Tks in advance,
Cheers,
Im integrating the IPO of blender... so I export the points of the curve that represent frame & value. I already integrate constant and linear interpolation (no comments here)... but I can't figure out what method blender is using for the bezier...
So I go in example this:
x = frame
y = value
vec2 v1: x = 1 y = -10
vec2 v2: x = 60 y = 10
Im using the following code for the bezier curve, the calculation look right to me but the result is just strange...
- Code:
...
...
float sio2CubicBezier(float t, float a, float b, float c, float d)
{
float tflip = 1.0f - t;
return tflip * tflip * tflip * a + 3.0f * tflip * t * (tflip * b + t * c) + t * t * t * d;
}
...
...
_SIO2ipocurve->d_time += _SIO2window->d_time;
float t = _SIO2ipocurve->d_time / _SIO2ipocurve->t_ratio;
_SIO2ipocurve->value = sio2CubicBezier( t,
_SIO2ipocurve->point[ _SIO2ipocurve->curr_point ].x,
_SIO2ipocurve->point[ _SIO2ipocurve->curr_point ].y,
_SIO2ipocurve->point[ _SIO2ipocurve->curr_point + 1 ].x,
_SIO2ipocurve->point[ _SIO2ipocurve->curr_point + 1 ].y );
if( _SIO2ipocurve->d_time >= _SIO2ipocurve->t_ratio )
{
++_SIO2ipocurve->curr_point;
_SIO2ipocurve->d_time = 0.0f;
sio2IpoCurveGetRatio( _SIO2ipocurve );
}
Can someone help me out on that one...
Tks in advance,
Cheers,
Re: IPO Curve Problem...
I think your parens might be misplaced.
- Code:
tflip * tflip * tflip * a + 3.0f * tflip * t * (tflip * b + t * c) + t * t * t * d;
(1-t)^3a + 3t(1-t)^2b + 3t^2(1-t)c + t^3d
tflip * tflip * tflip * a + 3.0f * t * tflip * tflip * b + 3.0f * t * t * tflip * c + t * t * t * d;
zzajin- Posts : 81
Join date : 2008-10-14
Re: IPO Curve Problem...
Cheers for tip... however still not working... something else is wrong...
Tks!
Tks!
Similar topics
» Display Curve which has no face
» Blender IPO Curve Editing
» Passing Through Static Object (Beating my iPod seems to help)
» md2 problem!
» Camera problems
» Blender IPO Curve Editing
» Passing Through Static Object (Beating my iPod seems to help)
» md2 problem!
» Camera problems
Permissions in this forum:
You cannot reply to topics in this forum