1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-13 18:24:28 +02:00

add polar_zonohedra

This commit is contained in:
Justin Lin
2021-12-03 09:30:06 +08:00
parent d822688eaf
commit e49c40e0f0
6 changed files with 35 additions and 11 deletions

View File

@@ -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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -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 <polyhedra/polar_zonohedra.scad>;
for(n = [3:8]) {
translate([0.5 * n * (n - 3), 0, 0])
polar_zonohedra(n);
}
![polar_zonohedra](images/lib3x-polyhedra_polar_zonohedra-1.JPG)

View File

@@ -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.

View File

@@ -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([

View File

@@ -1,13 +1,12 @@
// http://archive.bridgesmathart.org/2021/bridges2021-7.pdf
// use <util/sum.scad>;
// use <util/flat.scad>;
// use <polyhedra/polar_zonohedra.scad>;
// 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 <geom_polar_zonohedra.scad>;