Add orientation() method for curves and segments
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.4k
- Forks
- 893
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 26
Description
Sometimes, it is useful to know whether a curve is oriented clockwise or counterclockwise. This method would look at the start point, end point, and control points of the curve, and return +1 if it is clockwise, -1 if it is anticlockwise, and 0 if it is neither (it is a straight line or a wavy curve). (The signs match a convention established by the Point.cross function.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the curve and segment geometry implementations and the Point.cross function referenced in the issue. Add orientation() with the stated clockwise, anticlockwise, and zero results, then verify it across curved, straight, and wavy cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100