14 std::size_t numPoints(100);
15 double stepSize{rtRelation->radius(rtRelation->tUpper()) / (numPoints - 1)};
16 m_times = std::vector<double>(numPoints);
17 m_radii = std::vector<double>(numPoints);
19 for(std::size_t
i = 0;
i < numPoints; ++
i){
20 m_radii[
i] =
i * stepSize;
21 m_times[
i] = getTFromR(m_radii[
i], rtRelation);
23 m_minRadius = m_radii.front();
24 m_maxRadius = m_radii.back();
41 return time1 + (time2 - time1) * (
r - radius1) / (radius2 - radius1);
51 if (radius1 == radius2)
return std::nullopt;
54 return (time2 - time1) / (radius2 - radius1);
66 double precision{0.001};
67 double tMax{rtRelation->tUpper()};
68 double tMin{rtRelation->tLower()};
71 while (tMax - tMin > 0.1 and std::abs(rtRelation->radius(0.5 * (tMin + tMax)) -
radius) > precision) {
72 double midPoint = 0.5 * (tMin + tMax);
73 if (rtRelation->radius(midPoint) >
radius) {
79 return 0.5 * (tMin + tMax);