What I'm making is a rendition of Blitzball that's a mini-game on Final Fantasy X. Currently I'm trying to get the mini-map portion of the game down which looks like this:
![Name: blitzball.png
Views: 273
Size: 31.6 KB]()
I'm able to draw the Triangle in XNA like this:
Which is pretty simple, all I do is set up 3 vertices that represent the triangle and then get the GraphicsDevice to draw it for me. And because it's 2d I set the Z coordinate as 0 and don't event mess around with that. But what I'm wanting to do is to rotate my triangle by it's orthocenter. Pretty much what I understand about the orthocenter is it's where the three angles meet. But my question to y'all is: A) How do I determine where the orthocenter is and B) How do I rotate the triangle with any given angle?
I'm able to draw the Triangle in XNA like this:
Code:
Private Function Set2dTriangle(ByVal x1 As Integer, ByVal y1 As Integer, ByVal z1 As Integer, _
ByVal x2 As Integer, ByVal y2 As Integer, ByVal z2 As Integer, _
ByVal x3 As Integer, ByVal y3 As Integer, ByVal z3 As Integer, _
ByVal color As Color) As VertexPositionColor()
Dim vertices1, vertices2, vertices3 As New VertexPositionColor
vertices1.Position = New Vector3(x1, y1, z1)
vertices1.Color = color
vertices2.Position = New Vector3(x2, y2, z2)
vertices2.Color = color
vertices3.Position = New Vector3(x3, y3, z3)
vertices3.Color = color
Return {vertices1, vertices2, vertices3}
End Function
Public Sub Draw(ByVal grafix As GraphicsDevice)
grafix.DrawUserPrimitives(PrimitiveType.TriangleStrip, _vertices, 0, 1)
End Sub