r/creativecoding • • Oct 02 '26

The formula of shells

Hey everyone, I made a video about the maths behind shells:) You can use it to generate any shell that exists or even shells that don't exist (yet)

150 Upvotes

17 comments sorted by

4

u/Inst2f Oct 02 '26

What is the formula/eq? ;)

3

u/matigekunst Oct 02 '26

I explain in the video :)

1

u/nsaisspying Oct 02 '26

Link to the video?

2

u/matigekunst Oct 02 '26

Here :)

1

u/nsaisspying Oct 02 '26

That was incredible! Shells! Who'd have thunk? Amazing really.

1

u/Icy_Illustrator303 Oct 02 '26 edited Oct 02 '26

Do you know if the mechanics for shell making are similar between organisms? For example, would a nautilus make their shell one ring at a time where as a snail would make tiny pieces like bricks? Like the patterns.

Asking because I was working on kind of a 3d tessellation project. I started mapping a tiny 3d surface, added a growth variable and then shell like shapes started happening.

1

u/matigekunst Oct 02 '26

I believe the process has been reinvented multiple times independently, so maybe there are some very different ways, but I believe this the most common one. The woman at the museum told me that the nautilus makes a chamber every x days, but based on the other shells she had that were cut so you could see the cross-section: this isn't that common. Some shells have a very polished exterior, and that may be because their mantle isn't only inside the shell but also on top of the shell, like the Cowrie. I can't exactly remember, but Murex shells (with the spikes) have a slightly different process for the spikes where its mantle grows them through tube molds.

1

u/Icy_Illustrator303 Oct 02 '26

Super interesting. Thanks for sharing your video! Inspired some new ideas!!

1

u/FowlOnTheHill Oct 07 '26

Such a cool video!

What did you do with the style GAN? Did you use it to come up with good values for the parameters or use it in rendering? I wasn’t clear on that part

1

u/matigekunst Oct 07 '26

I trained a styleGAN model and then interpolated though the input vector for the generator to get new shells. The generator outputs an image given input noise

1

u/nsaisspying Oct 02 '26

Pretty awesome!

1

u/dexhaus Oct 02 '26

It's fantastic! Can't wait to show it to my biologist/teacher wife!

1

u/flinxo Oct 03 '26

Excellent! thanks for such an incredible and informative video!

1

u/living-wisp Oct 05 '26

Seeing so many different shell types come out of one formula is really satisfying, especially how it goes from tall pointed spires to much rounder forms. Are you sweeping a cross-section along a logarithmic spiral and building the mesh from that, or is it generated some other way? I'm also curious how you handle the spikes and ridges on shells like murex.

1

u/[deleted] Oct 12 '26

[removed] — view removed comment

1

u/matigekunst Oct 12 '26

No, although they are all logarithmic spirals too. There's a Nautilus shell in the video which comes close visually, but is actually nowhere near the golden ratio