#ThisWeeksFiddler, 20260821

This week the #puzzle is: How Far Can You Roll? #arclength #estimate #coding #montecarlo #average

For her photography show, Frederica Fiddleria attaches a light to a point on the circumference of a circular wheel with a radius of 1 meter. She points a camera at the wheel and, during a single long exposure, rolls the wheel for one revolution along the ground.
When she develops the film, she is curious about the path the light took as the wheel rolled. What is the length of this path?

And for extra credit:

For her next show, Frederica wants to mix things up. Instead of placing the light on the circumference of the wheel, she will pick a random point inside the circle. (Before you ask, let me clarify what “random” means here: Any two regions with the same area are equally likely to contain the point.)
As before, she will roll the wheel for one revolution along the ground and capture the motion with a single long exposure on her camera. On average, what can she expect the length of the path to be?

How Far Can You Roll?

Intermission

Last week I didn’t really try to solve the fiddler. It involved learning rules to games, solving a chess puzzle, and picking up on subtle verbal cues. None of them are my strong suits.

Solution, possibly incorrect:

Cycloid

Okay, so this will be a little stream of consciousnessy. Apparently the curve, we’re looking for is a cycloid. And the length of the curve is an arc length. For a cycloid, the arc length is 8r8r (see source above). With r=1r=1, the arc length will be 81=88\cdot1=8.

Result: 8 meters. (Method 1.)

Oh. And I assume the distance between camera and light is large enough, that I don’t have to account for whatever it’s called, when the motive is distorted. Perspective? Parallax?


In general the length of a path (the arc length) is:

L=abx(t)2+y(t)2dtL=\int_a^b \sqrt{x'(t)^2+y'(t)²}dt

Just to test how this works, let’s look at a circle.

x(t)=rcos(t),x(t)=rsin(t)x(t)=r\cdot \cos(t), x'(t)=-r\cdot\sin(t)

y(t)=rsin(t),y(t)=rcos(t)y(t)=r\cdot \sin(t), y'(t)=r\cdot\cos(t)

a=0,b=2πa=0, b=2\pi

And combining all this:

L=abx(t)2+y(t)2dtL=\int_a^b \sqrt{x'(t)^2+y'(t)²}dt

L=02π(rsin(t))2+(rcos(t))2dtL=\int_0^{2\pi} \sqrt{(-r\cdot\sin(t))^2+(r\cdot\cos(t))²}dt

L=02πr2(sin(t))2+r2(cos(t))2dtL=\int_0^{2\pi} \sqrt{r^2(\sin(t))^2+r²(\cos(t))²}dt

L=02πr2((sin(t))2+(cos(t))2)dtL=\int_0^{2\pi} \sqrt{r^2((\sin(t))^2+(\cos(t))²)}dt

L=02πr(sin(t))2+(cos(t))2dtL=\int_0^{2\pi} r\sqrt{(\sin(t))^2+(\cos(t))²}dt

L=r02π1dtL=r\int_0^{2\pi} \sqrt{1}dt

L=r02π1dtL=r\int_0^{2\pi} 1dt

L=r(t|02π)L=r(t\big|_0^{2\pi})

L=r(2π0)=r2πL=r(2\pi – 0)=r2\pi

This fits what we expect. So I guess I know how to use this formula.

For the cycloid, the formulas are:

x(t)=r(tsin(t)),x(t)=r(1cos(t))x(t)=r(t-\sin(t)),x'(t)=r(1-\cos(t))

y(t)=r(1cos(t)),y(t)=r(sin(t))y(t)=r(1-\cos(t)), y'(t)=r(\sin(t))

a=0,b=2π,r=1a=0, b=2\pi,r=1

L=abx(t)2+y(t)2dtL=\int_a^b \sqrt{x'(t)^2+y'(t)²}dt

L=02π(1cos(t))2+(sin(t))2dtL=\int_0^{2\pi} \sqrt{(1-\cos(t))^2+(\sin(t))²}dt

Or how WolframAlpha would put it:

integral square root((1-cos(t))^2+sin(t)^2) from 0 to 2pi

Everything seems to work okay. I guess that was method 2. Moving on.


And for extra credit:

Trochoid Arc length of a trochoid Program

This time the curve is a trochoid. A cycloid as a special case of that. And it’s my lucky day! The arc length of that one is already calculated Out There. A new parameter is b (again), the distance between the point on the circle and the center of the circle.

0t2π0\le t\le 2\pi

L=2|rb|E(t2|02π4rb(rb)2)L=2\cdot|r-b|\cdot E\left(\frac{t}{2}\big|_0^{2\pi}-\frac{4rb}{(r-b)²}\right)

L=2|rb|E((2π20)4rb(rb)2)L=2\cdot|r-b|\cdot E\left((\frac{2\pi}{2}-0)-\frac{4rb}{(r-b)²}\right)

L=2|rb|E(π4rb(rb)2)L=2\cdot|r-b|\cdot E\left(\pi-\frac{4rb}{(r-b)²}\right)

Where E is an elliptical integral. Let me see… Ah yes.

E(t,k)=0t1k2sin(t)2dtE(t,k)=\int_0^t\sqrt{1-k²\sin(t)^2}dt

Hm. There’s something wrong. E can’t have both 1 and 2 parameters.

There’s another definition of L:

L=2|rb|E(t2,2irb|rb|)L=2\cdot |r-b| \cdot E \left( \frac{t}{2},\frac{2i \sqrt{rb}}{|r-b|} \right)

I think I’m supposed to read it like this actually:

L=2|rb|E(t2|02pi,2irb|rb|)L=2\cdot |r-b| \cdot E \left( \frac{t}{2}\big|_0^{2pi},\frac{2i \sqrt{rb}}{|r-b|} \right)

L=2|rb|E(π,2irb|rb|)L=2\cdot |r-b| \cdot E \left( \pi ,\frac{2i \sqrt{rb}}{|r-b|} \right)

And then combining:

E(t,k)=0π1(2irb|rb|)2sin(t)2dtE(t,k)=\int_0^{\pi}\sqrt{1-(\frac{2i \sqrt{rb}}{|r-b|})²\sin(t)^2}dt

No. Scratch method 1. Let me go back to the definitions for the point.

x=rtbsin(t)x=r\cdot t-b\sin(t)

y=rbcos(t)y=r-b\cos(t)

0t2π0\le t\le 2\pi

Then I code a monte carlo approach, where the arc length is estimated by assuming I can just look at some points along the curve and calculate at all the little straight distances between these. Just to make sure my approach works, I also code the fiddler and sort of get the same result. Then I run the program a few times.

Result 2: 7.109200
Result 2: 7.112045
Result 2: 7.111690
Result 2: 7.111431

I am confident I can say the rounded answer is 7.11. Method 2 worked out. And I guess also gave a method 3 for the fiddler.

2 thoughts on “#ThisWeeksFiddler, 20260821

Skriv en kommentar