Sonntag, 27. Oktober 2019

Drawing Tikz Images with Mathcha

Recently we saw a tweet about a new online editor mathcha.io for writing math and drawing diagrams. The editor can then export your text and drawings as latex and tikz code. Back in university we used to write a lot of latex and tikz code so this sounded intriguing. We got to play around with it a bit and these are our results.

First we created a simple plot and added some descriptions. The editor is quite intuitive and allows you to insert your own function.


You can draw e.g. a straight line or a rectangle in the editor and it will create the corresponding tikz code:

%Straight Lines 
\draw [color={rgb, 255:red, 208; green, 2; blue, 27 }  ,draw opacity=1 ] 
(278.5,502.11) -- (473.5,502.11) ;


%Shape: Rectangle 
\draw  [color={rgb, 255:red, 245; green, 166; blue, 35 }  ,draw opacity=1 ]
(355.5,490.11) -- (397.5,490.11) -- (397.5,511.11) -- (355.5,511.11) -- cycle ;
 

In order to see how far we can go wit this we made it our first tiny project to draw a sketch of Beijings Forbidden City.



We uploaded the tikz codes for the plots to our github.

Keine Kommentare:

Kommentar veröffentlichen