liveBook · Manning

Arc-and-segment piece

As explained in Geometry for Programmers

An arc-and-segment piece is a geometric curve segment composed of a circular arc joined smoothly to a straight line segment.

An arc-and-segment piece joins a circular arc smoothly to a straight line segment, giving curve construction both curving and straight portions in one building block. section 5.3.2

The construction is useful, but its tangent orientations matter:

  • Use the implementation-ready formulas rather than treating symbolic output as the only usable result. section 5.3.2
  • Handle codirected-ish and counter-oriented tangents with complementary building blocks instead of forcing one piece through every case. section 5.3.2

Solving the join

Represent the arc center as (ax1, ay1), the line point as (x2 + dx2*t2, y2 + dy2*t2), and impose perpendicularity at their intersection. Solving produces formulas for the center, parameter, and joining point.

How Geometry for Programmers covers it

How deep it goes
Derives a symbolic system for the arc center, line parameter, and intersection, then notes orientation limits.
Examples
Uses a smoothly joined arc and line segment, contrasting codirected-ish and counter-oriented tangents.
What you can do after
Build it from scratch by solving the equations and selecting complementary building blocks for tangent orientations.
How it connects
Connects circular arcs, line segments, tangent vectors, symbolic algebra, and biarcs.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Geometry for Programmers. The section links point to the parts of the book it draws on.