#!/bin/sh
from math import *

def spokeLength(hr, rr, ho, nc):
	return sqrt(rr * rr + hr * hr + ho * ho - (2 * rr * hr * cos(radians(720 * nc / 36)))) - 1;

def spokeAngle(hr, rr, sl):
	return degrees(acos((sl * sl + rr * rr - hr * hr) / (2 * sl * rr)));


rr = 335.0 / 2.0;
hr = 56.0 / 2.0;
ho = 20
nc = 2

sl = spokeLength(hr, rr, ho, nc);
print "InnerDisk: 349 x 2: SpokeLen:", sl;

sa = spokeAngle(hr, rr, sl);
print "InnerDisk: 349 x 2: SpokeAngle:", sa;

rr = 335.0 / 2.0;
hr = 54.0 / 2.0;
ho = 33
nc = 2

sl = spokeLength(hr, rr, ho, nc);
print "Outer: 349 x 2: SpokeLen:", sl;

sa = spokeAngle(hr, rr, sl);
print "Outer: 349 x 2: SpokeAngle:", sa;

print

rr = 335.0 / 2.0;
hr = 56.0 / 2.0;
ho = 26.5
nc = 2

sl = spokeLength(hr, rr, ho, nc);
print "InnerDiskSym: 349 x 2: SpokeLen:", sl;

sa = spokeAngle(hr, rr, sl);
print "InnerDiskSym: 349 x 2: SpokeAngle:", sa;

rr = 335.0 / 2.0;
hr = 54.0 / 2.0;
ho = 26.5
nc = 2

sl = spokeLength(hr, rr, ho, nc);
print "OuterSym: 349 x 2: SpokeLen:", sl;

sa = spokeAngle(hr, rr, sl);
print "OuterSym 349 x 2: SpokeAngle:", sa;

