clientIO / clientIO/joint

Add orientation() method for curves and segments

Open
#1,019 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.