### DOT CLOCK TEST - CIRCULAR - SIDE-BY-SIDE ## VAMPYRIUM'S NOTES ## This represents your local system time as a series of four circular ## formations, with hours, minutes, seconds, and centiseconds. The hour ## formation has a central beam that changes color based on if the time is AM or ## PM. ## ## The masks are a bit of a mess since the expression compiler doesn't handle ## any "equal" cases (equal, less than or equal, and grater than or equal). ## ## The "configuration" section can be edited to set your own custom hue values ## for the AM/PM beam. # Configuration amhue = 0; pmhue = 240; # Initialization: time ftime = floor(time); secs = ftime % 60; mins = floor(ftime / 60) % 60; hrs = floor(ftime / 3600) % 24; ampm = (hrs > 11); hrs = hrs % 12; hrs = hrs + (12 * (hrs < 1)); csec = floor((time - ftime) * 100); # Initialization: AM/PM color ampmhue = (amhue * (ampm < 1)) + (pmhue * (ampm > 0)); # Initialization: laser index masks secmask = index < 60; cursecmask = index < secs; minmask = (index > 59) * (index < 120); curminmask = (index > 59) * ((index - 60) < mins); hrmask = (index > 119) * (index < 144); curhrmask = (index > 119) * ((index - 120) < hrs); csecmask = (index > 143) * (index < 244); curcsecmask = (index > 143) * ((index - 144) < csec); ampmmask = (index > 243) * (index < 245); # Expression x' = ((20 * sin((index / 60) * tau) + 25) * secmask) + ((20 * sin(((index - 60) / 60) * tau) - 25) * minmask) + ((20 * sin(((index - 120) / 12) * tau) - 75) * hrmask) + ((20 * sin(((index - 144) / 100) * tau) + 75) * csecmask) + (-75 * ampmmask); y' = (20 * cos((index / 60) * tau) * secmask) + (20 * cos(((index - 60) / 60) * tau) * minmask) + (20 * cos(((index - 120) / 12) * tau) * hrmask) + (20 * cos(((index - 144) / 100) * tau) * csecmask); h = (((((y' + 360) / 4) + ((time * 100) % 360)) + (90 * secmask) + (180 * minmask) + (270 * hrmask)) * max(max(max(secmask, minmask), hrmask), csecmask)) + (ampmhue * ampmmask); s = 1; v = (1 * cursecmask) + (1 * curminmask) + (1 * curhrmask) + (1 * curcsecmask) + (1 * ampmmask);