Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extrudeEnvelope gives incorrect results #316

Closed
byorgey opened this issue Jun 11, 2018 · 1 comment
Closed

extrudeEnvelope gives incorrect results #316

byorgey opened this issue Jun 11, 2018 · 1 comment
Assignees

Comments

@byorgey
Copy link
Member

byorgey commented Jun 11, 2018

From benzrf in IRC: .

Or consider

dia :: Diagram B
dia = square 1 === (square 1 # extrudeTop 1)

main = defaultMain (dia # frame 1)

which produces
extrudetest
You can see that the squares are clearly at distance 1/2 from each other, but should be 1.

@byorgey byorgey self-assigned this Jun 11, 2018
@byorgey
Copy link
Member Author

byorgey commented Jun 11, 2018

Apparently deformEnvelope has been buggy this whole time, but the bug was exactly canceled out by the particular way it was used in the examples in the user manual. In particular, the envelope that resulted from calling deformEnvelope gave inconsistent results depending on the length of the input vector. In particular it only worked correctly if given a vector of length exactly 2. There were strange values of 0.5 in the code which really should be 1, and another value was being divided by only the norm of the input vector where it should have been the squared norm.

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

No branches or pull requests

1 participant