omdl  v0.5
OpenSCAD Mechanical Design Library
n-gon Solutions

Regular n-sided polygon computations. More...

+ Collaboration diagram for n-gon Solutions:

Files

file  math.scad
 Mathematical functions.
 

Functions

function ngon_vp (n, r, vr)
 Compute the vertices for an n-sided equiangular/equilateral regular polygon. More...
 

Detailed Description

Regular n-sided polygon computations.

Function Documentation

function ngon_vp ( ,
,
vr   
)

Compute the vertices for an n-sided equiangular/equilateral regular polygon.

Parameters
n<decimal> The number of sides.
r<decimal> The ngon vertex radius.
vr<decimal> The vertex rounding radius.
Returns
<vector> A vector [v1, v2, ..., vn] of vectors [x, y] of coordinates.

Example

vr=5;
hull()
{
for ( p = ngon_vp( r=20, n=5, vr=vr ) )
translate( p )
circle( r=vr );
}