§ 瀏覽學位論文書目資料
  
系統識別號 U0002-2407201814432400
DOI 10.6846/TKU.2018.00743
論文名稱(中文) 魔術方塊模擬器的設計與製作
論文名稱(英文) The Design and Implementation of Rubik’s Cube Simulator
第三語言論文名稱
校院名稱 淡江大學
系所名稱(中文) 資訊管理學系碩士班
系所名稱(英文) Department of Information Management
外國學位學校名稱
外國學位學院名稱
外國學位研究所名稱
學年度 106
學期 2
出版年 107
研究生(中文) 楊迪文
研究生(英文) DI-WEN YANG
學號 604630656
學位類別 碩士
語言別 繁體中文
第二語言別
口試日期 2018-06-02
論文頁數 104頁
口試委員 指導教授 - 廖賀田
委員 - 廖賀田
委員 - 梁恩輝
委員 - 劉嘉傑
關鍵字(中) 繪圖程式庫
魔術方塊
多視窗
解法
關鍵字(英) Graphic Library
Rubik’s Cube
multi-window
solution
第三語言關鍵字
學科別分類
中文摘要
魔術方塊在1974年發明以來越來越受歡迎,在1980年成為瘋迷全球的益智遊戲,它並不只是一個單純的益智遊戲,方塊本身含有豐富的數學。本論文使用系上研究室所開發的高階繪圖程式庫tw.fc.gui.g_3d實作出魔術方塊模擬器,tw.fc.gui.g_3d繪圖程式庫主要分為三部分三維世界與三維物件、三維攝影機、繪製(Rendering)。本系統將魔術方塊視為一個三維物件放入至三維世界後,藉由調整三維攝影機的方向、位置,讓魔術方塊模擬器擁有,平行投影、透視投影、多景觀等特色。本系統對於魔術方塊的操作分為滾動(roll)及扭轉(twist),並與線上熱門魔術方塊應用程式進行比較,本論文所實作的魔術方塊模擬器,除了擁有自己的特色,在操作上也較近似於真實世界魔術方塊的操作,比線上熱門魔術方塊應用程式更佳流暢、方便。
英文摘要
Magic Cube has become more and more popular since it was invented in 1974. It became a crazy puzzle game in the world in 1980. It is not just a simple puzzle game, but the cube itself is rich in mathematics. This paper uses the high-level graphic library tw.fc.gui.g_3d developed by department’s laboratory to make a magic square simulator. The tw.fc.gui.g_3d graphic library is mainly divided into three parts: three-dimensional world and three-dimensional objects, three-dimensional cameras,and Rendering.After Rubik’s Cube is regarded as a three-dimensional object and placed into the three-dimensional world, the Rubik’s Cube Simulator possesses features such as parallel projection,  perspective projection, and multiple views by adjusting the orientation and position of the three-dimensional camera.The operation of the system for Rubik’s Cube is divided into roll and twist, and compared with the online popular Rubik’s cube application. The Rubik’s Cube simulator implemented in this paper, in addition to its own characteristics, is also similar to the operation of the real world Rubik’s Cube in operation, and is much fluency and more convenient than the online popular Rubik’s Cube application.
第三語言摘要
論文目次
第一章 緒論	1
1.1	研究背景與動機	1
1.2	研究目的	3
1.3	論文組織	3
 第二章 文獻探討	4
2.1	魔術方塊	4
2.2	魔術方塊軟體	5
2.3	三階魔方的結構	9
2.4	魔術方塊的解法限制與步數	10
2.5	魔術方塊表示法	11
 第三章 轉向定理	13
3.1	合法的魔術方塊的種類	13
3.2	標準配色	13
3.3	角塊的轉向	14
3.4	邊塊的轉向	18
 第四章 立方體魔術方塊的解法	22
4.1	底層的拼法	22
4.1.1	拚底層的四個邊塊	22
4.1.2	拚底層的四個角塊	28
4.2	LBL解法	34
4.3	8355解法	46
4.4	CFOP解法	52
4.5	四階解法	53
4.6	五階解法	54
 第五章 繪圖程式庫	56
5.1	三維世界與三維物件	56
5.1.1	三維世界	56
5.1.2	三維物件	57
5.1.3	三維物件的管理	59
5.2	三維攝影機	60
5.2.1	座標轉換	61
5.2.2	三維攝影機	62
5.2.3	投影	65
5.2.4	Panel	66
5.3	繪製(Rendering)	68
5.3.1	三維繪圖管道	69
5.3.2	視窗上呈現的比例(_WinInfo、_PortInfo)	71
 第六章 系統概觀和比較	73
6.1	系統概觀	73
6.1.1	魔術方塊執行器的分項說明	75
6.1.2	魔術方塊執行器的特色	79
 第七章 魔術方塊自動解	81
 第八章 結論與展望	86
8.1	結論	86
8.2	未來展望	86
 參考資料	87
 附錄A	90

圖目錄
==============================
圖1-1五階魔方1
圖1-2 3*3*2魔方1
圖1-3 3階魔方2
圖2-1七階魔方(弧形和邊緣加粗) 4
圖2-2 2*2*3魔方5
圖2-3 WCA 5
圖2-4三階魔方面心塊9
圖2-5三階魔方角塊9
圖2-6三階魔方邊塊10
圖2-7 WCA表示法11
圖2-8本系統表示法12
圖3-1魔術方塊坐標系14
圖4-1兩種扭轉方式23
圖4-2將正確位置,轉到相對於遠層的近層位置示意圖24
圖4-3利用近層,順時針找出相鄰的四軸。25
圖4-4將「白紅綠」角塊轉至相對的遠層位置示意圖。29
圖4-5「白紅綠」角塊出現在近層時的操作30
圖4-6套用Bottom-1的效果31
圖4-7套用Bottom-1s的效果31
圖4-8套用Bottom-2的效果32
圖4-9 LBL公式流程35
圖4-10套用LBL-1的效果35
圖4-11套用LBL-1s的效果36
圖4-12公式LBL-2 37
圖4-13定理4的四種狀態38
圖4-14公式LBL-3 38
圖4-15公式LBL-3s 39
圖4-16 定理4的八種狀態40
圖4-17公式LBL-4 41
圖4-18公式LBL-4r 41
圖4-19公式LBL-5 43
圖4-20公式LBL-5r 44
圖4-21 8355公式流程46
圖4-22套用8355-1的效果47
圖4-23套用8355-1s的效果47
圖4-24套用8355-2(F U F')的效果	48
圖4-25套用8355-2(F U U F')的效果48
圖4-26套用8355-2(F U' F')的效果49
圖4-27套用8355-2s「R'U R」的效果49
圖4-28套用8355-2s「R'U U R」的效果49
圖4-29套用8355-2s「R'U'R」的效果49
圖4-30頂層有三個邊塊完成示意圖50
圖4-31套用8355-3的效果51
圖4-32三角塊完成且底層已復原示意圖51
圖4-33 CFOP公式流程52
圖4-34組中心53
圖4-35組邊54
圖4-36四階降階成三階54
圖4-37組中心55
圖4-38組邊55
圖4-39五階降階成三階55
圖5-1三維世界與頂級物件的關係圖59
圖5-2三維攝影機的繼承圖與panel間的關係61
圖5-3座標轉換62
圖5-4三維攝影機的繼承圖63
圖5-5平行投影66
圖5-6透視投影66
圖5-7 Panel的繼承圖67
圖5-8 GX3D相關類別圖69
圖6-1魔術方塊模擬器73
圖6-2單一層 --- 轉動74
圖6-3單一面 --- 扭轉(twist) 74
圖6-4魔術方塊滾動(roll) 75
圖6-5 File 75
圖6-6 Reset和Scramble 76
圖6-7 View 76
圖6-8 Single Layer 76
圖6-9 corner cell 76
圖6-10 center layer和edge cell 77
圖6-11 MiniCell和InsideColor 77
圖6-12 Aux 77
圖6-13 Tool bar 77
圖6-14 B軸逆時針轉動78
圖6-15 C軸順時針轉動78
圖6-16 A軸順時針轉動78
圖6-17 A軸逆時針轉動78
圖6-18 B軸順時針轉動78
圖6-19 C軸逆時針轉動78
圖6-20 history的UNDO區和REDO區79
圖6-21平行投影及透視投影80
圖6-22使用公式rotlJ-rAxisURot_1_2 80
圖7-1各魔方解法繼承圖81
圖7-2自動解按鈕82
圖7-3 Auto_thread繼承圖83
圖7-4使用CFOP解法解三階魔術方塊85

表目錄
==============================
表2-1魔術方塊應用程式比較8
表5-1 World3D中主要指令:56
表5-2 Obj3D中主要指令:57
表5-3 Obj3DManager中主要指令:59
表5-4 View3D中主要指令:63
表5-5 interface  G_3dPanelI中主要指令:67
表5-6 GX3D抽象類別中主要指令:69
表5-7 _WinInfo中主要指令:71
表5-8 _PortInfo中主要指令:72
參考文獻
[1] Ruwix,”the inventor of the Magic Cube,”https://ruwix.com/the-rubiks-cube/the-inventor-rubik-erno-1974-budapest-hungary/, 查閱日期:2018年2月22號。
[2] Joyner Davis,“Adventures in Group Theory: Rubik’s Cube, Merlin’s Machine, and other Mathematical Toys,” Baltimore and London , The Johns Hopkins University Press,2008。
[3] Janet Chen,“Group Theory and the Rubik's Cube,” Harvard University,2004。 
[4] Alexander H. Frey Jr, David Singmaster,“Handbook of Cubik Math,”Hillside, New Jersey, Enslow, 1982。
[5] Cihan Aksop,“God's Algorithm for Rubik's Cube An Integer Programming Aooroach,”Gazi University, Department of Statistics 06500 Teknikokullar, 2009。
[6] Tomas Rokicki, Herbert Kociemba, Morley Davidso, and John Dethridge,“The diameter of the rubik’s cube is twenty,” SIAM Review,56(4):645-670, 2013。
[7] Erik D. Demaine, Martin L. Demaine, Sarah Eisenstat,
Anna Lubiw, and Andrew Winslow,“Algorithms for Solving Rubik's Cubes,”In: Demetrescu, C., Halldórsson, M.M. (eds.) ESA 2011. LNCS, vol. 6942, pp. 689–700, 2011。
[8] Heh-Tyan Liaw,“魔術方塊程式”, version 1, 2000/8. ftp://mail.im.tku.edu.tw/Prof_Liaw/Game/MCube,。
[9] Heh-Tyan Liaw, “魔術方塊程式”, version 2, 2017/5/4. 未發表的程式。
[10] 林錦坤,“支援遠端介面的繪圖程式庫”,碩士論文,淡江大學資訊管理研究所, 2017/6/。
[11] OnTheSKY,“cube master 萬能魔方”, https://play.google.com/store/apps/details?id=com.onthesky.cube, 查閱日期:2018年2月22號。
[12] FamVanGestel,“Gestel Cube”, https://gestel-cube.en.softonic.com/, 上網日期:2018年2月22號。
[13] Fupa,“Virtual Cubes”, http://www.fupa.com/, 查閱日期:2018年2月22號。
[14] Tuan Hoang,“SpeedCubers-3D Rubik's Puzzle”, https://itunes.apple.com/tw/app/speedcubers/id1127743804, 查閱日期:2018年2月22號。
[15] Oracle co.,“Trail: Creating a GUI With JFC/Swing”, https://docs.oracle.com/javase/tutorial/uiswing/, “查閱時間: 2018年2月23日。
[16] JogAmp.org, “Java OpenGL”, http://jogamp.org/, 查閱時間: 2018年2月23日。
[17] Heh-Tyan Liaw, 魔術方塊程式的演算法, 未發表的手稿。
[18] 郭君逸, “魔術方塊”,http://www.davidguo.idv.tw/cube/, 查閱時間: 2018年3月12日。
[19] Fithx,“Solve The Cube”, https://play.google.com/store/apps/details?id=com.fithx.solvethecube, 查閱日期:2018年3月16號。
[20] Smartapp Corp,“Rubik Cube”, 
https://play.google.com/store/apps/details?id=com.rubikcube.puzzle, 查閱日期:2018年3月16號。
[21] naru design,“CUBIC PUZZLE”, https://play.google.com/store/apps/details?id=com.narudesign.cubicpuzzle, 查閱日期:2018年3月16號。
[22] Exorp,“Rubik Cubik”, https://play.google.com/store/apps/details?id=com.Exorp.RubikCubik, 查閱日期:2018年3月16號。
[23] Tomek’s,“Cube + Tutorial”,  https://play.google.com/store/apps/details?id=com.tomeks.rubic, 查閱日期:2018年3月16號。
[24] 郭君逸, private discussion, 討論日期:2017年1月21號。
[25] Max Piskunov,“魔方經典版3D”, https://itunes.apple.com/tw/app/%E9%AD%94%E6%96%B9%E7%BB%8F%E5%85%B8% E7%89%883d/id911550133?mt=8, 查閱日期:2018年3月18號。
[26] Lian Chao,“玩轉魔方”, https://itunes.apple.com/cn/app/wan-zhuan-mo-fang/id693593055, 查閱日期: 2018年3月18號。
[27] Modus Beke,“Rubik Cube Solver”, https://rubiks-cube-solver.com/solution.php?cube=0351415234611223244523631512623243155462156445653364661&x=1, 查閱日期:2018年4月12號。
[28] Ruwix,“The Rubik’s Cube color schemes”, https://ruwix.com/the-rubiks-cube/japanese-western-color-schemes/ , 查閱日期:2018年4月20號。
[29] David Singmaster,“Notes on Rubik*s Magic Cube”, Enslow, Hillside, 1981。
論文全文使用權限
校內
校內紙本論文立即公開
同意電子論文全文授權校園內公開
校內電子論文立即公開
校外
同意授權
校外電子論文立即公開

如有問題,歡迎洽詢!
圖書館數位資訊組 (02)2621-5656 轉 2487 或 來信