%% Bicycles, The Earth & Angle Measure

%% The first bikes and the fixie folks
% The first bikes had no "drive-chain". (The first production of
% automobiles was by Karl Benz in 1888 in Germany, and it was 1896 that
% Henry Ford built his first automobile in Detroit. [wikipedia])


%%
% <html>
% <a href="http://www.en.wikipedia.org/wiki/Penny-farthing">Penny Farthers</a>
% </html>


% The first "bicycles" were fixed gear bikes.  Nowadays, hipsters geed out
% over these retro bikes in huge ways.

%%
% <html>
% <a href="http://www.surplace.fr/ffgc/">Surplace</a>
% </html>

%%
% <html>
% <a href="http://www.bikecalc.com/">Bike Calc</a>
% </html>
% 


%%  How fast can my bike go?
% In the first bikes, speed depended only on wheel size.
% The largest practical Penny Farther had a 60 inch wheel.
% Today, a 60 inch gear is average.
%  What is a 26 inch Mountain Bike Wheel?
%  First, let's just think about the rim.
%	26 inches in diameter,
	diameter26 = 26;
	circumference26 = pi*26

%  Road bikes & 29er's 
	diameter29 = 29;
	diameter700c = 27;
	circumference29 = pi*29
	circumference700c = pi*27
    
%% Vertical speed = radius x angular speed (rpm)
% For a fixed speed, which wheel is rotating faster?

%% Gear Inches
% Today, geared bikes are sometimes measured in gear inches

% Number of teeth in front: 42
num_front_teeth = 42;
% Number of teeth in rear: 20
num_rear_teeth = 20;

gear_inches26 = diameter26 * num_front_teeth / num_rear_teeth
gear_inches700c = diameter700c * num_front_teeth / num_rear_teeth
gear_inches29 = diameter29 * num_front_teeth / num_rear_teeth

%% Development: How far you go with one rotation
devs26 = pi*diameter26 * num_front_teeth / num_rear_teeth
dev700c = pi*diameter700c * num_front_teeth / num_rear_teeth
dev29 = pi*diameter29 * num_front_teeth / num_rear_teeth

%% Climbing & Passing Gears

% road
num_front_teeth = 52;
num_rear_teeth = 11;

% mtn
num_front_teeth = 22;
num_rear_teeth = 34;

%% How many revolutions do you make on your ride home?

%% How fast are you going with a fixed cadence?



%% Why does it feel like the passing gear is taller?


%% How big is the equator? (in miles)

%% What angle does the US subtend?

earths_diameter_eq = 7926;
earths_diameter_eq_plusonefoot = 7926 + 1/5280;
avg_dist_earth_moon = 238857;
avg_dist_earth_sun = 93020000;
dist_newyork_los_angeles = 2462;



