How to compute a surface point half way of two others in Geometry Central?

Open
#151 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp

Research direction

Start with the SurfacePoint API, especially SurfacePoint::interpolate(geometry.vertexPositions) and the SurfacePoint(faceId, faceCoords) constructor. Determine whether the API already exposes a supported conversion or interpolation path for points on one face, then document the method and a midpoint example so the result can be initialized unambiguously.

Written by the indexing model from the issue text.

Description

Say I have SurfacePoint p1 and p2 defined in two edges of the same triangular face. How can I compute a SurfacePoint p that lies in the face and it is half-way between p1 and p2?
I can use SurfacePoint::interpolate(geometry.vertexPositions) to compute the 3D coordinate vector, but how can I translate the mid point back to the face's barycentric coordinates so that I can initialize SurfacePoint p(faceId, faceCoords);?

Dominant language
C++
Stars
1.3k
Forks
183
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nmwsharp/geometry-central

All issues in nmwsharp/geometry-central

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.