Sine Waves for Fun and Profit

I’ve been playing with a few watchface ideas and thought I’d share some samples using the sin function (first off - there’s a sin and cos function!)

I wanted to do a conceptual watch with the eye slowly opening and then closing through the 24 hours of the day (so it starts closed at midnight, and opens fully by noon, then closes again by midnight.

This is the 24 hour cycle:

To get this effect, I need a sin function that would complete one phase in 24 hours. I guessed my way through the math :frowning: But I hope my guesstimates help someone else in their idea!

I used this sin formula for the eyelid Y value:


And this one for the iris Y value:


And this one for the pupil Y value:


And finally this one for the transparency of the ‘bloodshot’ veins that start to fade in when it gets tired:


(notice how hacky it is!)

Please feel free to ask any questions on this!


Figure out how to shrink/dilate the pupil depending on time of day. Sort of emulate the brightness at a given hour.
That’d be even more damn impressive :wink:


@Eno Could definitely do that - I think using a similar sin function on the radius for the pupil :smiley:

1 Like