ω1 = 1;
ω2 = E;

ContinuedFraction[ω2/ω1,5]
Convergents[ω2/ω1,5]

ϵ = 0.0001;

square = 
Graphics[
{Blue,
Line[{{0,0},{0,1},{1,1},{1,0},{0,0}}]
}
];


trajectory = 
ParametricPlot[
{FractionalPart[ω1*t],FractionalPart[ω2*t]},
{t,0,7-ϵ},
PlotStyle->Red
];

Show[square,trajectory]