I’ve been meaning to modify some code given in the the Region Disjoint documentation for the Buffon’s Needle problem to instead model *Buffon’s Noodle Problem*.

In Buffon’s *Needle* problem you randomly toss $n$ straight lines (i.e. needles) of length $l$ in between parallel lines of width $t$. The probability that the needle lies across a line is given by,

$${displaystyle p={frac {2}{pi }}{frac {l}{t}}.}$$

In Buffon’s *Noodle* problem you instead randomly toss $n$ rigid plane curves (i.e. noodles) of length $l$ in between parallel lines of width $t$ and the probability is the same.

My question is, **how can I modify the code shown below to throw $n$ noodles instead of needles?**

**Input:**

```
d = 0.2; n = 1000;
lines = MeshRegion(
Join @@ Table({{-1 - d, y}, {1 + d, y}}, {y, -1 - d, 1 + d, d}),
Line(Partition(Range(2 Floor(2/d + 3)), 2)));
needles = Table(Line({pt, RandomPoint(Circle(pt, d))}), {pt, RandomReal({-1, 1}, {n,2})});
overlap = Select(needles, ! RegionDisjoint(lines, #) &);
Show(lines, Graphics({Red, overlap, Black, Complement(needles, overlap)}))
N((2 n)/Length(overlap))
```

**Output:**

EDIT: A side question, how exactly can you adjust the line width $t$ in the above code? I don’t seem able to figure it out.