TeX - LaTeX Asked by user220551 on August 26, 2021
So I wanted to make a hexagon with the diagonals marked in Asymptote but I couldn’t figure out how to do it, so can someone please help write the Asymptote code for me? I’m very new to Asymptote so I have no idea how to do it.
I attached an image of what I’m trying to make.
Thank you! 😀
There are many ways to code it in Asymptote
. here is one, file hexa.asy
:
// run
// asy hexa.asy
// to get hexa.pdf
//
settings.outformat="pdf";
size(4cm);
int n=6;
pair[] V= sequence(new pair(int i){return dir(360*i/n);}, n);
V.cyclic=true;
for(int i=0;i<n;++i){
draw(V[i]--V[i+1]--V[i-1]--cycle,darkblue+0.7bp);
}
dot(V,UnFill);
Answered by g.kov on August 26, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP