3D Model a Tower of Hanoi Puzzle with BlocksCAD


We've used BlocksCAD to code a Tower of Hanoi puzzle that can be printed and played with. This project brings together three of our favourite things: coding, 3D printing and logic puzzles. Oh and maths too, there's lots of neat maths.

This is good project for children and families who are just getting started with 3D printing. It's also good for developing logical thinking skills and using maths for something useful and interesting.

What is the Tower of Hanoi Puzzle?

The Tower of Hanoi is a well-known puzzle in which you have to move a set of discs from one tower to another by only placing smaller discs on top of larger ones. It's based on a legend that says the world will end when monks at a temple solve this puzzle for 64 discs and 3 towers. French mathematician Ã‰douard Lucas designed the puzzle in 1883. There's more information on the origin and theory of the puzzle on Wikipedia

When I was a child my Dad made a metal version of this puzzle (he was a toolmaker) and I spent hours playing with it. 

The puzzle typically has three towers and three or more discs. We've used five discs for this version as that gives you enough to look for patterns in the solutions.



Using BlocksCAD

BlocksCAD allows you to create 3D models using drag and drop coding blocks. It's a great way for beginners to get started with 3D modelling. 

We use BlocksCAD with Microsoft 3D Builder which is great for fixing up any probems in the model and can send models directly to our Da Vinci Mini 3D printer


See also:

The Code

The Tower of Hanoi is a great 3D model for beginners to create as it can easily be made from geometric shapes.

If you're not in a hurry to get to the puzzle it's worth doing the maths the work out the sizes of the shapes.

The base is a cuboid, we tapered it to add a bit of interest. You could make it thicker if you have more patience than us! The towers are evenly spaced cylinders. 


Each disc can be made using a cylinder with another cylinder cut out of it using the difference operator. (Code is only shown for two of the discs, the other code is similar.)



We gave the towers a 4mm diameter and put a 5mm hole in the discs to allow for easy movement.

3D Printing

We printed the puzzle in two parts on a Da Vinci Mini 3D printer via Microsoft 3DBuilder. It's easy to split a model into multiple parts with a BlocksCAD as you can disable the blocks you don't want to include from the right-click menu.

We created one STL file for the base and towers and another for the discs. This meant we could print them in different colours.

We chose clear for the base and towers as it was already on the printer and then gold for the discs to fit with the legend.


The Puzzle

The first step is to solve the puzzle. Then to think about the smallest number of steps that it can be solved in. I got my kids to make a table showing the least number of moves for 1-5 discs. My 8 year old quickly worked out how to predict the next number in the sequence. We then talked about how to work out the number of moves given the number of discs. This lead to playing around with the google scientific calculator.

My 10 year old was interested in the number of moves it would take to solve the puzzle with 64 discs. This lead to some discussion around really big numbers and what the 'e' means in numbers on a scientific calculator.

The Algorithm

You could also look into the algorithm for solving the puzzle for different numbers of discs. After trying the puzzle a few times for different numbers of discs kids discover the algorithm for solving it in the fewest number of moves.

You can solve the puzzle with a 'recursive algorithm', an algorithm that calls itself with a smaller problem - in this case a smaller number of discs. Recursive solutions are often very elegant though they can be hard to understand at first. Recursion is one of the cool concepts in computer science.

For teens there's a good discussion of the Tower of Hanoi puzzle and its recursive solution in the Khan Academy Computer Science course.

What Next?

There's still more you can explore with this project. Can you design a 3D model for puzzles that use more discs? How does the 3D model need to change? Could you design a parameterized solution. You'll need to think about how far apart the towers need to be if you make the discs larger. 







Name

2013,13,2014,4,2016,2,2017,4,2018,1,2019,1,3d modelling,9,3d pen,2,3d printer,2,3d printers,5,3d printing,35,3DTin,2,about,3,accessories,1,active,2,activities,4,ada,1,ada lovelace,3,adafruit,2,adaptive tech,1,advent calendar,7,adventure games,4,advice,1,age ratings,1,ai,1,airhogs,1,alan turing,2,alexa,2,algorithms,1,alice,3,amazon,4,amazon dot,2,amazon echo,3,amazon fire,11,amazon prime,2,android,7,angry birds,1,animation,8,anki,3,app,21,app toy,4,app toys,13,appcessories,1,apple,1,apps,24,arcbotics,1,architecture,8,arckit,10,arduino,47,art,10,artificial intelligence,8,astronauts,2,astronomy,1,audio,1,augmented reality,12,author interviews,1,automaton,2,awards,1,bare conductive,1,bats,1,battle bots,3,battling robots,2,BBC Make it Digial,1,bedtime,1,bee-bot,4,beetle blocks,1,beginners,2,benjamin franklin,3,bett,1,BFX Festival,2,big day in,1,big kid,1,big kids,162,big tablets,1,bigtrak,2,bike,2,binary,2,birthday,5,birthday party,2,bitsbox,2,black friday,4,blockly,4,blockscad,6,blog tours,4,blogging,1,bloxels,2,bluetooth,3,board games,13,book,7,books,28,boolean box,1,bose,1,boys,1,breadboard,3,bricks,1,brixo,1,building a robot,1,buying guide,2,cake,1,camera,6,cameras,1,camping,2,camps,2,card game,2,cardboard,1,careers,2,catroid,1,celebration,1,cellphone,1,ces,4,CES 2016,1,ces 2017,1,charity,1,charles babbage,1,charles wheatstone,1,chemistry,3,chess,1,chibitronics,2,chip,1,chocolate,2,christmas,50,circuit cubes,1,circuit playground,11,circuit scribe,10,cleaning,1,climbing,1,code,2,code clubs,2,code gamer,1,code-a-pillar,2,code-gamer,1,codebug,1,coder,2,coder mip,1,coding,192,coding toys,2,cognitive learning,1,coji,4,communication,4,comparison,3,competition,10,computational thinking,10,computer,4,computer games,1,computer science,6,computer vision,2,computers,3,computing,1,conductive ink,1,conductive playdough,6,connected toys,20,construction,42,conversational ai,1,costumes,4,cozmo,2,craft,19,craft cutter,7,crafts,3,creative thinking,1,creativity,6,crochet,1,crowdfunding,151,cryptography,1,css,1,cube,1,cube 3,1,cubs,1,curiosity,1,curious chip,1,cyber monday,1,cyber security,1,da vinci,1,da vinci minimaker,2,dads,2,dash&dot,13,data,2,deals,8,decorations,1,dens,2,design,13,design process,1,design thinking,16,digital literacy,4,digital making,5,digital parenting,48,disability,1,disney,1,disney infinity,1,diy synth,1,dog tech,1,dolls,2,dot,1,drawing,9,drones,7,duinokit,1,dymo,1,earth day,1,Easter,6,ebooks,13,echo,2,eco,1,edblocks,1,edible,1,edison,6,edtech,2,education,86,egypt,1,electric paint,1,electricity,4,electro mat,4,electronic ink,1,electronic pets,3,electronic toys,7,electronics,132,electronics coding,1,electronics kit,20,electronics kits,5,electronics. robots,1,elementary,1,elmoji,1,emojis,1,energy,1,engineering,22,ereader,1,ereaders,6,esafety,2,escape rooms,1,escape the room,2,etextiles,3,event,9,ewriter,1,exercise,7,facts,1,family,20,family tech,5,fashion,1,fathers day,1,female,1,Festival of Code,1,fiction,1,fitness tracker,5,fizzbit,1,FLL,1,flotilla,4,flow charts,1,flutterbye fairy,1,flying,1,followgrams,1,food,1,force awakens,3,force band,1,force friday,3,fortnite. gaming,1,fpv,1,future,2,gadget,1,gadgets,14,game,3,games,26,games console,2,games consoles,9,gaming,4,gaming laptop,1,geography,1,george boole,1,get set go,11,gift,3,gift guide,50,gifts,15,girls,33,giveaway,4,glow in the dark,1,google,1,google home,1,grace hopper,3,grove,1,guest posts,3,guide,6,hackaball,5,hacksoton,2,halloween,17,halloween costumes,7,halo,1,handwriting,1,hardware,2,harry potter,1,headphones,1,health,1,hedy lamarr,1,hexbug,4,hexbug aquabots,1,hexbug project,1,high school,1,history,36,holiday,1,holidays,3,home,1,home automation,4,home education,6,homeschool,10,homework,1,honeycomb,1,hot toys,12,hour of code,5,html,4,humanoid,5,ICT,1,if kids can code,1,IKEA,1,in app purchasing,1,indiegogo,15,industry,1,industry event,1,information,1,innotab,5,innotab 3,3,innotab 3s,1,internet access,1,internet safety,3,interviews,1,invention,8,inventor,1,ios,3,IoT,5,ipad,10,ipad mini,1,iphone,2,jacquard,1,japan,1,java,1,javascript,5,jewellery,2,joto,1,k'nex,7,k'nex robotics,2,kano,10,keyboard,1,kickstarter,120,kids,9,kindle,7,kindle fire,9,kit,2,kits,5,klutz,1,kobo,1,kodu,1,kubo,1,label printer,2,languages,1,laptop,3,laptops,2,last minute,1,leap motion,1,leapfrog,3,leappad,7,leappad 2,3,leappad ultra,3,leappad2,1,leapreader,1,learning,8,learning resources,5,learning tablet,2,learning tablets,9,leds,4,lego,46,lego boost,2,lego chain reactions,1,lego dimensions,1,lego mindstorms ev3,7,lego power functions,2,lego technic,7,lego wedo,2,leibniz,1,let's start coding,1,lighting,1,lights,1,lightseekers,3,literacy,1,little bits,1,little kid,1,little kids,142,littlebits,18,logiblocs,1,logic,7,logical thinking,8,logo,1,loom,1,machines,2,magnetic,1,magnets,1,make it,2,makeblock,14,makedo,2,maker,23,maker faire,2,makey makey,8,makey makey go,1,making,40,mardles,1,margaret knight,1,mars,1,mars rover,1,marty,2,math,4,maths,6,mbot,14,mbot ranger,1,me arm,1,meccano,7,meccanoid,8,meccanoid 2.0,1,mechanisms,1,medium,1,merge vr,1,michael faraday,4,micro:bit,13,micro:bit in wonderland,3,microbit,2,microcontroller,9,microscope,2,microsoft,1,middle school,6,miles kelly,1,mindstorms,4,minecraft,22,minecraft mods,1,mixed reality,1,mobile,1,modelling,1,modular electronics,2,mom,1,monsters university,1,morse code,4,mothers day,4,motion capture,1,motors,4,mover kit,7,movie,1,movies,4,mu,1,mu toys,1,multiplayer game,1,mum,1,munzee,1,music,12,my first robot,3,national dog day,1,nature,2,new year,2,news,137,nikola tesla,3,nintendo,3,nintendo labo,1,nintendo switch,1,numbers day,1,oculus rift,1,ohbot,4,older kids,1,ollie,5,on the web,1,online safety,4,openscad,2,opinion,8,origami,2,osmo,4,outdoors,21,ouya,1,ozobot,14,paper circuit,2,papercraft,19,parental controls,2,parenting,48,parents,9,parrot,3,party,2,pc,1,people,18,pet tech,2,pets,3,phone,1,phones,1,photography,1,photon,1,physics,3,pi day,1,picks,2,pimoroni,1,pinoccio,1,pixel art,13,pixel kit,2,pixelart,8,play,2,playstation 4,3,plezmo,1,pocket code,1,pocket money,1,pokemon,5,pokemon go,5,poll,1,pre order,1,pre-teens,1,prehistory,1,preschoolers,46,primary,44,prime day,1,prime numbers,1,printable,1,products,36,professor einstein,1,programming,20,project,23,projects,88,pumpkin,1,puzzles,6,python,11,racing,1,raspberry pi,34,reading,12,remote control,1,research,3,resource,1,resources,6,retro,2,review,202,rights,1,robot,17,robot dog,1,robot fish,2,robot games,2,robot wars,4,ROBOTERRA,1,robotical,1,roboticals,1,robotics,37,robots,139,roby,1,role models,1,role play,4,romo,1,romotive,1,root,1,roundup,5,rover,1,safer internet day,1,safety,2,sam labs,9,samuel morse,3,sandbox,1,school,3,schools,4,science,25,scratch,51,scratchjr,4,screen time,9,screenless,26,screens,1,sensors,9,servos,1,shakespeare,1,silhouette cutter,2,simbrix,10,skills,1,skylanders,4,skylanders superchargers,1,skylanders swap force,1,smart pens,1,smartphone,1,smartwatch,3,snap circuits,5,snow,1,snowman,1,social media,4,solar power,3,soldering,2,sonic pi,1,sony koov,2,sound,5,sounds,1,space,10,sparki,3,speaker,4,speech sythesis,1,sphero,16,sphero mini,1,spider,2,spinmaster,1,star wars,10,stars,1,STEAM,26,stem,26,stem mouse,1,stephen hawking,1,stikbot,1,stocking fillers,1,stocking stuffers,1,stop motion,3,stop motion studio,1,storage,1,story,2,strawbees,2,students,1,subscription,5,subscriptions,1,sugru,3,summer,12,swift,2,t-shirt,1,tablet,2,tablets,26,tangible coding,2,tech,4,tech age,3,tech age parenting,4,tech craft,16,tech event,4,tech heroes,1,tech is bad,7,tech is good,4,tech toys,15,tech trends,1,tech will save us,5,techalice,3,techforgood,1,technology,2,technology will save us,6,teen,1,teens,104,teknikio,2,tekno,1,teksta,2,tenka labs,1,tesla,1,textiles,1,thames & kosmos,2,the extraordinaires,1,tim berners lee,1,tinkercad,3,tinkering,1,tinybop,3,tips,1,toddlers,14,toot-toot,1,top pick,1,top toys,1,touch,2,toy,1,toy fair,4,ToyFairNY,1,toys,6,toys to life,9,travelling,1,turing tumble,1,TV,1,tween,2,tweens,174,two-way radios,1,tynker,2,typing,5,ubtech,1,ubtech jimu,1,ux,1,vacation,1,valentines day,3,vehicles,1,videos,4,view-master,2,views,11,virtual reality,8,voice assistants,2,voice recognition,3,voice recorder,9,vr,4,vtech,10,walkie talkies,1,walking,1,watch,1,wearable,6,wearables,8,web,2,websites,1,welcome,1,wifi,1,wii,2,wii u,2,william gilbert,3,windows 8,1,winter,2,women,1,wonder league,1,wonder workshop,4,world book day,1,wowee,1,wowwee,7,writing,8,writing. education,1,xbox one,2,xyzprinting,5,YRS,1,zoomy 2.0,1,
ltr
item
TAKWEB: 3D Model a Tower of Hanoi Puzzle with BlocksCAD
3D Model a Tower of Hanoi Puzzle with BlocksCAD
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zixVn-Fiw_oPS2o4OtStjfsS8tPMXLuKIK-6J1RaEHCDR5irPQoWLC5i7yViOZmB7jBVt0rkS-NH4J4Brpjm7fx2gEdU7SS1fL469hPdaatb7679QiNKYlraTyD5LSW9XK521pTACbYu/s640/3d-printed-tower-of-hanoi.jpg
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6zixVn-Fiw_oPS2o4OtStjfsS8tPMXLuKIK-6J1RaEHCDR5irPQoWLC5i7yViOZmB7jBVt0rkS-NH4J4Brpjm7fx2gEdU7SS1fL469hPdaatb7679QiNKYlraTyD5LSW9XK521pTACbYu/s72-c/3d-printed-tower-of-hanoi.jpg
TAKWEB
https://takweb123.blogspot.com/2017/04/3d-model-tower-of-hanoi-puzzle-with.html
https://takweb123.blogspot.com/
https://takweb123.blogspot.com/
https://takweb123.blogspot.com/2017/04/3d-model-tower-of-hanoi-puzzle-with.html
true
9029141400980853117
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy