Home > Programming > For wick2o, Logic

For wick2o, Logic

Lisp function logic

Store as “CubeSize”, “CylinderSize”, “ShrinkBy”, “Count”
prompt “What dimension do you want for the cube?”
prompt “What dimension do you want for the cylinder?”
condition: Cylinder diameter must be smaller than cube
prompt “What factor do you want to shrink each cube by??”
prompt “Total Number of cubes in the end”

MasterCube = {
Draw cube, with it’s centre at 0,0,0
Draw THREE cylinders, along each exists, with it’s length intersectin along an axis in the cube.
subtract the three cylinders from the cube.
}

for (i=0; i copy 0,0,0 @ // creates new object
shrink previous object by ShrinkBy
}

find out what the cylinder hole size is for smallest cube.

Categories: Programming Tags:
  1. January 27th, 2005 at 22:49 | #1

    copy 0,0 @

    scale pre 0,0 0.68

    copy pre 0,0 @

    scale pre 0,0 0.68

    copy pre 0,0 @

    scale pre 0,0 0.68

    copy pre 0,0 @

    scale pre 0,0 0.68