實作程式動畫(Program Animation)是一個相當困難的問題,儘管目前存在一些相關工具,但它們都有無法忽視的缺點,無法快速並有效的達到任意動畫化(Generic Program Animation)。 xDIVA(extreme Debugging Information Visualization Assistant)是本實驗室開發的一套3D 視覺化程式除錯工具,在待測程式設下中斷點後,xDIVA 能擷取出該中斷點當下的任意變數,並讓使用者自由配對擷取出的變數與xDIVA 提供的視覺化元件,來完成視覺化結果。 本論文提出了一套基於xDIVA 的動畫系統, 在關鍵影格(Keyframe)之間進行插值(Interpolate)來達成動畫化,關鍵影格為中斷點處的場景快照。這種方法不需要額外撰寫任何動畫程式碼,視覺化的方式也沒有局限性。此外,透過啟用佈局(Layout)功能來自動排序視覺化物件,使得動畫能夠更廣泛適用於各種情境,達到任意動畫化的目標,更適合實務上的應用。 此外,本論文還將這些動畫保存成影片,因為這些影片具有教育意義,一方面可作為此程式的解說文件,省去大量追蹤原始程式碼(Source Code)的時間,大幅提升效率。另一方面,對於較複雜的演算法或流程,這些影片也能當成教學文件,解說其中進行的操作和關鍵的狀態。;Program Animation is a challenging problem to implement. Although there are existing tools available, they have significant limitations and cannot efficiently achieve the goal of generic program animation. xDIVA (extreme Debugging Information Visualization Assistant) is a 3D visualization program debugging tool developed by our laboratory. After setting breakpoints in the target program, xDIVA captures arbitrary variables at the breakpoints and allows users to match them with visual mapping nodes provided by xDIVA to achieve visualization results. This paper proposes an animation system based on xDIVA. It achieves animation by interpolating between keyframes, which are scene snapshots captured at breakpoints. This method eliminates the need for additional animation code and provides unlimited visualization possibilities. Additionally, the automatic layout enables widespread application of animations in various contexts, achieving the goal of generic program animation and making it more suitable for practical use. Furthermore, this paper also saves these animations as videos. These videos have educational value. On one hand, they can serve as explanatory documents for the program, saving time spent on tracing the source code. On the other hand, for more complex algorithms or processes, these videos can be used as instructional materials, explaining the operations and crucial states involved.