Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4943

Other programming languages • Re: JavaScript graph library, for embedding and drawing planar graphs in 2D and/or sphere surface

$
0
0
More progress, I work on planar_graph_playground repo since 2.5 years now.
Originally in Python, later in C++ and JavaScript/NodeJS as well.
Undirected graph has very similar looking implementations in all three languages.

Only yesterday I had the idea, why not run complete repo code "inside" JSCAD?
I did that, details on the steps needed (running C preprocessor to get basis, ...) here:
https://github.com/Hermann-SW/planar_gr ... side-jscad
Try it out, especially the animation sliders:
https://jscad.app/#https://raw.githubus ... wing.jscad

Then I modified the edges slightly to make for a better 3Dprint (left), details here:
https://github.com/Hermann-SW/planar_gr ... scad-model
convex_face_straight_line_drawing.JSCAD.3Dprint.photo_10pc.png
Finally I found a nice way to demonstrate that even local changes to a graph (here C20 -> C30 -> C40) result in coordinate changes for all vertices besides the fixated vertices on outer face for a Tutte convex face straight line drawing:
https://github.com/Hermann-SW/planar_gr ... le#tuttejs
(I changed max for scale slider from 2 to 20 and pressed SHIFT+ENTER for those screenshots)
Image

Statistics: Posted by HermannSW — Wed Sep 18, 2024 7:56 am



Viewing all articles
Browse latest Browse all 4943

Trending Articles