#include 
#include 
#include 

int main()
{
int N=32;
float Wb=8;
float Rw=5;
float theta0;
float phi0;
float D0;
float theta1;
float phi1;
float D1;
float pi=3.14159265359;
float L0;
float R0;
float L1;
float R1;
float x0;
float y0;
float x1;
float y1;
float xn;
float yn;

//cout<<"Wheel Radius=";
//cin>>Rw;
//cout<<"Wheel Base=";
//cin>>Wb;
//cout<<"Number of Pulses per Revolution=";
//cin>>N;
cout<<"L=";
cin>>L0;
cout<<"R=";
cin>>R0;

if (L0==R0)
	{
	theta0=0;
	phi0=pi/2;
	D0=R0*(2*pi*Rw)/N;
	}
else
	{
	theta0=2*pi*Rw*(R0-L0)/(N*Wb);
	phi0=pi/2+theta0/2;
	D0=(Wb*(L0+R0)/(R0-L0))*sin(theta0/2);
	}

x0=D0*cos(phi0);
y0=D0*sin(phi0);

cout<<"X="<
1
Hosted by www.Geocities.ws