To make 3D prints using math, you need to fill two arrays with data points. One will hold x-axis points, and the other y-axis points. Once done, our function called print3d, will prepare your arrays for 3D-printing. It will cause your printer to lay down plastic at the corresponding (x,y) millimeter positions on your print-platform as read from your x and y arrays. (Think of your print-platform as a piece of graph paper. Your x and y arrays are the points you'd normally plot with a pencil on the graph paper.)
Here's print3d, that will create a print-ready STL file, based on the numbers in your arrays:
Move the mouse over a dotted box for more information.
When done, the varible id will contain an identifier that allows you to retrieve you 3d-printable STL file from this link: http://www.codebymath.com/welcome/index.php/getstl/--INSERT-YOUR-RETURNED-ID-HERE--
This STL file should be loaded into your 3D-printer's software for printing.
All numbers you use will be interpreted by your 3D-printer to be in millimeters.
Now you try. Go for it! Let's get your 3D printer cranking! Design with math!
Type your code here:
See your results here:
The code above will make a section of the parabola $y=0.1x^2$ for $x$ between -10 and 10.
See some of the examples for filling the x and y arrays using a for-loop.
Printing the value in id, as returned by print3d, will show you the identifer you'll need to retrieve your print-ready file, using this link: http://www.codebymath.com/welcome/index.php/getstl/--PUT-ID-HERE--
Note that your STL file will be deleted from our server in approximately 60 minutes.
Share your code
Show a friend, family member, or teacher what you've done!