Node: Plane Tesselations, Next: Roulettes and Involutes, Previous: Pattern Reference, Up: Pattern Reference
3DLDF can be used to make perspective projections of plane tesselations and other two-dimensional patterns. These can be used for drawing tiled floors and other architectural items, among other things. While patterns can be generated by using the basic facilities of C++ and 3DLDF without any specially defined functions, it can be useful to define such functions.
3DLDF currently contains only one function for drawing patterns based on a plane tessellation. I plan to add more soon.
unsigned int hex_pattern_1 ([real diameter_outer = 5, [real diameter_middle = 0, [real diameter_inner = 0, [unsigned short first_row = 5, [unsigned short double_rows = 10, [unsigned short row_shift = 2, [Color draw_color_outer = *Colors::default_color , [Color fill_color_outer = *Colors::background_color , [Color draw_color_middle = *Colors::default_color , [Color fill_color_middle = *Colors::background_color , [Color draw_color_inner = *Colors::default_color , [Color fill_color_inner = *Colors::background_color , [string pen_outer = "pencircle scaled .5mm", [string pen_middle = "pencircle scaled .3mm", [string pen_inner = "pencircle scaled .3mm", [Picture& picture = current_picture , [unsigned int max_hexagons = 1000]]]]]]]]]]]]]]]]])
|
Function |
Draws a pattern consisting of hexagons forming a tesselation of the x-z
plane, with additional hexagons within them.
The arguments:
Draws a pattern in the x-z plane consisting of hexagons. The outer
hexagons form a tessellation. The middle and inner hexagons fit
within the outer hexagons. The hexagons are drawn in double rows.
The tessellation can be repeated by copying a
double row and shifting the copy to lie directly behind the first double
row. If the The return value of this function is the number of hexagons drawn. default_focus.set(0, 10, -10, 0, 10, 25, 10); hex_pattern_1(1, 0, 0, 5, 5);
default_focus.set(-5, 5, -10, 0, 10, 25, 10); hex_pattern_1(2, 1.5, 1, 2, 5, 2, black, gray, black, light_gray, black);
|