4
$\begingroup$

I'm trying to create a 3D Cardioid, for which I would like to control/adjust the thickness along the axis perpendicular to the cusp. Do I use the cardioid's parametric equations for X and Y? What about Z? I'm getting "Error Evaluating Expression."

$\endgroup$
2
  • $\begingroup$ Need more details about your setup… $\endgroup$ Commented Sep 27, 2023 at 12:47
  • $\begingroup$ If you get an error, show us the error and the code/driver expression which produces the error. Best would be the blend file itself blend-exchange.com $\endgroup$
    – taiyo
    Commented Sep 27, 2023 at 14:37

1 Answer 1

7
$\begingroup$

Cardioid with Geometry Nodes

I was able to make a basic cardioid using Blender's Geometry Nodes by following the parametric equations for X and Y on the wikipedia page

Cardioid Curve in Blender with Geometry Nodes

  1. Add a new Geometry Nodes modifier to the default cube.
  2. Add a Curve Circle node and connect it to the Geometry output. Increase the Resolution to get a smoother curve.
  3. Insert a Set Position node after the Curve Circle node.
  4. Use a Spline Parameter node to get the angle around the unit circle. The Factor output gives 0.0 to 1.0 where 1.0 represents a full turn. We want a full turn to be 2 * pi so add a Multiply node after the Factor output. You can type 2 * pi and Blender will recognize that. I'll call this parameter t from now on
  5. Use Math nodes to to set up simplified parametric equations for X and Y $$x(t) = 2\cos t - \cos 2t$$ $$y(t) = 2\sin t - \sin 2t$$
  6. Combine X and Y with a Combine XYZ node and plug that into the Position input of the Set Position node.

Controlling Width

A Multiply node can be added after the calculation for x(t) to make the whole curve wider along the axis where the cusp sits. This is effectively introducing a back into the parametric equation. $$x(t) = a(2\cos t - \cos 2t)$$

A wide Cardioid Curve in Blender with Geometry Nodes

The Z Dimension

Without a specific description of how the final 3D Cardioid should look it's hard to give guidance, but a cool way I found to bring the Z dimension into it was to add nodes for $$z(t) = \sin t$$ and then mess with the Multiply nodes on the Spline Parameter Factor.

Cardioid in Blender with Geometry Nodes with Z dimension considered

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .