With the holidays getting into full gear, it seemed appropriate to make some gifts that won’t be found at the local store. One project we did was to design and build a 3D Tic Tac Toe set that could be made on a 3D printer. Since I’m currently writing a book on designing 3D shapes using the OpenSCAD language (www.openscad.org) it seemed appropriate to create our shapes with this tool. (By the way, you can get a draft of the book for free by contacting me.)

The game board is a square shape with eight rods on which pieces can be placed. The goal is to get three of the same shape in a row, either horizontally, vertically, or diagonally on any of the four faces. The game pieces are round balls and crosses with holes in them to let them stack on the rods.

The program for the board is:

// 3D Tic Tac Toe Base
$fn=100;
// game base
cube ([100, 100, 5]);
for (j=[0:1]){
for (i=[0:2]){
translate ([10+i*40, 10+j*80, 0]){
cylinder (80, 5, 5);
}}}
for (j=[0:1]){
translate ([10+j*80, 50, 0]){
cylinder (80, 5, 5);

(The details of programming in this language are included in the free book draft.)

3d tic tac toe board

The pieces (noughts and crosses) are designed in a second program and printed in an array of nine pieces, one shape at a time. For example, the program for the noughts is as follows:

// 3D tic tac toe pieces
$fn=100;
//nought
module nought (){
difference (){
sphere (15);
cylinder (40, 6, 6, center=true);
}

//cross
module cross (){
difference (){
union (){
rotate ([0, 45, 0]){
cube ([10, 16, 30], center=true);
}
rotate ([0, -45, 0]){
cube ([10, 16, 30], center=true);
}}
cylinder (40, 6, 6, center=true);
}}

//nought array
for (j=[0:2]){
for (i=[0:2]){
translate ([-25+i*35, j*35, 0]){
nought ();
}}}

noughts

To make the crosses, the noughts array needs to be replaced with this one:

//cross array
for (j=[0:2]){
for (i=[0:2]){
translate ([-25+i*35, j*35, 0]){
cross ();
}}}

crosses

All the pieces are exported as STL files for the printer to use, and I chose different colors for the board, the noughts and the crosses.

While the rules are the same as for ordinary tic tac toe, the game is made more challenging by addition of the four faces, and that any vertically stacked shape has to be on top of the platform or another shape.

I made 12 of each shape – enough to fill the entire board.

Enjoy your new game for the holidays and let me know what you think!  Write me at dthornburg@aol.com

Advertisements