UNPKG

stlfiletools

Version:

Basic tools to create a 3d model in a STL file for 3d printing.Maps a function which takes a position and returns a height onto a rectangle or sphere.eg model generated from perlin noise.

12 lines (8 loc) 287 B
function sinGrath(x,y){ return Math.sin(Math.sqrt(((x-50)/10)*((x-50)/10) + ((y-50)/10) * ((y-50)/10))); } function RadiusAtPointSphere( theta, epsilon, r) { return r; } module.exports.sinGrath = sinGrath; module.exports.RadiusAtPointSphere = RadiusAtPointSphere;