PDA

View Full Version : squiggly circles Maya 8.5 PLE


ronviers
10-25-2008, 06:59 AM
Hi,
I need a bunch of squiggly (randomly arranged CVs on yz) circles and this is what I came up with. The problem is that it makes the same squiggly circle each time and I need each one to be different. If you try it with a value of about 32 you will see what I am trying get. Does anyone know of a better way to do this?


proc squigglyCircle (int $numSpans){
int $cT=$numSpans;
circle -n legSegProfile_nCir -c 0 0 0 -nr 1 0 0 -sw 360 -r 1 -d 3 -ut 0 -tol 0.001 -s $numSpans -ch 1;
for ($i=0;$i< $numSpans;$i++)
{
createNode noise -n yOffsetCv_noi;
setAttr .ti $cT;
createNode noise -n zOffsetCv_noi;
setAttr .ti $cT;
connectAttr -f yOffsetCv_noi.outColorG ("legSegProfile_nCirShape.controlPoints[" + $i + "].yValue");
connectAttr -f zOffsetCv_noi.outColorB ("legSegProfile_nCirShape.controlPoints[" + $i + "].zValue");
delete yOffsetCv_noi;
delete zOffsetCv_noi;
$cT--;
}
};

Never mind. Got it working. Just discovered the rand command – very handy. Thanks to everyone that took a look. It is still probably not a very good approach but it works so it will be fine - if someone has a better way please let me know.

CGTalk Moderation
10-25-2008, 06:59 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.