teaching machines

Stolen Rings

Recently, I stole something precious from a friend. I was sitting in Andy’s office, and there it was. An interesting shape. Three rings nestled inside each other. They could rotate independently, but if any translated, the others would follow. I had to have these rings.

So, I stole them. Well, I stole the idea of them. Andy still has his rings. I took the stolen idea, went to Madeup, and coded up the rings.

I started with a function that generated a spherical shell, a larger sphere with a slightly smaller sphere subtracted away from it:



moveto 0, 0, 0
outer = sphere
move 0
inner = sphere
outer - inner
end

nsides = 15
shell 7, 1

var mupDiv = jQuery('#mup_shells1');
mupDiv.closest('pre').replaceWith(mupDiv);
document.getElementById('mup_form_shells1').submit();

moveto 0, 0, 0
outer = sphere
move 0
inner = sphere
outer - inner
end

nsides = 15
shell 7, 1



You can’t tell it’s hollow unless you switch to wireframe.

Then I added two more spherical shells. You won’t be able to see those either, since they’re concentric, so I won’t share that step. But then I added two square dowels around the top and bottom of these spheres:



moveto 0, 0, 0
outer = sphere
move 0
inner = sphere
outer - inner
end

nsides = 15
shell 7, 1
shell 8.5, 1
shell 10, 1

nsides = 4
moveto 0, 4
moveto 0, 11
dowel

moveto 0, -4
moveto 0, -11
dowel

var mupDiv = jQuery('#mup_shells2');
mupDiv.closest('pre').replaceWith(mupDiv);
document.getElementById('mup_form_shells2').submit();

moveto 0, 0, 0
outer = sphere
move 0
inner = sphere
outer - inner
end

nsides = 15
shell 7, 1
shell 8.5, 1
shell 10, 1

nsides = 4
moveto 0, 4
moveto 0, 11
dowel

moveto 0, -4
moveto 0, -11
dowel



These dowels overlapped the sections of the spheres I did not want. So I subtracted them:



moveto 0, 0, 0
outer = sphere
move 0
inner = sphere
outer - inner
end

nsides = 15
shell 7, 1
shell 8.5, 1
shell 10, 1

subtract

nsides = 4
moveto 0, 4
moveto 0, 11
dowel

moveto 0, -4
moveto 0, -11
dowel

var mupDiv = jQuery('#mup_shells3');
mupDiv.closest('pre').replaceWith(mupDiv);
document.getElementById('mup_form_shells3').submit();

moveto 0, 0, 0
outer = sphere
move 0
inner = sphere
outer - inner
end

nsides = 15
shell 7, 1
shell 8.5, 1
shell 10, 1

subtract

nsides = 4
moveto 0, 4
moveto 0, 11
dowel

moveto 0, -4
moveto 0, -11
dowel



And I had my rings. They rotate independently:

Now I just need to get these printed in stainless steel. Or gold, with which I could pay back Andy.

1. Andy says:

Subtract shapes is very powerful. Does Madeup have union (add or + ?) and difference (intersection)?

I did these rings using an App called 123D Design by Autodesk on iPad. It is now the TinkerCad. I did by trial and error about the height of rings so with their curvatures the inner rings will not fall out. I wonder how the height of rings can be calculated.

Animation is cool. Madeup is getting versatile..

The animated rings have more sides. I have also changed the nside to 32 for the rings and exported as STL. I will print them using my Little Monster 3D printer later. If successful, I will bring one to you.

1. Chris Johnson says:

The animation was done in Blender. I’m unlikely to add animation to Madeup. I’m concerned that it will erode its focus on modeling.

Meshes can be joined with - for differencing, and for intersection, and or for unioning. I use a library called libigl to do the heavy-lifting of these operations, which in turn uses a library called CGAL.

2. Andy says:

Thanks for the libel and CGAL info. There seems to have some javascript clones but are not complete. On web/html5 platform, javascript can do the union, interest and difference, link in OpenJSCAD https://openjscad.org

I made a x3d version of the animation, may not be of interest of this site though. https://vrmath2.net/VRM2/html/testSphereSegment2.html