Skip to Main Content
Mathematica 錦囊妙計
book

Mathematica 錦囊妙計

by Sal Mangano
April 2014
Beginner to intermediate content levelBeginner to intermediate
830 pages
15h 21m
Chinese
GoTop Information, Inc.
Content preview from Mathematica 錦囊妙計
626
|
第十五章
15.15 建立表示式動畫
問題點
在不操控互動式元件的情況下,你想觀看表示式如何自動演變。[Page-627]
解決方案
使用
Animate
指令建 立自動演 變的表 式。以下的 範例中,
Animate
指令展 示了擺線
cycloid)的動畫圖解,擺線指的是輪子上的點隨著輪子於平面上滾動的軌跡。
討論說明
Animate
指令可用來建立多彩多姿的動畫展示。以下我們使用動畫展示
Sort
指令的內
部實作方法,藉由限制比較函數的使用次數,可逐步觀看
Sort
指令的執行過程;使用
Animate
BarChart
指令將串列的排序結果視覺化,
partialSort
函數則是指定比較次
數上限的
Sort
指令。設定
DisplayAllSteps
選項可避免
Animate
指令跳過執行過程,但
卻會降低執行效率,因此建議只在必要時使用。[Page-628]
ch15.indd 626 2014/4/2 下午 03:40:21
15.15 建立表示式動畫
|
627
其他好用的選項有:
AnimationRunning
True
選項可在
Animate
執行後立刻執行動畫,
AnimateRate
選項 可設 定動 畫初 始速 度,而
AnimationRepetitions
可控 制動 畫重 複的
次數。
ch15.indd ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Ubuntu for Non-Geeks, 4th Edition

Ubuntu for Non-Geeks, 4th Edition

Rickford Grant, Phil Bull

Publisher Resources

ISBN: 9789863470106