Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > Alias software > mel script and ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 889 of 911
Post > Topic >>

mel script and math for honeycomb image sal2

by temp <temp@[EMAIL PROTECTED] > Feb 12, 2008 at 03:51 PM

mel script and math for honeycomb image sal2

Greetings all

I’m trying to adapt this mel script that was given to me to use hexagons
so when I deform it all the edges connect like this
http://www.youtube.com/watch?v=-nao3-YnsMo

I know it’s a problem with my math but I’m not sure how to fix it so all
the hexagons are connected when they are created with the mel script.


tia sal2

//==============================================================
proc drawPlane (float $x1,float $z1){
       polyPlane -sh 1 -sw 1; //create with one face
       move -r $x1 0 $z1; //diamond
       rotate -r -os 0 -45 0;
       };
//====================
proc diagonalPlanes(){
float $x, $z, $len, $max, $diag;
$len  =     sind(45.0);
$diag = 2 * sind(45.0);
$max  = 10;
//Draw the outer shell
for ($x = 0; $x < $max; $x++ ){
       for ($z = 0; $z < $max; $z++ ){
               drawPlane($x*$diag, $z*$diag);
               }
       }
//Draw the inner shell: max = N-1, and offset = .707
//$max--;            // draw 1 less row and column
for ($x = 0; $x < ($max); $x++ ){
       for ($z = 0; $z < ($max); $z++ ){
               drawPlane( ($x*$diag+$len), ($z*$diag+$len));
               // with an offset added of: .707 0 .707
               }
       }
};

diagonalPlanes();
 




 1 Posts in Topic:
mel script and math for honeycomb image sal2
temp <temp@[EMAIL PROT  2008-02-12 15:51:12 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 14:29:59 CDT 2008.