Maths-Integration
I don't do this that often, so I may have been off a little. This draws a
400 "unit" square in the upper left corner of the sheet. Looks like the
y-axes "is" in proportion to the x-axes. However, the display "rounded" 400
to 399.75, which causes a 199.9375 difference in the calculated area.
Don't know if this is useful, but something to keep in mind.
Debug results:
0 0
399.75 0
399.75 399.75
0 399.75
0 0
? 400^2 - 399.75^2
199.9375
Sub Square_400_Units()
Dim Shp(1 To 5, 1 To 2) As Single
Dim v
Dim j
Shp(1, 1) = 0
Shp(1, 2) = 0
Shp(2, 1) = 400
Shp(2, 2) = 0
Shp(3, 1) = 400
Shp(3, 2) = 400
Shp(4, 1) = 0
Shp(4, 2) = 400
' Back to first point
Shp(5, 1) = 0
Shp(5, 2) = 0
ActiveSheet.Shapes.AddPolyline Shp
'// Now, get Vertices
v = ActiveSheet.Shapes(1).Vertices
For j = 1 To 5
Debug.Print v(j, 1); v(j, 2)
Next
End Sub
<snip
|