mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 14:18:13 +01:00
add doc
This commit is contained in:
parent
9022cb731d
commit
3901e4f1ea
@ -381,4 +381,4 @@ These examples incubate dotSCAD and dotSCAD refactors these examples. See [examp
|
||||
[**polyhedra/octahedron**(radius[, detail])](https://openhome.cc/eGossip/OpenSCAD/lib3x-polyhedra_octahedron.html) | create a octahedron.
|
||||
polyhedra/dodecahedron | create a dodecahedron.
|
||||
polyhedra/icosahedron | create a icosahedron.
|
||||
polyhedra/superellipsoid | create a superellipsoid.
|
||||
[**polyhedra/superellipsoid**(radius[, detail])](https://openhome.cc/eGossip/OpenSCAD/lib3x-polyhedra_superellipsoid.html) | create a superellipsoid.
|
||||
|
BIN
docs/images/lib3x-polyhedra_superellipsoid-1.JPG
Normal file
BIN
docs/images/lib3x-polyhedra_superellipsoid-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 77 KiB |
27
docs/lib3x-polyhedra_superellipsoid.md
Normal file
27
docs/lib3x-polyhedra_superellipsoid.md
Normal file
@ -0,0 +1,27 @@
|
||||
# superellipsoid
|
||||
|
||||
Creates a [superellipsoid](https://en.wikipedia.org/wiki/Superellipsoid).
|
||||
|
||||
**Since:** 3.2
|
||||
|
||||
## Parameters
|
||||
|
||||
- `e` : The east-west parameter.
|
||||
- `n` : The north-south parameter.
|
||||
|
||||
## Examples
|
||||
|
||||
use <polyhedra/superellipsoid.scad>;
|
||||
|
||||
$fn = 24;
|
||||
|
||||
step = 0.5;
|
||||
|
||||
for(e = [0:step:4]) {
|
||||
for(n = [0:step:4])
|
||||
translate([e / step, n / step] * 3)
|
||||
superellipsoid(e, n);
|
||||
}
|
||||
|
||||
![superellipsoid](images/lib3x-polyhedra_superellipsoid-1.JPG)
|
||||
|
@ -1,17 +1,16 @@
|
||||
/**
|
||||
* superellipsoid.scad
|
||||
*
|
||||
* @copyright Justin Lin, 2021
|
||||
* @license https://opensource.org/licenses/lgpl-3.0.html
|
||||
*
|
||||
* @see https://openhome.cc/eGossip/OpenSCAD/lib3x-superellipsoid.html
|
||||
*
|
||||
**/
|
||||
|
||||
use <../__comm__/__frags.scad>;
|
||||
use <../sweep.scad>;
|
||||
|
||||
// use <polyhedra/superellipsoid.scad>;
|
||||
|
||||
// $fn = 24;
|
||||
|
||||
// for(e = [0:.5:4]) {
|
||||
// for(n = [0:.5:3])
|
||||
// translate([e / .5, n / .5] * 3)
|
||||
// superellipsoid(e, n);
|
||||
// }
|
||||
|
||||
|
||||
module superellipsoid(e, n) {
|
||||
function _sgn(x) =
|
||||
x < 0 ? -1 :
|
||||
|
Loading…
x
Reference in New Issue
Block a user