1
$\begingroup$

I'm writing a code that constructs a road network a sphere. Building the network is done by:

  1. Roads are added using spherical coordinates. A straight road is defined by start and end coordinates, and a up direction vector ((0, 0, 1) in spherical coordinates).
  2. To allow the road network to be converted to 3D cartesian coordinates, all roads are segmented into sections with a length much shorter than the radius of the sphere. By segmenting a road, I mean replacing it with multiple shorter road pieces.
  3. All coordinates and normals are then converted into 3D cartesian coordinates.

This works well for straight roads. However, I'm struggling with adding road bends. A bend would have an additional angle associated with it. A 90 degree bend would be a quarter circle, and a 180 degree bend a half circle etc. I can't figure out how to segment a road bend on a spherical surface.

Concretely, given two points on the surface of a sphere specified in spherical coordinates, and an angle a, how do I generate a set of points that if projected onto a map would trace the path of a road bend with angle a.

$\endgroup$
  • $\begingroup$ Don't you also need the radius of the bend as well? $\endgroup$ – Q the Platypus Aug 15 '19 at 1:52
  • $\begingroup$ @prinsen You did not respond in a while. I gave the differential equation of small circles above. They are not helices. Appreciate if you can please share how it helped in your civil construction work. $\endgroup$ – Narasimham Nov 18 '19 at 15:48
1
$\begingroup$

EDIT1:

The following differential relation that describes

*Small circles with bend radius $R_g $ on sphere radius R *

should be useful.

where $R_g$ is radius of bend, and $(R,\phi,\theta)$ are in spherical coordinates. $\psi $ is variable reference angle your path makes to sphere meridian.

$$ \sin \psi\cdot \big(\sin \phi +\frac {d\psi}{d\theta}\big)= \frac{R \cos \phi}{R_g} $$

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.