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 890 of 912
Post > Topic >>

mel script and math for honeycomb image sal2 update with correct script

by temp <temp@[EMAIL PROTECTED] > Feb 12, 2008 at 03:55 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){
polyPrism -l 0 -w 1 -ns 6 -sh 1 -sc 0 -ax 0 1 0 -cuv 3 -ch 1; //create
with one face
move -r $x1 0 $z1; //diamond
rotate -r -os 0 0 0;
}
//====================
proc diagonalPlanes(){
float $x, $z, $len, $max, $diag;
$len = 2 * sind(45.0);
$diag = 4 * sind(45.0);
$max = 4;
//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 update with correct
temp <temp@[EMAIL PROT  2008-02-12 15:55:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Sun Nov 23 3:30:11 CST 2008.