We want to find the distance to space as a function of theta from zenith to 90 degrees at the horizon. I assumed space began at about 100km. For zenith, it's really easy, since the distance to space is just 100km. We know the distance to space based off of geometry for looking horizontally, too. However, I'm stuck on trying to determine the distance to space as a function of angle, where 0 degrees is straight up and 90 at the horizon. We've tried law of cosines to no avail and want to be done with this final question. Our attempts have been seemingly too complex for what I think is a simple solution. Any ideas on where to go?