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

Expand of an expand #160

Closed
cdupont opened this issue Feb 14, 2014 · 4 comments
Closed

Expand of an expand #160

cdupont opened this issue Feb 14, 2014 · 4 comments

Comments

@cdupont
Copy link

cdupont commented Feb 14, 2014

Hi,
some artefacts appears when you try to expand an expand.
Try:

myExpand n p = expandTrail' (def & expandJoin .~ LineJoinRound & expandCap .~ LineCapRound) n p

c = arc (0 @@ turn) (0.75 @@ turn)
c2 = c # myExpand 0.2
c3 = (head $ pathTrails c2) # myExpand 0.05

main = mainWith ( (c # stroke # lc green) <> (c2 # stroke # lc red) <> (c3 # stroke # lc blue) # lw 0.01 :: Diagram B R2)

Various artefacts appears if you change the c (with a circle for example) or the parameters for the expand.
circle

@byorgey
Copy link
Member

byorgey commented Feb 14, 2014

@fryguybob, is this the same as #155? (Edited: whoops, I guess not, I hadn't seen the mailing list message yet: https://groups.google.com/d/msg/diagrams-discuss/64W6FXu_ES0/AATHauYESe8J .)

@fryguybob
Copy link
Member

I think this has to do with some nearly zero length segments being generated to join the cubic segments that make up the arc. We should be able to be smarter and avoid generating those small segments, but we do have to be careful that we don't accumulate some error throwing off the end point.

@cdupont
Copy link
Author

cdupont commented Feb 14, 2014

Hi Brent,
it's not the same: I used the HEAD where #155 is integrated (and the
corresponding bug on a circle disappears).
Cheers,
C

On Fri, Feb 14, 2014 at 6:16 PM, Brent Yorgey notifications@github.comwrote:

@fryguybob https://github.com/fryguybob, is this the same as #155#155
?

Reply to this email directly or view it on GitHubhttps://github.com//issues/160#issuecomment-35104045
.

@byorgey
Copy link
Member

byorgey commented Feb 14, 2014

Yep, sorry, I replied too soon!

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

3 participants