Skip to content

Add knot to Ugly Tie shape #24

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

Merged
merged 2 commits into from
Jul 13, 2018
Merged

Conversation

TheAtomicOption
Copy link
Contributor

Added geometry to the Ugly Tie polygon to look like a knot.

It remains a single polygon so color will affect both visible parts.

At large zooms/resolutions a connection between the right side of the knot and the main tie is visible because the points on right side of the knot are not perfectly in-line with the upper right corner of the tie where the two larger parts of the shape are visible. If this becomes an issue, doing some math to find evenly dividing, aligned points near the current values would make the connecting section of the polygon zero width.

Added geometry to the Ugly Tie polygon to look like a knot. 

It remains a single polygon so color will affect both visible parts. 

At large zooms/resolutions a connection between the right side of the knot and the main tie is visible because the points on right side of the knot are not perfectly in-line with the upper right corner of the tie where the two larger parts of the shape are visible. If this becomes an issue, doing some math to find evenly dividing, aligned points near the current values would make the connecting section of the polygon zero width.
@WeatherGod
Copy link
Member

you can repeat the first point in the 5th position, then add np.nan to "jump" to the next coordinate. That'll get rid of the "seam" and also makes sure the polygons are closed.

repeated first point in 5th position to close knot shape. Added `np.nan` non-rending connection point.
@TheAtomicOption
Copy link
Contributor Author

Just made the suggested change and tested it. Worked great!

@WeatherGod WeatherGod merged commit 6f0be51 into matplotlib:master Jul 13, 2018
@WeatherGod
Copy link
Member

awesome! Thanks!

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.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy