Hi Klaus!
I need to count three values for smooth() method.
Is known distance in degrees and time.
Linear speed is easy to find but I don't quite understand how it works smoth.
Can you provide some information about the method of smooth?
Thank you!
lookto(), smooth() - Find the acceleration if we have the time and distance
-
-
Hi,
when using the smooth() parameter a physical acceleration movement will be performed.
First it accelerates up to 'maxspeed' using the 'accel' acceleration parameter and then it does a negative acceleration using the 'break' parameter down to still-stand.
The whole formula 2-3 steps/phases - first the acceleration, then the moving at maxspeed (when reached) and the negative acceleration. Inversely calculating the parameters should be possible when doing some pre-assumptions (e.g. no max-speed, a known factor for acceleration/de-acceleration ratio), but that might be a bit to complex for the usage case...
If you want a specific movement curve for a given time, probably better use the tween() motiontype:
https://krpano.com/docu/actions/#looktoBest regards,
Klaus -
Klaus, thank you for your reply!
But I visually see that the rotation does not reach the maximum speed.
The third value (max speed) does not affect the duration of the rotation.Here is my test:
Codelookto (90, 0, 90, smooth (10, 10, 10)) // overcomes 90 degrees on 10,041 seconds (linear motion) lookto (90, 0, 90, smooth (10, 10, 50)) // by 6.016 seconds lookto (90, 0, 90, smooth (10, 10, 100)) // by 6.024 seconds lookto (90, 0, 90, smooth (10, 10, 200)) // by 6.018 seconds lookto (90, 0, 90, smooth (10, 10, 500)) // by 6.031 seconds
Unfortunately I can not describe this phenomenon.
Maybe you know this formula? -
The third value (max speed) does not affect the duration of the rotation.
That's because the acceleration values are too small and the way is too short - so the max speed can't be reached.
Maybe you know this formula?
That's not just a simply formula - please see the post above - there are three steps: 1. acceleration, 2. movement with constant max speed (only when reached), 3. deceleration. If the way is too short and/or the acceleration too low, then the acceleration and deceleration phases will intercept and the reached maximum speed will be lower.
The basic formula for the accelerations itself is the physical one:
If you need a given time, better use the tween(tweentype,time) instead of the smooth(accel,break,maxspeed) movement type.
Best regards,
Klaus -
Thank you again for the detailed explanation and formula!
I realized that it would be difficult to calculate.
Then I probably will use tween()
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!