以åã®è¨äºã§ Charts ãã©ã°ã¤ã³ã使ã£ã¦2次å ã®ãã£ã¼ããæç»ããæ¹æ³ãè¦ã¾ããããä»å㯠Jzy3d ãã©ã°ã¤ã³ã使ã£ã3次å ãã£ã¼ãã®æç»ã試ãã¦ã¿ã¾ãï¼è¨äºä¸è¦§ï¼ããã¡ãªã¿ã«ä½¿ç¨ãããã¼ã¸ã§ã³ã¯
- Griffon 0.9.4
- Jzy3d ãã©ã°ã¤ã³ 0.1
ã§ãã
å 容
- æºå
- Griffon ããã¸ã§ã¯ãã®ä½æ
- Jzy3d ãã©ã°ã¤ã³ã®ã¤ã³ã¹ãã¼ã«
- 3次å
ãã£ã¼ããä½æ
- ãã£ã¼ããæ§ç¯ããã¯ã©ã¹ã®çæ
- ãã¡ã¤ã«ã®æ¸ãæã
- ã¢ããªã±ã¼ã·ã§ã³ã®å®è¡
åè URL
æºå
ã¾ã㯠Griffon ããã¸ã§ã¯ãã®ä½æ㨠Jzy3d ãã©ã°ã¤ã³ã®ã¤ã³ã¹ãã¼ã«ãè¡ãæ¹æ³ã
Griffon ããã¸ã§ã¯ãã®ä½æ
ããã¸ã§ã¯ãåã¯ãFunctionPlotter3Dãã¨ãã¾ããã以ä¸ã®ã³ãã³ãã§ããã¸ã§ã¯ããä½æï¼
griffon create-app FunctionPlotter3D
ã³ãã³ãå®è¡å¾ãFunctionPlotter3D ã¨ãããã©ã«ããã§ããã®ã§ããã¡ãã¸ç§»åãã以ä¸ããã®ãã©ã«ããããã¸ã§ã¯ãã»ã«ã¼ãã¨å¼ã³ã¾ãï¼$PROJECT_HOME ã§åç §ãã¾ãï¼ããããã¸ã§ã¯ãã®ä½æããã¾ãè¡ããã¦ããã°ãã³ãã³ããgriffon run-appããå®è¡ãã¦ã¢ããªã±ã¼ã·ã§ã³ãèµ·åã§ãã¾ãã
Jzy3d ãã©ã°ã¤ã³ã®ã¤ã³ã¹ãã¼ã«
Jzy3d ãã©ã°ã¤ã³ãã¤ã³ã¹ãã¼ã«ããã«ã¯ãããã¸ã§ã¯ãã»ã«ã¼ãã§ä»¥ä¸ã®ã³ãã³ããå®è¡ï¼
griffon install-plugin jzy3d
ã¾ããç¹ã«åé¡ã¯ãªããã¨ãããããã®æºåã¯ãåããã¸ã§ã¯ãã§1åè¡ãã° OK ã§ãã
3次å ãã£ã¼ããä½æ
次ã¯ãã£ã¼ãã®ä½æãã以ä¸ã®æé ã¯ãä½æããããã£ã¼ããã¨ã«è¡ãã¾ãã
ãã£ã¼ããæ§ç¯ããã¯ã©ã¹ã®çæ
ã¾ãã¯ããã£ã¼ããæ§ç¯ããã³ã¼ããæ¸ãã½ã¼ã¹ãã¡ã¤ã«ãçæãã¾ãããä½æãããã£ã¼ãã®ååã決ãã¦ï¼ããã§ã¯ defaultChart ã¨ãã¾ãï¼ã以ä¸ã®ããã« create-chart3d ã³ãã³ããå®è¡ãã¾ãï¼
griffon create-chart3d defaultChart
å®è¡çµäºå¾ã以ä¸ã®ãã¡ã¤ã«ãçæããã¾ãï¼
- $PROJECT_HOME/griffon-app/charts/functionplotter3d/DefaultChart3D.groovy
ãã®ãã¡ã¤ã«å ã«3次å ãã£ã¼ããæ§ç¯ããã³ã¼ããæ¸ãã¾ãããã³ã¼ãã£ã³ã°ã¯ jzy3d ã©ã¤ãã©ãªãã¬ãããªä½¿ãããã§ãï¼Groovy ã®ãã«ãã¼ã使ã£ãæ§ç¯ã¨ãã¯ã§ããªãããï¼ããä»å㯠jzy3d ã® API ã«ã¯ç«ã¡å ¥ããã«èªåã§çæããããµã³ãã«ã»ã³ã¼ãããã®ã¾ã¾ä½¿ããã¨ã«ãã¾ãããã
ã¡ãªã¿ã«ãçæããããã¡ã¤ã«ã«ã¯æ¥å°¾è¾ã¨ãã¦ã3Dããèªåã§ã¤ãã¾ãããã¾ããgriffon-app ãã©ã«ãä¸ã® charts ãã©ã«ãã¯ãªããã°ä½æããã¾ãããCharts ãã©ã°ã¤ã³ã使ãå ´åãåããã©ã«ããä½æããã¦ã¾ãããã
ãã¡ã¤ã«ã®æ¸ãæã
3次å ãã£ã¼ãã®æ§ç¯ã³ã¼ãèªä½ãæ¸ãæããªãã¦ãããã£ã¼ãã表示ãããããã«ããã¤ãæ¸ãæããªããã°ãããªããã¡ã¤ã«ãããã®ã§ããããè¦ã¦ããã¾ãããããæ¸ãæãã®å¿ è¦ãããã®ã¯ä»¥ä¸ã®2ã¤ï¼
- $PROJECT_HOME/griffon-app/conf/Application.groovy
- $PROJECT_HOME/griffon-app/views/functionplotter3d/FunctionPlotter3DView.groovy
Application.groovy ãã¡ã¤ã«ã§ã¯ã3次å ãã£ã¼ãã MVC ã°ã«ã¼ãã®æ§æè¦ç´ ã«å ããè¨å®ãè¡ãã¾ããã3次å ãã£ã¼ãã使ç¨ããã MVC ã°ã«ã¼ãã®ãã¼ãã«ã以ä¸ã®ãã㪠chart3d ããããã£ï¼å¥ã®ååã§ãå¯è½ã ãã©ï¼ãè¨å®ãã¾ãããå¤ã¯ãå ã»ã©çæãããã£ã¼ããæ§ç¯ããã¯ã©ã¹ã®å®å ¨ä¿®é£¾åã§ãï¼
application { ... } mvcGroups { // MVC Group for "functionPlotter3D" 'functionPlotter3D' { model = 'functionplotter3d.FunctionPlotter3DModel' chart3d = 'functionplotter3d.DefaultChart3D' // ãã®1è¡ã追å view = 'functionplotter3d.FunctionPlotter3DView' controller = 'functionplotter3d.FunctionPlotter3DController' } }
FunctionPlotterView.groovy ã¯3次å ãã£ã¼ããåãè¾¼ãã³ã¼ããæ¸ãè¾¼ã¿ã¾ãããåãè¾¼ã¿ã«ã¯ widget ãã¼ãã使ãã¾ãããå¼æ°ã«ã¯ Application.groovy ã§æå®ãã MVC è¦ç´ ï¼ããã§ã¯ chart3d ã¨è¨å®ãã¾ããï¼ãããchart3d.chart.canvasãã¨è¾¿ã£ã¦åå¾ã§ãããªãã¸ã§ã¯ãã渡ãã¾ãã
package functionplotter3d application(title: 'FunctionPlotter3D', size: [800,600], locationByPlatform:true, iconImage: imageIcon('/griffon-icon-48x48.png').image, iconImages: [imageIcon('/griffon-icon-48x48.png').image, imageIcon('/griffon-icon-32x32.png').image, imageIcon('/griffon-icon-16x16.png').image]) { // add content here widget(chart3d.chart.canvas) // 3次å ãã£ã¼ããåãè¾¼ãã³ã¼ã }
ããã§ã¯ size ããããã£ã locationByPlatform ããããã£ãªã©ãå¤ãã¦ã¾ãã
ã¢ããªã±ã¼ã·ã§ã³ã®å®è¡
以ä¸ã®è¨å®ããã¡ãã¨ã§ãã¦ããã°ã以ä¸ã®ã³ãã³ã
griffon run-app
ã§ã¢ããªã±ã¼ã·ã§ã³ãèµ·åããã以ä¸ã®ãããª3次å
ãã£ã¼ãã表示ãããããºã§ãï¼
åã«è©¦ããã¨ãã¯æç»ãããªãéãã£ããããªæ°ããããã§ãããä»æ¥ãã£ããç¹ã«éããæãã¾ããã§ããããGriffon ã®æ¹ãä½ãæ¹åãããã®ããªï¼
- ä½è : é¢è°·åæ,ä¸å潤äº,é æ±ä¿¡æ´,ä¸ééæ²»
- åºç社/ã¡ã¼ã«ã¼: æè¡è©è«ç¤¾
- çºå£²æ¥: 2011/07/06
- ã¡ãã£ã¢: åè¡æ¬ï¼ã½ããã«ãã¼ï¼
- è³¼å ¥: 6人 ã¯ãªãã¯: 392å
- ãã®ååãå«ãããã° (152件) ãè¦ã