Try   HackMD

GeoGebra Classic 5 & 6 匯出 gif 檔

作者:王一哲
日期:2021/8/11


前言

昨天有同事問我,為什麼在 GeoGebra Classic 找不到匯出成 gif 檔的選項,搜尋之後才發現這個功能在 GeoGebra Classic 5 可以從選單找到,但是在 GeoGebra Classic 6 卻要用指令才行。以下用一個簡單的正弦波動畫作為例子,測試的作業系統為 Linux Mint 20.1 Ulyssa,GeoGebra 版本為 GeoGebra-Linux64-Portable-6-0-657-0 以及 GeoGebra-Linux-Portable-5-0-657-0

GeoGebra Classic 6

首先用以下指令畫出向右移動的正弦波,數值滑桿 t 的動畫速度設定為 4、重複模式為遞增

T = 2
ω = 2*π/T
t = Slider(0, T, 0.05*T)
f(x) = If(x >= 0, sin(x - ω*t))

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
GeoGebra Classic 6:正弦波


從右上角打開選單,在檔案匯出 裡找不到匯出為 gif 檔的選項。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

GeoGebra Classic 6:檔案 ⇒ 匯出


從右上角打開選單,在檢視 中勾選 指令列

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

GeoGebra Classic 6:檢視 ⇒ 指令列


將視窗縮小一點,只留下想要匯出成 gif 檔的部分,於下方的指令列輸入以下指令匯出 gif 檔。這個指令的格式為 "選項", "設定值",因此以下指令的用途是將這個 ggb 檔,以數值滑桿 t 的變數值匯出成檔名為 sin-GGB6.gif 的 gif 檔,重覆播放動畫,動畫時間間格為 100 ms,圖片寬度為 800 像素。

ExportImage("filename", "sin-GGB6.gif", "type", "gif", "slider", t, "loop", true, "time", 100, "width", 800)

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
GeoGebra Classic 6:匯出 gif 檔指令


匯出的 gif 檔大小為 958.6 kB。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

GeoGebra Classic 6:正弦波動畫


GeoGebra Classic 5

繪圖指令同上,也可以直接用 GeoGebra 5 開啟剛才儲存的 ggb 檔。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
GeoGebra Classic 5:正弦波


從右上角打開選單,在檔案匯出動態 GIF 檔

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

GeoGebra Classic 5:檔案 ⇒ 匯出 ⇒ 動態 GIF 檔


於視窗中選取滑桿 t = 0、影格速率 100、勾選 循環播放,最後按下匯出

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

GeoGebra Classic 5:匯出 GIF 檔選項


選擇匯出 gif 檔的路徑及檔名,匯出的 gif 檔大小為 299.7 kB。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

GeoGebra Classic 5:正弦波動畫


結語

匯出 gif 檔是我很常用的功能,但是不知道為什麼在 GeoGebra Classic 6 的選單中被移除了,需要用指令匯出,而且匯出的檔案又比較大,希望官方可以加回這個功能。

相關指令的官方說明書

匯出圖片 https://wiki.geogebra.org/en/ExportImage_Command


tags:GeoGebra