An aghal is a type of middle eastern headband. Here, I've simplified the design to 4 spheres laid out in a square and connected by four cylinders. This script uses a custom MEL procedure to create the aghal based on user input for radius and length of the cylinders and radius of the spheres.

|
The basic MEL procedure:
proc makeAghal(float $sphRad, float $cylRad, float $cylLength)
{
for($counter = 0; $counter < 4; $counter++)
{
sphere -r $sphRad -p ($cylLength/2) 0 ($cylLength/2);
rotate -r -os 0 ($counter*90) 0 ;
}
for($counter = 0; $counter < 4; $counter++)
{
string $cylNames[] = `cylinder -n cyl -r $cylRad -hr ($cylLength/$cylRad) -p 0 0 ($cylLength/2)`;
rotate -r -os 0 ($counter*90) 0 ;
}
}
makeAghal(1.0, 0.5, 8.0); |