I am trying to draw an arc with a constant height between 2 vertices. What I have now creates the arc, but I am wondering how I can rotate it to connect with the second vertex. Is there some alternative way I should be drawing this?
vertex1Pos = vertex1.pos
vertex2Pos = vertex2.pos #positions of 2 verticies
distance = vertex1.distance(vertex2) #distance between verticies
arcRect = [vertex1Pos.x,vertex1.pos.y - c.ARC_HEIGHT/2, distance, c.ARC_HEIGHT] #left, top, width, height of arc
while 1:
screen.fill((200,200,200)) #gray background
graphManager.drawGraph(screen) #draw vertices (1 & 2 in this instance)
py.draw.arc(screen, (0,255,0), arcRect, 0, math.pi, 2)
py.draw.rect(screen, (100,100,100), arcRect, 2)
py.display.update()