Mercurial > repos > public > sbplib
comparison +anim/animate.m @ 144:2fe13db674da
animate: Show the simulation time.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 21 Mar 2016 16:19:48 +0100 |
parents | 43f8df3595cf |
children |
comparison
equal
deleted
inserted
replaced
143:125c51e4dca8 | 144:2fe13db674da |
---|---|
17 | 17 |
18 time_modifier_bound = time_modifier; | 18 time_modifier_bound = time_modifier; |
19 dTau_target = 1/target_frame_rate; % Real time between frames | 19 dTau_target = 1/target_frame_rate; % Real time between frames |
20 | 20 |
21 rs = util.ReplaceableString(); | 21 rs = util.ReplaceableString(); |
22 rs.appendFormat(' t: %d\n'); | |
22 rs.appendFormat(' tau: %d\n'); | 23 rs.appendFormat(' tau: %d\n'); |
23 rs.appendFormat(' target tau: %d\n'); | 24 rs.appendFormat(' target tau: %d\n'); |
24 rs.appendFormat(' Target fps: %.2f\n'); | 25 rs.appendFormat(' Target fps: %.2f\n'); |
25 rs.appendFormat(' Actual fps: %.2f\n'); | 26 rs.appendFormat(' Actual fps: %.2f\n'); |
26 rs.appendFormat('Target time_modifier: %d\n'); | 27 rs.appendFormat('Target time_modifier: %d\n'); |
57 % targetTau = targetTau + dt/time_modifier; | 58 % targetTau = targetTau + dt/time_modifier; |
58 targetTau = targetTau + dTau_target; | 59 targetTau = targetTau + dTau_target; |
59 | 60 |
60 % Update information about this frame | 61 % Update information about this frame |
61 tau = toc(animation_start); | 62 tau = toc(animation_start); |
62 rs.updateParam(tau, targetTau, 1/dTau_target, 1/dTau, time_modifier_bound, time_modifier); | 63 rs.updateParam(t, tau, targetTau, 1/dTau_target, 1/dTau, time_modifier_bound, time_modifier); |
63 end | 64 end |
64 | 65 |
65 | 66 |
66 % Final time reporting | 67 % Final time reporting |
67 time_to_animate = toc(animation_start); | 68 time_to_animate = toc(animation_start); |