I’ve been playing with some ideas, code and Carlson Civil Suite today and I’ve stumbled across an interesting issue with Carlson’s contour routine.
Given this equation for a hyperbolic paraboloid, For more information on this surface
And porting some code to VBA so everyone can follow along
Option Explicit
Public Sub Parabolid()
Dim x As Double
Dim y As Double
Dim z As Double
Dim a As Double
Dim b As Double
Dim pt As AcadPoint
Dim coords(2) As Double
Dim result As Double
a = 1
b = 1
For x = -10 To 10 Step 0.1
For y = -10 To 10 Step 0.1
z = x ^ 2 / a ^ 2 - y ^ 2 / b ^ 2
coords(0) = x: coords(1) = y: coords(2) = z
ThisDrawing.ModelSpace.AddPoint (coords)
Next y
Next x
End Sub
And then triangulating and contouring with these options
Produces a couple of visible errors
After a trial run with the “Reduce Vertices” option turned off the results appear correct, or at least visually correct, I’ve not verified them.
So I’m left wondering why the reduce vertices option produced asymmetrical results.