How to Craft a Fence?
The objective of this tutorial is to craft a fence that looks like below.
One way to construct this fence is to decompose it into three steps:
- build a row of evenly spaced vertical sticks
- build two long sticks running across horizontally
- position (1) and (2) in the way we want
To create a vertical stick, we can use a
5 50 5, which is
along the x-axis,
50 units along the y-axis, and
5 units along the z-axis.
By default, one unit is equal to one mm.
10, which will give
us 10 copies of this vertical stick.
However, all these 20 sticks are overlapping. To put them in a row with even
spacing, we can wrap them inside a
tag and set the
5 to add a spacing of 5 units between every two sticks.
The next step is to build two long sticks. Similarly, we can create aand set its `size` and `repeat` attributes to what we want. Then, to position the two sticks, we can use a tag, which is like a except items are lined up along the y-axis.
Finally, we can bring the two parts together. We also want to align the two parts correctly. To do so, we group them usingand use the layout command .
Can you build these other kinds of fences?
A fence with 20 posts
A fence with wider gaps between posts
A fence with three horizontal sticks