Day 133 – Broken Hearts

Day 133 – Broken Hearts

Day 133 – Broken Hearts 640 480 mathgrrl

Today the holiday visits are over and we are back to designing. Something simple to start, and to get ahead for the next holiday: customizable easy-to-print broken hearts that you can string together. More importantly, this model is also a tutorial for printing designs based on mathematical parametric functions in OpenSCAD.

STL file:
Thingiverse Customizer link: MakerWare .3mm/low in almost no time at all. The top indentation of each heart has a gap so that you can chain the hearts together.

Technical notes: This model was made in OpenSCAD using the following parametric equations that define a heart shape (equations obtained from Wolfram’s HeartCurve page):

x = 16 sin^3 t
y = 13 cos t - 5 cos 2t - 2 cos 3t - cos 4t
The OpenSCAD code that makes the model is as follows. In the Customizer version we had to cut and paste the 2dgraph.scad code at the end of the file instead of using the “include” shown below, which calls the file 2dgraph.scad from the folder EXTENSIONS in my OpenSCAD working folder.// mathgrrl broken heart – OpenSCAD parametric graph example

// EXTENSIONS ///////////////////////////////////////////////

// include <EXTENSIONS/2dgraph.scad>

// PARAMETERS ///////////////////////////////////////////////

// Set the diameter of the heart, in mm
heart_diameter = 20;

// Set the thickness of the line, in mm
line_thickness = 1;

// Set the height of the model, in mm
line_height = 3;

// Choose low numbers for jagged, high for smooth
number_of_steps = 48;

scalefactor = heart_diameter*1.15/20;

// RENDERS //////////////////////////////////////////////////

// broken heart parametric curve
// equation from
function x(t) = scalefactor*16*pow(sin(t),3);
function y(t) = scalefactor*(13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t));

// make the graph and extrude it
2dgraph( [0, 350], // stop before 360 to make broken
line_thickness, // set line thickness
steps=number_of_steps, // choose low/high poly look
parametric=true); // use parametric grapher



As an Amazon Associate we earn from qualifying purchases, so if you’ve got something you need to pick up anyway, going to Amazon through this link will help us keep Hacktastic running. Thanks! :)

Leave a Reply

Back to top