Skip to content

paper1: Fix erroneous arm length formula#4

Open
chordowl wants to merge 1 commit intoraphlinus:masterfrom
chordowl:patch-1
Open

paper1: Fix erroneous arm length formula#4
chordowl wants to merge 1 commit intoraphlinus:masterfrom
chordowl:patch-1

Conversation

@chordowl
Copy link
Copy Markdown

This pull request replaces the two instances of sin in the formula for the arm length with cos.

There must've been a mix-up while this was written up, as the code uses cos:

let len = scale * (Math.cos(th0 - offset) - 0.2 * Math.cos((3 * (th0 - offset))));

Now, paper and code match.

(If one were to use sin as originally written, the arm length has the wrong sign most (if not all) the time. Even if one fixes that, the resulting curve behaves rather weirdly; I noticed this while trying to implement this curve for use with my pen plotter.)

Best, and thanks for the write-up,
Lukas

Replaces instances of `sin` in the formula for the arm length with `cos`.

This must've been a mix-up while this was written up, as the code (<https://github.com/raphlinus/spline-research/blob/master/curves.js#L219>) uses `cos`.
Now, paper and code match.
(If one uses `sin`, the arm length seems to have the wrong sign, and even if one fixes that, the resulting curve behaves rather weirdly).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant