Fitting 3D points python
NickName:Simd Ask DateTime:2013-03-14T23:18:45

Fitting 3D points python

I have python code that produces a list of 3-tuples of numbers x, y and z. I would like to fit z= f(x,y) using scipy curve_fit. Here is some non-working code

A = [(19,20,24), (10,40,28), (10,50,31)]

def func(x,y,a, b):
    return x*y*a + b

How can I get python to fit this function to the data in the list A?

Copyright Notice:Content Author:「Simd」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/15413217/fitting-3d-points-python

More about “Fitting 3D points python” related questions

Python - Curve fitting of a 3D cloud of points with intersections

I have a cloud of points which represents a contour in 3D, with intersections. The following image shows an example of the type of geometry: you should see two orthogonal circles in 3D, intersectin...

Show Detail

Local surface fitting to 3d points

I have set of 3d points, but it contains some outliers. My goal is to map original set of 3d points to "smoothed" set of 3d points and get rid of outliers. The approach I choose is - local surface

Show Detail

Curve fitting points in 3D space

Trying to find functions that will assist us to draw a 3D line through a series of points. For each point we know: Date&Time, Latitude, Longitude, Altitude, Speed and Heading. Data might be re...

Show Detail

Progressive plane fitting algorithm in 3D

Someone already showed how to find a fitting plane from a set of points in 3D here 3D Least Squares Plane I just wonder if there is an algorithm to progressively find the best fitting plane point ...

Show Detail

Calculate root mean square of 3D deviation after surface fitting in python

My goal is to determine the 3D deviation (and its RMS) between a set of 3D data points and a fitted paraboloid in Python. Starting from this: Paraboloid (3D parabola) surface fitting python, I can

Show Detail

Fitting a curve in points with associated normals (with spline)

I have faced a similar situation with this question, which was asked 8 years ago but in matlab not python Fit a curve in MATLAB where points have specified normals Similar to this question I have 3

Show Detail

Fitting a single bezier curve to 4 points in 3D

Is there an easy method of curve-fitting a single segment of a bezier curve to 4 points in 3D? Here's an example of what I'm trying to do: And here's another picture of the resulting Bezier handl...

Show Detail

Fitting 3D data points to polynomial surface and getting the surface equation back

I am new to Python 3D fitting, and the related optimisation techniques. I tried to understand similar topics and to find an answer based on least squares methods, but my success has been rather lim...

Show Detail

Fast plane fitting to many points

I'm looking to fit a plane to a set of ~ 6-10k 3D points. I'm looking to do this as fast as possible, and accuracy is not the highest concern (frankly the plane can be off by +-10 degrees in any of...

Show Detail

Fit a line to a set of points in 3D

I have a set of points in 3D (x, y and z over time). I use the answer#1 in the following link to fit a line to the set of 3D points. Fitting a line in 3D In the link above, the dimension of data (s...

Show Detail