1_3 def calc( arg1, arg2, arg3 ): # Calculate whatever you want to show here, and return it. # For example, to implement a mid point, you would put x1=arg1.coordinate().x x2=arg2.coordinate().x x3=arg3.coordinate().x y1=arg1.coordinate().y y2=arg2.coordinate().y y3=arg3.coordinate().y s=abs((x1-x3)*(y2-y3)-(x2-x3)*(y1-y3))/2 a=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)) b=sqrt((x1-x3)*(x1-x3)+(y1-y3)*(y1-y3)) c=sqrt((x2-x3)*(x2-x3)+(y2-y3)*(y2-y3)) w=acos((a*a+c*c-b*b)/(2*a*c))/3 t=Coordinate() t.x=x2+(x1-x2)*cos(w)-(y1-y2)*sin(w) t.y=y2+(x1-x2)*sin(w)+(y1-y2)*cos(w) z=Coordinate() z.x=x2 z.y=y2 return Line(z,t) # return Point( ( arg1.coordinate() + arg2.coordinate() ) / 2 ) # Please refer to the manual for more information. 4 5 1 2 3