zlacker

[return to "Ask HN: What's the state of the art for drawing math diagrams online?"]
1. franci+pD[view] [source] 2023-11-20 20:07:11
>>ajkjk+(OP)
I made https://vector-graph.com/ a while back and documented it pretty thoroughly. While I never "finished" it, it's working pretty fine and as long as you fix it to a specific version, you won't have to worry about changes if/when I continue working on it.

Feedback would be greatly welcome! It's made specifically for the usecase you mention, blog-like website with Katex to add pretty graphics. Example usage:

    <!-- Draw a triangle with labels on the sides and angles -->
    <vector-graph x="3" y="3" axis="false">
      <polygon points="0,0;1,3;3,1" sides="a,b,c" angles="α,β,γ"></polygon>
    </vector-graph>

    <!-- a + b = c, but in vector form (with lots of labels) -->
    <vector-graph x="4.9" y="4.9">
      <vector label="b" color="blue" from="3,4" to="4,2" axis></vector>
      <vector label="a" color="red" from="0,0" to="3,4" axis></vector>
      <vector label="c" from="0,0" to="4,2"></vector>
    </vector-graph>

PS, I give you permission to use it in your personal website for free, alexkritchevsky.com
◧◩
2. corn-d+2u2[view] [source] 2023-11-21 08:25:08
>>franci+pD
This is freaking awesome! I imagine this would’ve been a fun project to work on. Do you have a blog or a write up on how you did this?

I’m also an enjoyer of web-components, I use them in my chrome extension Mobile View. I want to try this out tomorrow at work

◧◩◪
3. franci+IW2[view] [source] 2023-11-21 12:25:48
>>corn-d+2u2
Thanks! Like some of my other "big" projects, it's really modular, in the way it started very simple "let's see if I can draw lines", and then each extra "type" was just a bit extra over the existing core, and so now it has a lot of features! If I knew it'd grow to the current scope I might have been afraid and not even started TBH.

I actually have a Twitter thread on it!

https://twitter.com/FPresencia/status/1411196648177405953

[go to top]