|
![](/i/fill.gif) |
Am 09.03.2011 13:36, schrieb gregjohn:
>> Also, beware of z+0.0001 ... it's<0.0001, 0.0001, 1.0001> !
>>
>
> This I found to be necessary for any use of Reorient. If you transform from z to
> z, it bombs out with singular matrix in inverse thing. Not helpful.
I guess if you leave it like that, tansforming may still bomb in case
the new vector happens to be z+0.0001.
>> I would (as I do with procedural
>> meshes) use one point behind and one ahead as my forward vector,
>> which should be approximately close to the tangent of the current point.
>
> I don't think this is a universal solution. I'd like it to work for any spline,
> whether it's ten points widely spaced along a natural_spline curve, or one
> defined with a thousand points set up via trig functions. I had an application
> where I wanted it to walk around obstacles, and so I only needed to set up ten
> points that avoided the obstacles. "Next point" would disrupt that system.
I guess his suggestion is to use
#declare bodypos0=<0,0,0>+bodypath(clock-1e-4); // (!!!)
#declare bodypos1=<0,0,0>+bodypath(clock+1e-4);
which doesn't really harm what you're doing, and should indeed typically
be closer to the tangent.
Post a reply to this message
|
![](/i/fill.gif) |