THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/05/2007 at 15:17, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10
Platform:
Language(s) : C.O.F.F.E.E ;
---------
Is there a more exact way of getting the position along a spline?
With COFFE I use something like:
EXPRESSION::GetGlobalPosition(spline,position)
{
spline->InitLength(0);
var locpos = spline->GetSplinePoint(spline->UniformTonatural(position));
return spline->GetMg()->GetMulP(locpos);
}
////
var spline = tag#ID_USERDATA:1;
var position = tag#ID_USERDATA:2;
var pos = GetGlobalPosition(spline,position);
op->SetPosition(pos);
The problem I have is a "pumping" position along the spline for each
point along the spline. I thought I did something wrong but
the result is the very same if I use Cinemas own AlignToSpline Tag.
The problem is the same. Using the AlignToSpline tag, of coarse setting the spline
to Uniform, and rising the subdivision to high values does not help.
Subdividing the actual (curved)spline does not help either since the subdivision does the "same"
strange miscalculation.
The cumbersam way of getting it better is to create a -straight- spline that is highly
subdivided and use the Mograph Spline Warp to "glue" it to the original spline
(plus duplicate it and use a expresso setup to have a deformed state that can be used).
Cheers
Lennart Wåhlin - tcastudios