Home > Blockchain >  How to fit a curved surface to 3d vectors with their normals?
How to fit a curved surface to 3d vectors with their normals?

Time:11-02

I have 3d position vectors as follows:

A=np.array([-773.58, 645.41, -101.986])
B=np.array([841.01, -205.0, 400.9])
C=np.array([1000.91, 805.45, 745.10])

and their corresponding normal vectors

NORM_A = np.array([0.89,  -0.031, 0.44])
NORM_B = np.array([0.87,  -0.14, -0.46])
NORM_C = np.array([0.83,  -0.23, -0.48])

The positions A, B, and C are just points in 3d space, but the normal vectors NORM_A, NORM_B, and NORM_C indicate normal vectors that are perpendicular to a surface.

So, how to fit a 3d surface (maybe curved)?

CodePudding user response:

You need to do some soul searching and choose the geometry of an ideal surface to which you want to attempt a fit. You claim to be able to accept a paraboloid. The equation of a generalised elliptic paraboloid in (y, z) is

x = ((y - a)/b)²   ((z - c)/d)² - e

or

f(x, y, z) = e = -x   ((y - a)/b)²   ((z - c)/d)²

The 3d surface

Visualise normal illustration

Better fit is possible with more data points and a more complicated function that has more degrees of freedom, but you need to decide what that means.

  • Related