**UPDATED WITH 4th APPROXIMATION!**

Last weekend I went hammock camping by towing all my gear behind my bike. I loved it and now I’m interested in finding other adventures that won’t tax me too much. I really think that, for now, 30 miles in one day towing the trailer is a good limit for me. It leaves me enough energy to make camp and I’m able to relax and enjoy myself.

## 1st approximation

My first thought was to just look at a map with a 30-mile radius circle centered on my house. I figured if I could find any campgrounds in that circle I’d be good to go.

The problem with this approach is that there aren’t any roads or paths that go straight from my house to the edge of this circle. Any way I’d ride out to that edge would be more than 30 miles of riding.

## 2nd approximation

I’ve noticed that I spend most of my time riding in the Cardinal directions (North, South, East, and West). What If I could figure out how far I could ride only going in those directions?

I realized that I could do a polar plot around my house if I could find a relationship between r (the radius) and theta (the angle with respect to East). It took a little head scratching, but here’s what I came up with:

or

Actually that only works in the first quadrant. For all the quadrants you want the absolute value of both the cosine and sine term:

Weird and surprising, right? I hope it was for at least a few of you. It surprised me! But of course, after some thought it makes some sense. As you give up height you get exactly that much more width. So a straight line with a slope of 45 degrees it is!

So why doesn’t the blue square touch the red circle, you might be asking? Well, I’m not really sure. I got the locations of those 4 corners from Google Maps using the “Measure Distance” feature, whereas the red circle comes from the Circle command in python’s folium library. It’s weird that they’re so far off from each other, isn’t it?

The obvious problem with this solution is that not all roads/paths run along the Cardinal directions. I think that’s likely even more true for bike paths.

## 3rd approximation

I realized that Mathematica has the command TravelDirections that lets you put in two locations and a TravelMethod to get decent directions. I used “Biking” for the TravelMethod for all of this work.

I had Mathematica get directions for 36 evenly spaced locations on that red circle above. Then I took a look at the actual travel distance and they were all well over 30 miles. So then, for all 36 of those, I crept in towards my house by 1 kilometer until I got a path that was miles away. Then I just plotted them all to get a decent sense of my options:

So I think this is my best approximation yet. It gives me a real good sense of how far I can get comfortably in one day. I haven’t really investigated the directions, but certainly I can see the exact path I took this past weekend in there (it’s the one that heads just a little west of south)

**UPDATED:** 4th approximation

Ok my mind was just blown with something called isochrones in the OpenRouteService available to python. Here’s my colab. And here’s the amazing result:

## Your thoughts

So what do you think? Here are some starters for you:

- This is cool! Have you thought of doing this . . .?
- This is dumb. Taxi drivers figured this out years ago
- Why do you only sometimes capitalize the carDinAl directions?
- Could you please share the colab doc you used for the folium maps?
- Could you please share your Mathematica code (saved at work and I’m typing this at home for the moment)?
- I live ____ and can ride ___ miles in a day. Could you do this for me?
- I know why the blue and red don’t touch, it’s because . . .
- That blue square didn’t surprise me at all. You’re dumb.
- That blue square totally surprised me! I learned something today!
- You’re going to tease us about your bike and not bother showing a pic?

Each approximation got quite a bit better! That is cool!

I am going to teach taxicab geometry next semester! I love it!

https://en.wikipedia.org/wiki/Taxicab_geometry

I knew there was a connection to NY but I couldn’t quite remember what it was. What sorts of things do you do beyond exploring the different distance function?

The metric is the main reason. However, this allows us to really focus on the definition of circle and reflections/translations/rotations really mean—the taxicab context is similar to Euclidean but different enough where they can’t just think a circle is “that round thing.”

Hey! I thought this tool may be interesting to you: https://app.traveltime.com/

It shows where’s reachable ‘within X minutes’ by bike (as well as other modes). The cycling speed on any particular route is determined by the associated change in elevation, ranging from 5 km/h on a steep incline to 60 km/h on a steep decline.

thanks! It’s interesting that I get a very similar shape from that app as my 4th approximation. I wonder if they’re using the same underlying algorithm

Pingback: Creating bike routes with python | SuperFly Physics