diff --git a/README.md b/README.md index 8dede2a1..bbd96aca 100644 --- a/README.md +++ b/README.md @@ -363,6 +363,7 @@ These examples incubate dotSCAD and dotSCAD refactors these examples. See [examp Signature | Description --|-- [**polyhedra/star**([outerRadius, innerRadius, height, n])](https://openhome.cc/eGossip/OpenSCAD/lib3x-polyhedra_star.html) | create a 3D star. +[**polyhedra/polar_zonohedra**(n[, theta])](https://openhome.cc/eGossip/OpenSCAD/lib3x-polyhedra_polar_zonohedra.html) | create a [polar zonohedra](https://mathworld.wolfram.com/PolarZonohedron.html). [**polyhedra/tetrahedron**(radius[, detail])](https://openhome.cc/eGossip/OpenSCAD/lib3x-polyhedra_tetrahedron.html) | create a tetrahedron. [**polyhedra/hexahedron**(radius[, detail])](https://openhome.cc/eGossip/OpenSCAD/lib3x-polyhedra_hexahedron.html) | create a hexahedron. [**polyhedra/octahedron**(radius[, detail])](https://openhome.cc/eGossip/OpenSCAD/lib3x-polyhedra_octahedron.html) | create a octahedron. diff --git a/docs/images/lib3x-polyhedra_polar_zonohedra-1.JPG b/docs/images/lib3x-polyhedra_polar_zonohedra-1.JPG new file mode 100644 index 00000000..64fd98c8 Binary files /dev/null and b/docs/images/lib3x-polyhedra_polar_zonohedra-1.JPG differ diff --git a/docs/lib3x-polyhedra_polar_zonohedra.md b/docs/lib3x-polyhedra_polar_zonohedra.md new file mode 100644 index 00000000..299c2a49 --- /dev/null +++ b/docs/lib3x-polyhedra_polar_zonohedra.md @@ -0,0 +1,22 @@ +# octahedron + +Creates a [polar zonohedra](https://mathworld.wolfram.com/PolarZonohedron.html). + +**Since:** 3.2 + +## Parameters + +- `n` : n equal rhombs surrounding one vertex. (rotational symmetry) +- `theta` : the pitch angle of the edges. + +## Examples + + use ; + + for(n = [3:8]) { + translate([0.5 * n * (n - 3), 0, 0]) + polar_zonohedra(n); + } + +![polar_zonohedra](images/lib3x-polyhedra_polar_zonohedra-1.JPG) + diff --git a/src/experimental/note.md b/src/experimental/note.md index e60507b1..5185b051 100644 --- a/src/experimental/note.md +++ b/src/experimental/note.md @@ -40,7 +40,7 @@ release: Signature | Description --|-- [**polyhedra/star**([outerRadius, innerRadius, height, n])](https://openhome.cc/eGossip/OpenSCAD/lib3x-polyhedra_star.html) | create a 3D star. -polyhedra/polar_zonohedra | ... +[**polyhedra/polar_zonohedra**(n[, theta])](https://openhome.cc/eGossip/OpenSCAD/lib3x-polyhedra_polar_zonohedra.html) | create a [polar zonohedra](https://mathworld.wolfram.com/PolarZonohedron.html). [**polyhedra/tetrahedron**(radius[, detail])](https://openhome.cc/eGossip/OpenSCAD/lib3x-polyhedra_tetrahedron.html) | create a tetrahedron. [**polyhedra/hexahedron**(radius[, detail])](https://openhome.cc/eGossip/OpenSCAD/lib3x-polyhedra_hexahedron.html) | create a hexahedron. [**polyhedra/octahedron**(radius[, detail])](https://openhome.cc/eGossip/OpenSCAD/lib3x-polyhedra_octahedron.html) | create a octahedron. diff --git a/src/polyhedra/geom_polar_zonohedra.scad b/src/polyhedra/geom_polar_zonohedra.scad index c3a63615..c894e7ce 100644 --- a/src/polyhedra/geom_polar_zonohedra.scad +++ b/src/polyhedra/geom_polar_zonohedra.scad @@ -1,6 +1,8 @@ use <../util/sum.scad>; use <../util/flat.scad>; +// http://archive.bridgesmathart.org/2021/bridges2021-7.pdf + function vertex(i, j, n, theta) = i > j ? [0, 0, 0] : sum([ diff --git a/src/polyhedra/polar_zonohedra.scad b/src/polyhedra/polar_zonohedra.scad index c9547f64..4334bde2 100644 --- a/src/polyhedra/polar_zonohedra.scad +++ b/src/polyhedra/polar_zonohedra.scad @@ -1,13 +1,12 @@ -// http://archive.bridgesmathart.org/2021/bridges2021-7.pdf - -// use ; -// use ; -// use ; - -// for(n = [3:8]) { -// translate([0.5 * n * (n - 3), 0, 0]) -// polar_zonohedra(n); -// } +/** +* polar_zonohedra.scad +* +* @copyright Justin Lin, 2021 +* @license https://opensource.org/licenses/lgpl-3.0.html +* +* @see https://openhome.cc/eGossip/OpenSCAD/lib3x-polyhedra_polar_zonohedra.html +* +**/ use ;