|
|
[snip]
> <11, amp*10*sin(radians(180+clock*(360/fr))), 0>, ......
> <12, amp*10*sin(radians(195+clock*(360/fr))), 0>, ......
> }
> bicubic_patch
> {
> type 0 flatness 0.01 u_steps 4 v_steps 4
> <12, amp*10*sin(radians(195+clock*(360/fr))), 0>, ......
> <13, amp*10*sin(radians(210+clock*(360/fr))), 0>, ......
[snip]
basically what you are assuming here is that sin() is a linear function
i.e. that the midpoint between sin(x) and sin(x+delta) is
sin(x+delta/2) and unfortunately it isn't.
This part should be:
<11, amp*10*sin(radians(180+clock*(360/fr))), 0>, ......
<12,
amp*10*(sin(radians(180+clock*(360/fr)))+sin(radians(210+clock*(360/fr))))/2,
0>, ......
}
bicubic_patch
{
type 0 flatness 0.01 u_steps 4 v_steps 4
<12,
amp*10*(sin(radians(180+clock*(360/fr)))+sin(radians(210+clock*(360/fr))))/2,
0>, ......
<13, amp*10*sin(radians(210+clock*(360/fr))), 0>, ......
(I hope I did not miscount this lots of stupid parenteses)
Though I would prefer a somewhat less verbose version ;)
BTW in this case it might not be a problem, but sometimes it is better
to take the used control points equidistant and the interpolated points
at half a distance. Not sure if I am clear, lets try an ASCII drawing:
0---*---*-+-*---*-+-*---*-+-*---*-+-*---*---0
where 0,*, and + are control points for first line of the 5 bicubic
patches. For the total flag the 0 are the endpoints, * the middle
control points and + the points where two bicubic patches meet.
I really hope it is clearer now, but it might just confuse more :( .
Post a reply to this message
|
|