The University of Sheffield
Neil Lawrence ML@SITraN
Miscellany

Is this the World's First Tau Clock?

I really like The Tau Manifesto (although I don't like celebrating number-days, eventually we'd all have to buy Hallmark cards). It was inspired by http://www.math.utah.edu/~palais/pi.html. It made me want to have a Tau Clock. So I bought a 24 hour clock from Seldeck (thanks to Jaakko Peltonen for finding the 24 hour clock after I mentioned the idea) and wrote a short MATweave document to create a face for it. Now I have a Tau Clock.

(for counter arguments to Tau see The Pi Manifesto, although personally I feel if that's all they've got then Pi really is dead ...)

The clock is going to be given to my colleague as a present from our group for his birthday.

Update: I found another Tau Clock here. Although I find it rather offensive. They have the hour hand going around the clock twice to perform one turn, which is almost as silly as having a constant that needs to be doubled to represent a full turn. I think they are cashing in. That said, I do like the idea of the hand going backwards in line with polar coordinates. Jaakko and I discussed this but concluded that we were unlikely to find a 24 hour clock mechanism that ran backwards. This may also be another one here.

Full MATweave Source Code

For the compiled version of the clock example see this PDF.

You can download the source code here.

%{ 
% This opens a block comment for MATLAB and Octave
\documentclass[a4paper]{article}

\usepackage{verbatim}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{url}
\usepackage{amsmath}
\usepackage{times}
\usepackage{moresize}

\newenvironment{matlab}{\comment}{\endcomment}
\newenvironment{octave}{\comment}{\endcomment}
\newenvironment{matlabv}{\verbatim}{\endverbatim}
\newenvironment{octavev}{\verbatim}{\endverbatim}

\begin{matlab}
%}
% Matlab code starts here
% Let's set up the entire document with a known random seed value and
% clear the memory and figures. You could also use this spot to set any 
% global variables you want like font names or font sizes, or add things
% to the path. You might also want to record what version of MATLAB you 
% used here.

% Clear memory and close figures
clear all
close all

% Record version of MATLAB/Octave
a = ver('octave');
if length(a) == 0
  a = ver('matlab');
end
fid = fopen('vers.tex', 'w');
fprintf(fid, [a.Name ' version ' a.Version]);
fclose(fid);

% Record computer architecture.
fid = fopen('computer.tex', 'w');
fprintf(fid, ['\\verb+' computer '+']);
fclose(fid);

% Record date of run.
fid = fopen('date.tex', 'w');
fprintf(fid, datestr(now, 'dd/mm/yyyy'));
fclose(fid);

%{
\end{matlab}


\title{$\tau$ Clock}
\author{Neil D. Lawrence\\\texttt{N.Lawrence@dcs.sheffield.ac.uk}\\Sheffield Institute for Translational Neuroscience\\and Department of Computer Science\\University of Sheffield, U.K.}
\date{\input{date.tex}} % Gives date when code was run.
\begin{document}

\maketitle


\begin{abstract}
  This is a MATweave document that allows you to create a face for a $\tau$ clock. This is a clock that divides a single day (24 hours normally) into $\tau$ radians and has a single hand that  goes around the clock.
\end{abstract}

\section{Introduction}
My $\tau$ clock is based on a clock bought from Seldec Marine \url{http://www.seldecpublishing.co.uk/clocks/}. I bought the white frame one. 

This MATweave document allows you to create a $\tau$ clock face using
MATweave, you can modify the radius to suit your clock or customise as
you please.

For more information on what MATweave is and how to run it see \url{http://staffwww.dcs.sheffield.ac.uk/people/N.Lawrence/matweave.html}.

\begin{matlabv}
%} 
% Octave code starts here
tau = 2*pi;
numberRadius = 80; % In mm, don't measure the diameter!
circleRadius = 100;
partitions = 12;
partitionLabels = {'0', '\\frac{\\tau}{12}', ... 
                   '\\frac{\\tau}{6}', '\\frac{\\tau}{4}', ...
                   '\\frac{\\tau}{3}', '\\frac{5}{12}\\tau', ...
                   '\\frac{\\tau}{2}', '\\frac{7}{12}\\tau', ...
                   '\\frac{2}{3}\\tau', '\\frac{3}{4}\\tau', ...
                   '\\frac{5}{6}\\tau', '\\frac{11}{12}\\tau'};
  
markers = (0:(partitions-1))/partitions + 0.5;

output = ['\\draw [-,ultra thick, blue] (180: ' ...
          num2str(circleRadius*0.65) ... 
          'mm) arc(180:360:' num2str(circleRadius*0.65) 'mm); ' ...
          '\\draw(0,0) circle(' num2str(circleRadius) 'mm); \n' ...
          '\\draw(0,' num2str(circleRadius/2) ...
          'mm) node {\\Large{$\\tau$ clock}};\n'];
i = 0;
for mark = markers
  i = i + 1;
  x = sin(tau*mark)*(numberRadius);
  y = cos(tau*mark)*(numberRadius);
  output = [output '\\draw (' num2str(x, '%2.4f') ...
            'mm, ' num2str(y, '%2.4f') ... 
            'mm) node [anchor=center,rotate=' ...
            num2str((1-mark)*360) ...
            '] {\\fontsize{40}{48}{$\\boldsymbol{' ...
            partitionLabels{i} '}$}};\n'];
end
output = [output '\\draw(0,-' num2str(circleRadius/2) ...
          'mm) node {\\Large{\\url{http://tauday.com}}};\n'];
fid = fopen('pictureDetails.tex', 'w');
fprintf(fid, output);
fclose(fid);
% Octave code ends here
%{ 
\end{matlabv}

\subsection*{Notes}

This document was generated using MATweave. Code was
run using \input{vers.tex} on the architecture
\input{computer.tex}. Experiments were run on \input{date.tex}.


\newpage
\pagestyle{empty}
\setlength{\textwidth}{\paperwidth}
\setlength{\textheight}{\paperheight}
\setlength{\oddsidemargin}{-1.1in}
\setlength{\evensidemargin}{-1in}
\setlength{\topmargin}{-1in}
\setlength{\topsep}{-1in}%
   \setlength{\leftmargin}{-1.7in}%
   \setlength{\rightmargin}{-1.5in}%
   \setlength{\listparindent}{\parindent}%
   \setlength{\itemindent}{\parindent}%
   \setlength{\parsep}{\parskip}%
\begin{tikzpicture}
\draw(0,0) circle(3mm);
\input{pictureDetails}
\end{tikzpicture}
\end{document}
%} 
% Don't forget to end your MATLAB comment at the end of the file!

This document last modified Wed Jul 13 0.708 tau BST 2011.