Processing Advent Calendar 2012 ï¼5æ¥ç®ï¼ WebGLã¬ã¹ã§æ¥½ãã3Dã¹ã±ãã ä»å¹´ããAdvent Calendar ã®å£ç¯ããã£ã¦åãã¾ããã æ¨å¹´ã«å¼ãç¶ããProcessing Advent Calendar ã«åå ãã¦ããã¾ããä»å¹´ã¯5æ¥ç®ãæ å½ããäºã«ãªãã¾ããããããããé¡ããã¾ãã ãã¦ã ããã1å¹´ã®éã« Processing ç°å¢ã¯é常ã«å¤§ããªå¤åãéãã¾ãããä¸ã§ããã¹ã±ããã Java Applet ã¨ãã¦ã¨ã¯ã¹ãã¼ãã§ããªããªã£ãäºã¨ã3D ã¢ã¼ãã«ããã¦ã½ããã¦ã§ã¢ã¬ã³ããªã³ã°ãå©ç¨ã§ããªããªã£ãäºã¯ç§ã«ã¨ã£ã¦è¡æçã§ããã ç¾å¨ãå¤ãã® Web ãã©ã¦ã¶ã¯ WebGL ã«å¯¾å¿ãã¦ããããææ°ã® Processing ã§æããã 3D ã¹ã±ããã楽ããäºãã§ãã¾ããã ããã§ä»åã¯ãä¸ã¤ã®å®é¨çãªè©¦ã¿ã¨ãã¦ãWebGL ã¬ã¹ã§åä½
Two months ago, Andrew Baldwing started publishing a series on articles on his blog ( http://thndl.com)Â about GLSL (OpenGL Shading Language). If you don't know the power of shaders yet, I recommend having a look at the GLSL sandbox: http://glsl.heroku.com/ In Andrew's own words: âWhen I first heard about shaders, I have to admit they sounded like scary arcane magic that I would never be able get t
processingã§ãã¯ãªãã¯ããã¨ãã®å ´æã«æ°´é¢ã®æ³¢ç´ãåºãããã°ã©ã ãä½ãããã®ã§ãããprocessingã®ç¥èãä¹ããã®ã§ã©ãä½ãã°ããã®ããããã¾ãããã ããããã®ããã°ã©ã ã®ä½ãæ¹ãæãã¦ãã ããã processingã§ãã¯ãªãã¯ããã¨ãã®å ´æã«æ°´é¢ã®æ³¢ç´ãåºãããã°ã©ã ãä½ãããã®ã§ãããprocessingã®ç¥èãä¹ããã®ã§ã©ãä½ãã°ããã®ããããã¾ãããã ããããã®ããã°ã©ã ã®ä½ãæ¹ãæãã¦ãã ããã
ãã®ã¾ã¾èªã¿è¾¼ãã¨ãåãã¼ãã®ä½ç½®ãå°ãããã¦ããã®ã§ãä¿®æ£ãã¦ã.objããã©ã¼ãããã§æ¸ãåºããã¨ã«ãã¾ãããã.objããã©ã¼ããããé¸æãã¦æ¸ãåºãã¨ãã~.objãã¨ã~.mtlãã¨ããäºã¤ã®ãã¡ã¤ã«ãåºæ¥ä¸ããã¾ããã~.objãã¯ããªã´ã³ã®åº§æ¨ã«ã¤ãã¦ã®ãã¼ã¿ã§ãããã~.mtlãã¯è²ãæ質ããã¯ã¹ãã£ãªã©ã®ãã¼ã¿ãå«ã¾ãã¦ãã¾ãã以ä¸ã®ããã°ã©ã ã§ã3Dãã¼ã¿ãèªã¿è¾¼ãã§ã¿ã¾ãï¼ã~.objããã¡ã¤ã«ã¨ã~.mtlããã¡ã¤ã«ã¯ãã¹ã±ãããã©ã«ãå ã«å ¥ãã¦ããã¦ãã ããï¼ã //ã©ã¤ãã©ãªã®ã¤ã³ãã¼ã import saito.objloader.*; //ã¢ãã«ã®ãªãã¸ã§ã¯ããç¨æ OBJModel model; void setup() { //3Dç¨ã®ç»é¢è¨å® size(400,400,P3D); //ã¢ãã«ã®ãªãã¸ã§ã¯ããçæ model=new OBJModel(t
ä»æ¥ã®å 容 Processingã§3DCGããã°ã©ãã³ã° 3Dã®åº§æ¨ç³» OpenGLã¨ã¯ 2Dã®ã¢ãã¡ã¼ã·ã§ã³ã3Dã«æ¡å¼µãã¦ã¿ã 3D座æ¨ã§å³å½¢ãæã è¦ç¹ã®ç§»å 3Dã®ãç¨ããé«åº¦ãªã¢ãã¡ã¼ã·ã§ã³ ã³ã³ãã¥ã¼ã¿ã§3Dã表ç¾ããã«ã¯ ã³ã³ãã¥ã¼ã¿ç»é¢ã§3Dã表ç¾ããã ã³ã³ãã¥ã¼ã¿ã®ãã£ã¹ãã¬ã¤ã¯ã2D (縦横ã«ä¸¦ãã ãã¯ã»ã«) 奥è¡ã¯æ¬ä¼¼çã«è¡¨ç¾ãããããªã ç»é¢ã«ãç«ä½ã空éãªã©ã®3次å ã®åå¨ãæå½±ãã¦æç»ãã = 3DCG (3次å ã°ã©ãã£ãã¯ã¹) 2次å å¹³é¢ã«3次å ã®åå¨ãæå½±ããã«ã¯ãæ§ã ãªæ°å¦çãªç¥èãå¿ è¦ Processingã§ã¯ããããæ¼ç®ãèªåçã«è¡ããã¨ãå¯è½ 3次å ã®åº§æ¨ç³»ããã®ã¾ã¾ä½¿ç¨ã§ãã é«éãªè¡¨ç¤ºã®ããã®ã©ã¤ãã©ãª(OpenGL)ãæ¨æºã§ä½¿ç¨å¯ 3Dã®åº§æ¨ç³» 3Dããã°ã©ãã³ã°åºæ¬ ã¾ã2Dã®å³å½¢ãå転ããããã°ã©ã ãä½æãã¦ã¿ã translateã§ç»é¢ã®
ã¹ãå¥ã«ä»æ¥ã®è¬åº§ã§åºæ¥ãªãã£ããããããããããªããã ããã£ï¼ï¼èª° ãªãProcessingãï¼ ãã¦ãã¦ãæ¬æ¥ãã¾ãProcessingæ´è³ã®æéããã£ã¦åãã¾ãããProcessingã¨ã¯ãªããããã¨ãã¯ååè¨äºãåç §ãã ããã ããã°ã©ãã³ã°åå¿è ã®ããã®Processingå ¥é-ãã®ï¼ - I am Electrical machine Processingã«ã¯ãæ¨æºã§OpenGLãä»å±ãã¦ãã¦ç°¡åã«ç¨ãããã¨ãåºæ¥ã¾ãããã®ãã¢ã¨ãã¦ãç«æ¹ä½ãå転ãããããã°ã©ã ããµã¯ãã¨ä½ã£ã¦ã¿ããã¨æãã¾ãã 10åãããã§ããã import processing.opengl.*; void setup() { size(400,400,OPENGL); smooth(); frameRate(30); } void draw() { background(0); translate(
åèãµã¤ã(è±èª)âhttp://processing.org/learning/tutorials/eclipse/ Eclipseãå°å ¥ãã¦ããã®ã話ã§ãã æ°ããããã¸ã§ã¯ããä½ã FileâNewâProjectã§Java Projectãä½æã ã©ã¤ãã©ãªã®è¿½å processing/lib/core.jarãprocessingã®ã³ã¢ã©ã¤ãã©ãªã®ããã§ãããããEclipseã«è¿½å ãã¾ãã FileâImportâGeneralâFile SystemâBrowsã§ãã©ã«ãé¸æã§ããã®ã§processing\libãã©ã«ããé¸æãã¾ãã ä¾ãã°Program Filesã«processingãå°å ¥ãããªãä¸ã®ãã©ã«ããé¸æãã¾ãã C:\Program Files\processing\lib ç»é¢ã«ã©ã¤ãã©ãªä¸è¦§ã表示ãããã®ã§ãcore.jarãé¸æãã¾ããããã¸ã§ã¯ãããª
private/diary/2011/02/201102082100.htm : æå®ã®ã¨ã³ããªã¯åå¨ãã¾ããã ä¼¼ãã¨ã³ããªãçºè¦ãã¾ããããã¡ãã«ç§»åããå¯è½æ§ãããã¾ãã > Emacsã§Processingã®ã³ã¼ãã®ç·¨éç¶ã2
ãµã ãã¯Perlã°ã£ããããã£ã¦ã¦ãã¾ãããã¯ããã§æ¥½ãããã§ããã©ãæãã¾ã°ã©ãã£ã«ã«ãªããã°ã©ãã³ã°ã«ãæã伸ã°ããã欲ãã§ã¾ãããªã®ã§ãã¨ãããprocessingã¨ãããè¨èª(ç°å¢)ãããã£ã¦ã¾ã http://processing.org/ processingã®ã¢ã¼ã«ã¤ãããã¦ã³ãã¼ããã¦ãã¡ã¤ã³ã®ãã¤ããªãèµ·åããã¨processingç¨ã®ã¨ãã£ã¿ãç«ã¡ä¸ããã¾ããããã«ã³ã¼ããæ¸ãã¦å®è¡ãã¿ã³ãæ¼ãã¨ã°ã©ãã£ã«ã«ãªåºåãã§ãã£ã¦æããªãã§ããããã®ã¨ãã£ã¿ãé常ã«æ±ãã«ãã代ç©ã§ãã ( Emacs/Cocoaã¢ããªã®ãã¼ãã¤ã³ãã«æ £ãã¦ãã¾ãã¨ããããã¨ããã§å¼å®³ã ) ã¨ãããã¨ã§ Emacsã§processingã®ã½ã¼ã¹ããããã¾ãã ã¨ãã£ã¦ãprocessingã¢ããªã§æ¸ããã½ã¼ã¹èªä½ã¯ãsketch_070531a/sketch_070531a.pdeãã¨ããæ
ææã¡ã®ã©ãããããSamsung nc10ã®OSãwin XPããubuntuã«å ¥ãæ¿ããã®ã§Processingã®ç°å¢ãåæ§ç¯ã - processingã®ã¤ã³ã¹ãã¼ã« - ãã使ãã©ã¤ãã©ãªã®ã¤ã³ã¹ãã¼ã« - JMyron å½æ¹ã®OSã¯ubuntu 9.10 karmic $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=9.10 DISTRIB_CODENAME=karmic DISTRIB_DESCRIPTION="Ubuntu 9.10" processingã®ãã¦ã³ãã¼ããã¤ã³ã¹ãã¼ã« æ¬å®¶ã®ãã¦ã³ãã¼ããã¼ã¸ã«å¸¸ã«ææ°çã®ãã¦ã³ãã¼ããªã³ã¯ãããã¾ãããªã³ã¯ã¢ãã¬ã¹ãã³ãã¼ãã¦ãã ããã $ wget http://processing.org/download/processing-1.0.9.tgz $ t
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}