Coding a Solid of Constant Width

Introduction: Coding a Solid of Constant Width

About: I'm a borderline mad genius, which means I'm just mad and not a genius.

Hello all,

after seeing Angus from Maker's Muse I was inspired to code a solid of constant width. In this instructable we will be coding a Reuleaux Tetrahedron, this isn't a true solid of constant width however, but it approximates it.

Now solids of constant width are very interesting objects, in essence they behave like spheres, but don't look like them.

The way we will be making ours is by intersecting 4 spheres with each other, using blocksCAD3d. This is a free online coding block program, which also has an extension for OpenSCAD, you will need an account but as said they are free, and you will get a lot of fun coding and creating your shapes.

More info and proof about the Reuleaux Tetrahedron can be found here.

Supplies

  • 3d printer (if you want to print it)

Step 1: BlocksCAD3d

Make an account for blocksCAD3d, this is easy, if you have a google account. If not, you will have to fill out a form.

Step 2: Coding

Here we will code the solid of constant width, if you want more info on them I suggest looking here.

First of we will create two variables, a radius and a distance. The radius can be set to any number just make sure it is big enough for your printer. The distance is the radius halved.

Now we make a Sphere, that will intersect with our object (also a sphere) and cut parts off it. I will call this BottomSphere, but you can call it however you want. The name isn't important. For this we will use a module.

We are just translating the sphere a set amount for every different index it gets, we do this using a sin wave and a cos wave, because these are always shifted 90 degrees from each other.

Now we make the rest of the code just a couple of intersections to cut parts of our initial sphere. And a final translate to make sure everything is nice and centered.

My code can be found here.

Step 3: Printing

After rendering our code, we can hit the Generate stl - button, this will save the project file to the computer.

Printing this will be reasonably easy, you just need to support the bottom of your solid. Normally the default support will do this just fine.

So just drag and drop the file into your slicing program using default settings, slice it, export the gcode to your printer, and start printing.

Step 4: Final Thoughts

There are a few constants of solid width, today we made just one of them. Maybe in a future instructable I'll show how you can make one in fusion 360. Don't forget to print a few and amaze your family with their cool characteristics.

Block Code Contest

Participated in the
Block Code Contest

Be the First to Share

    Recommendations

    • Laser Challenge

      Laser Challenge
    • 3D Printed Student Design Challenge

      3D Printed Student Design Challenge
    • Hide It Challenge

      Hide It Challenge

    2 Comments

    0
    TheFlorifant
    TheFlorifant

    Reply 10 months ago

    Oh that's really good. I tried to adapt this info to my project, but sadly it didn't work.