2010年10月26日 星期二

subdivision_Wall (MAYA_Mel)


使用Maya Mel中簡單的polySphere功能
改變其中的subdivision選項 即可改變球的分割
而達到不同球之造型
Using "polySphere" in Maya Mel script to make the form.
Changing the "subdivision" of the sphere,
we can get different shape of form.
分割的依據是透過兩層for_Loop去定義
並且利用move使其移動而形成sin正弦波浪的感覺
並旋轉個體造成波動感
We use double for_Loop to define the number of the subdivisions,
and once we populate a sphere,
we move it to the sin curve to get the sin_wave wall.
We also rotate each component gradually to make the wave.
我們同樣嘗試polyCube去塑形
We also try to use the polyCube to make the form.
程式如下
the script is below: 
int $y;
int $x;
for($y=3; $y<=30; $y=$y+1){
for($x=3; $x<=10; $x=$x+1){
polySphere -radius 10 -sx $x -sy $y; //畫球polySphere
//polyCube -w (5*$x) -h (5*$y) -d (0.2*($x+$y)) -sx $x -sy $y; //畫方polycube
move -r (12*($y)) (12*($x)) (12*(sin(18*($x+$y))));
rotate -r (18*($x+$y)) 0 0;
}
}







  


沒有留言:

張貼留言