|Peter 417caae273||1 year ago|
|.gitignore||1 year ago|
|LICENSE.txt||1 year ago|
|README.md||1 year ago|
|scad-gen.rb||1 year ago|
Generate OpenSCAD files for visualizations of arbitrary functions.
This is one simple Ruby script. At the top are the only things you need to edit:
t: the starting input value for your function (f(0))
step: the stepping between function values
tmax: the end value
calc(t): your function, expected to return an array with (x,y,z)
The main loop iterates from
calculates the function
calc at each step, and draws cylinders between
the points, with a sphere at each point (for a smoother appearance).
After setting it all up, run the script, sending the output to a target file. Open in OpenSCAD, render, voilà.