Skip to content

Instantly share code, notes, and snippets.

@ngn999
Created January 13, 2013 08:18
Show Gist options
  • Save ngn999/4522943 to your computer and use it in GitHub Desktop.
Save ngn999/4522943 to your computer and use it in GitHub Desktop.

在两pair的中点,画一个红色的叉

u:=1cm;
pair a,b;
a := (3,4)*u;
b := (0.5,0)*u;

draw a--b;

ang = angle(a shifted -b);
pair m;
m := 1/2[a,b];
path p[];
p1 := (-0.3,0)*u -- (0.3,0)*u ;
draw p1 rotated (ang+45) shifted m dashed evenly withcolor red;
draw p1 rotated (ang-45) shifted m dashed evenly withcolor red;
 
show angle(a  shifted -b);

paste to here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment