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

suggested improvement to dual: option to graph() function #141

Open
skydog23 opened this issue Mar 21, 2022 · 2 comments
Open

suggested improvement to dual: option to graph() function #141

skydog23 opened this issue Mar 21, 2022 · 2 comments

Comments

@skydog23
Copy link

skydog23 commented Mar 21, 2022

When dual:true is passed as option to the graph() function, then the geometry is dualized before rendering.
This works for points and lines: they are rendered as their Hodge duals, that is, as lines, resp., points.
However line segments and polygons are currently not dualized.

See https://enki.ws/ganja.js/examples/coffeeshop.html#v_k4dXh7a for an ganja demo demonstrating the problem.

I think the problem might be solved in ganja.js at line 809 by dualizing instances of Arrays, too, before rendering, following the example of the above ganja demo and flattening them at the same time.

It's not a high priority issue. If I were more adept at javascript and git I would attempt the solution myself, and I will aim to do that in the next weeks.

@kungfooman
Copy link
Contributor

Just mentioning that the demo link doesn't work: https://enki.ws/ganja.js/examples/coffeeshop.html#v_k4dXh7a

@skydog23
Copy link
Author

skydog23 commented Nov 1, 2022

Hmm... I just noticed the comment from kungfooman. The link as given works for me:
https://enki.ws/ganja.js/examples/coffeeshop.html#v_k4dXh7a

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