DefDbl A-Z
Dim crlf$, dr
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr(13) + Chr(10)
pi = Atn(1) * 4
dr = pi / 180
cAngle1 = 360 / 30
For v2 = 2 To 30
cAngle = (v2 - 1) * cAngle1
' If cAngle > 180 Then cAngle = 180 - cAngle
halfAngle = cAngle / 2
length = 2 * Sin(halfAngle * dr)
tot = tot + length * length
Next
Text1.Text = Text1.Text & tot & crlf & " done"
End Sub
finds the sum of the squares of the chords from one point to be 60.
FWIW, that makes the total for all the chords 60*30/2 = 900, as each of the 30 vertices shares each of its 60 chords with another vertex and so would be counted twice if not divided by 2.
|
Posted by Charlie
on 2018-04-17 11:38:15 |