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

MetaFont: symmetric points result in non-symmetric spline #87

Open
sheaf opened this issue Feb 13, 2022 · 1 comment
Open

MetaFont: symmetric points result in non-symmetric spline #87

sheaf opened this issue Feb 13, 2022 · 1 comment

Comments

@sheaf
Copy link

sheaf commented Feb 13, 2022

Consider the following path:

curve_trail = metafont path
  where
    z5 = p2 ( 10  , -12   )
    z6 = p2 (  7.5,  -7.5 )
    z7 = p2 (  4  ,  -7.5 )
    z8 = p2 (  7.5,  -7.5 )
    z9 = p2 ( 10  ,  -3   )
    path =
       z5 .--.
       z6 .- up -.
       z7 .--.
       z8 .--.
       endpt z9
    up = arriving $ V2 0 (-1)

it is vertically symmetric around z7. The MetaFont executable produces the following output:

MetaFont_beta_test

However, with this library, I get a lopsided result:

MetaFont_beta_test_diagrams

I know this library isn't aiming to replicate the exact MetaFont algorithm (that's of course fine), but I think it's producing an incorrect result here.

@sheaf sheaf changed the title MetaFont: symmetric points results in non-symmetric spline MetaFont: symmetric points result in non-symmetric spline Feb 13, 2022
@byorgey
Copy link
Member

byorgey commented Feb 14, 2022

Thanks for the report! I agree that is a strange result. It has been a very long time since I touched this code but maybe I can take a look. @bergey , are you still around? I'm not assuming you remember anything about this code either, but you're the one who originally wrote it. =)

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

2 participants