Heart Node - And Heart Challenge!

john's Avatar

john

28 Nov, 2023 12:38 AM

Attached is a very simple node that does a very simple thing: it draws a heart.

The classic heart shape is widely known and has many uses, but unlike rectangles, lines, and ellipses, does not have its own built-in node. So to make one you either have to import it as an SVG or pull it from a special character in a font. But both of these ways are cheating - I want to make my own heart from scratch.

My heart node does this using some sine and cosine waves, resampled into a 360-sided irregular polygon. You can set it to any width you want. (See screenshot.)

But this is certainly not the only way to make a heart - and probably not even the best way.

For one thing, there are many variations on what a "heart shape" really is. And once you decide on a particular heart shape, there are many different conceivable ways of making it in Nodebox.

My CHALLENGE to all of you out there, then, is to make a better heart node - or at least a different one, and post it in this thread. SVG and font-based hearts are verboten. Anything else goes.

I am modeling this challenge after our recent successful yin-yang symbol challenge:

http://support.nodebox.net/discussions/general-discussion/15090-yin...

The heart challenge is simple enough to be tackled even by relative newbies, but interesting enough to stretch the skills of expert Nodeboxers.

  • Can you make a heart prettier than mine?
  • Can you make one in an usual or clever way?
  • Can you make it with fewer nodes than I used?
  • Can you make one with just a few bezier curves instead of 360 edges?

GAME ON!

  1. 1 Posted by edgeofinnerspac... on 21 Feb, 2024 05:27 PM

    edgeofinnerspace's Avatar

    It's cooking. But don't have time right now. Just saw this though.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • heart_screenshot.png 316 KB
  • heart_node.ndbx.zip 1.22 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

03 Mar, 2024 04:34 AM
23 Feb, 2024 07:39 PM
23 Feb, 2024 10:02 AM
22 Feb, 2024 05:51 AM
21 Feb, 2024 05:27 PM

 

21 Feb, 2024 04:49 PM
16 Feb, 2024 05:24 PM
06 Feb, 2024 04:45 AM
19 Jan, 2024 09:50 AM
13 Jan, 2024 03:47 AM
05 Jan, 2024 05:10 PM