Design Specifications for a Rocket in Codeblocks — Part 1
Codeblocks contains a number of 3D shapes. We want to identify which of Codeblock’s shapes are a good fit to be part of a rocket.
An important consideration for a designer is to set the height of each shape used as part of the rocket. Every shape in Codeblocks has a codeblock associated with it. The codeblock allows a designer to set and change values of the shape’s parameters. Height is usually one these parameters.
Shapes can also be placed so that they overlap. When designing a rocket we will have shapes overlapping along the up-down Z-axis. When overlapping shapes are rendered, the Codeblocks renderer can combine (add) them into one shape.
You can get some idea of the parts of a rocket from this NASA illustration:
Rocket Body (NASA calls it a Frame)
What shape is best for representing the body of the rocket. A Cylinder shape is a good match. Here is the Cylinder codeblock with suggested parameter values. We changed the color to silver.
We chose a Radius of 8 and a Height of 90. The rendered rocket body is below. Half of the cylinder is below the workplace (ground).
A Nose Cone is at the top of a rocket. However, most 3D printers do not do a good job of printing the top point of a Cone. A different shape, a Paraboloid, is easier to 3D print. The codeblock for a Paraboloid is shown below.
The Nose Cone with a height of 20 and a bottom radius of 5.5 looks like:
A Connector Shape
The Rocket’s body has a radius of 8 and the Nose Cone’s bottom radius is 5.5. To connect them a truncated cone is used . The codeblock for the truncated cone is shown below.
NASA placed its Guidance System in the Connector. The rendered truncated cone is below:
We need an idea to design the Rocket’s fins and and attach them to the body. Lets look at the parameters for a Star shape. Here is its expanded codeblock.
The Star will have 6 Sides (fins). Its height is set to 30. Here is what it looks like when we run the simulator by pressing the run button.
The Star’s Radius (set to 18) is the length of the bottom of each fin.
The Star can be shown as combined with the Rocket’s body (Cylinder) by placing them overlapped along the Z-axis. The Star and the Cylinder below have the same height. Codeblocks places both of them along th Z=axis from -15 to +15.
Pressing the Run button for the above codeblocks shows how Tinkercad renders this.
Why does the height of the fins appear to be much less than 30? Actually, the fins (sides) of the star are of height 30. The Cylinder hides the view of the upper part of the fins.
Cool! This is a great way to put fins on your rocket. Question, what is the length of the bottom of each fin? Answer, the Radius of the Star (18) minus the Radius of the Cylinder (8).
The Rocket’s Base
The last thing we need to do is design the Rocket’s base.
First we flip a star of height 3 over. The flipped star is placed at the base of the Rocket’s body. Here are the codeblocks to create a Flipped Star.
A Flipped Star has its fins pointed down instead of up. This is a little hard to see in the render below because the height of the Flipped Star is only 3.
The final shape will be a Truncated Cone. Here is its codeblock expanded to reveal its parameters.
This Truncated Cone will be placed at the bottom of the Rocket’s body. Thus its radius is 8, the same as the cylinder.
Below are the codeblocks used to render the upside down star and the Truncated Cone. For our render, the top of the rendered Truncated Cone is at Z = 3 (since its height is 6). When the Flipped Star is rendered, its top is at Z = 1.5. We want the tops of both shapes to be at the same Z value. A Move codeblock is used to place the top of the Flipped Star at Z = 3.
Pressing the Run button shows how Codeblocks renders it.
In Assembling a Rocket with Codeblocks — Part 2 the above codeblocks are used to assemble the rocket from bottom-to-top. Then it can be send to be 3D printed.