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
Add graph domain and graph layout to Penrose #332
Conversation
… dagre-laid-out test graph in Style
…z program for the paper figure
…ize and scaling to canvas dims
…B-segment intersection); scale graphs by constant scale factor instead
Hey @wodeni as requested, I added code in the last commit for calculating intersection between a segment and an axis-aligned bounding box, and drawing a segment between the bboxes. It works, as you can see in the screenshots above. However, it doesn't yet account for the arrowhead size and how that scales. Since you're the arrowhead czar, can you add that to the code? |
actually @wodeni: if you haven't started the arrowhead stuff, I'll write a quick heuristic to deal with it now, so I can tie up loose ends in this PR |
The solution will be very similar to the one noted here. The scaling issue is generally unsolved in SVG markers, so the best you can do is some manual offsets like I did with |
…ying nodes and ops more clearly; match paper
… is already hard to visualize; need to fiddle with graph layout scale/vertical space constants
db12a26
to
cd29ee4
Compare
Closing this PR due to inactivity (also this PR is on the Haskell version). |
Not ready for review; this PR description will track progress
For the figures in the paper, the original graphviz code and graphviz output can be found here
Programs for this PR can be found here
Other goal diagrams can be found here: #319
Graph layout using a plugin
The plugin is Dagre.
Substance programs
one-node.sub
two-nodes.sub
three-nodes.sub
optimization-graph.sub
Command:
runpenrose comp-graph-domain/optimization-graph.sub comp-graph-domain/comp-graph-plugin.sty comp-graph-domain/comp-graph.dsl
computation-graph.sub
Command:
runpenrose comp-graph-domain/computation-graph.sub comp-graph-domain/comp-graph-plugin.sty comp-graph-domain/comp-graph.dsl
dagre-example-graph.sub
Known issues
findIntersections
code, which doesn't seem to work (maybe it's messing up the label code that calls it?)Pure Penrose graph layout
(does not use plugin)
Command:
runpenrose comp-graph-domain/paper-example-graph.sub comp-graph-domain/comp-graph.sty comp-graph-domain/comp-graph.dsl
(Note: this is NOT
graph-theory-domain
, which is tracking something else that I don't remember)Currently goes offscreen
Description
Related issues: #319
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Implementation strategy and design decisions
Include a high-level summary of the implementation strategy and list important design decisions made, if any.
Examples with steps to reproduce them
Checklist
stack test
Open questions
Questions that require more discussion or to be addressed in future development: