Farthest Point Sampling builds a subset one point at a time. For each candidate, it finds the distance to the nearest point already selected. It then chooses the candidate whose nearest selected point is farthest away. The rule favors a location that is still poorly covered by the growing subset. The word nearest inside that rule is essential.
The PointNet++ authors' sample_and_group implementation uses farthest point sampling to choose indices and gathers their original coordinates as region centers. Each center is chosen from the input point set. Once more than one point has been selected, the candidate's distance is its smallest distance to any member of that selected set.
For a constructed mathematical example, consider five points on a line at coordinates zero, two, four, seven and twelve. Start by selecting zero. The remaining distances to the selected set are two, four, seven and twelve, so twelve is selected next. At that stage there are two selected points, and each candidate can be close to either of them.
With zero and twelve selected, point two is two units from its nearest selected point. Point four is four units from its nearest selected point. Point seven is five units from twelve and seven units from zero, so its nearest-selected distance is five. Seven wins the next choice because five is larger than four and two.
Figure one gives both individual distances and the minimum for all three candidates. Looking only at distance from the most recently selected point, twelve, would instead favor point two. That would ignore that zero already covers it closely. The set-based distance carries information about every preceding selection.

After seven has been added, point four is three units from seven and point two remains two units from zero. Four is then selected next if a fourth sample is needed. The selected order in this example is therefore zero, twelve, seven and four. The input order, starting choice and tie handling matter when several candidates have equal scores.
PyTorch3D's reference implementation maintains a closest-distance array. At each round it computes distances from the latest selected point and takes an elementwise minimum with the saved array. The saved value for a candidate therefore retains its nearest distance over the selected set so far. Adding a new selected point can reduce that value or leave it unchanged.
The inspected reference loop also makes an already selected index unavailable by storing a negative marker. That marker is not a negative geometric distance. The illustrations keep the geometric distance zero at selected coordinates; the choice of the next sample considers the remaining candidates. A debugger view of the internal array therefore needs to distinguish the exclusion marker from the nonnegative distances used to compare candidates.
The implementation calculates squared Euclidean distances. For nonnegative distances, squaring preserves their ordering, so selecting the largest squared nearest distance gives the same next point in this example. For remaining candidates, the geometric nearest distances follow the lower envelope of distances to the sampled points. Figure two shows how that envelope changes on the one-dimensional line.

The authors' sample_and_group function separates choosing sample centers from gathering local neighbors. Sampling chooses the locations that serve as region centers. Grouping finds neighboring input points around those locations. A network layer then extracts a feature from each local group. These stages use the same geometry for different purposes.
A selected center in this sampling step is an existing input point. It is not an arithmetic average of its neighbors. The point can carry the corresponding input features through its selected index, while the later group feature can combine information from many points. The distinction helps when a diagram labels both a center coordinate and a feature representing the region.
The distance uses the coordinate dimensions supplied to the sampler. For a robot scan in physical units, a uniform change of all coordinate units multiplies all Euclidean distances by the same positive factor. It preserves the ordering in the ideal arithmetic. Rescaling only one coordinate dimension changes relative distances and can change which point is selected.
For example, multiplying vertical coordinates by a much larger factor makes vertical separation more influential in a three-dimensional point set. The resulting subset then covers that transformed space. A learning record can preserve the coordinate normalization along with the sample count and initial-point rule so the chosen subset remains interpretable.
In PyTorch3D's inspected implementation, a non-random start chooses the first input index. Reordering an otherwise identical point list can therefore change the initial point and subsequent choices. A fixed count describes the size of the requested subset, while the sampling sequence explains its spatial distribution.
Read the PyTorch3D sampling implementation and reference loop and the PointNet++ authors' sampling, grouping and set-abstraction implementation. Related reading appears in robot point-cloud learning topics and the technical article library.