Custom a knob

Hi!

I’m trying to create a more interesting-looking knob with some “teeth” – I hope it’s clear what I mean.

Basically, I’d like to create a knob that looks like a polygon with multiple angles and sides, rather than a simple circle (something like a gear or a cogwheel).

Are there any tutorials or code examples that could help me achieve this look?

Thanks in advance!

There’s a few options of how to do this.
1 - a full animation rendered as a filmstrip or sprite sheet (search the forum here for these and you’ll find plenty of posts)
2 - generate a single image and rotate it (you can also split the image into layers and rotate parts of it, depending on the design)
3 - draw a path in juce and rotate the path using the juce transforms

If you go for option 1, then look into something called Knobman for creating the filmstrip files you need. But I would avoid filmstrips unless you need to create something realistic.

Thanks a lot!