Create 3d function with a set of points

Click For Summary

Discussion Overview

The discussion revolves around the challenge of creating a mathematical function from a given set of 3D points. Participants explore the feasibility of deriving a function that relates the variables v, e, and t, and consider the implications of the nature of the data and the underlying mathematical models.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant seeks an efficient program to generate a function from a set of 3D points.
  • Another participant argues that deriving a function requires prior knowledge of the expected function type.
  • A participant offers to provide more data points to aid in function generation.
  • It is suggested that MATLAB may be capable of performing the required function fitting.
  • One participant explains that the problem of recovering a function from data points is complex due to the infinite possibilities of functions that can fit a given set of points.
  • Another participant notes that for any finite number of points, there exist infinitely many functions that can represent those points.
  • There is a suggestion that the relationship can be expressed as t=f(v,e), but this alone does not clarify the issue.
  • A later reply emphasizes the importance of understanding the underlying physics or context when modeling data, cautioning against purely data-driven approaches.
  • It is mentioned that linear fits may serve as first-order approximations, and that care should be taken with extrapolation beyond the data range.
  • Participants discuss the use of splines and the need for justified parameters in fitting models to data.

Areas of Agreement / Disagreement

Participants express differing views on the feasibility of deriving a function from the data points, with some emphasizing the necessity of understanding the underlying model and others focusing on the mathematical fitting process. No consensus is reached regarding the best approach to take.

Contextual Notes

Participants highlight the limitations of relying solely on data points without considering the underlying physical principles. There is also mention of the need for assumptions about the nature of the function being modeled, as well as the implications of extrapolating beyond the provided data.

CjStaal
Messages
7
Reaction score
0
I'm creating a computer program and I need to see what's most efficient. I need another program [lol] that I can input 3d points in and have it create the function.
the points are this v e t
100 500 3
300 3000 28
500 1000 3
1000 5000 45
1000 10000 330
 
Physics news on Phys.org
Cannot be done unless you know what sort of function to expect.
 
I can get much more points if that's what it needs. Pretty much I need to be able to put in v and e and get t out of it
 
Off your first post - you have a bunch of data points which are from some function f(x,y,z) right? You have asked for a program to recover the equation of f(x,y,z) from the set of ordered triples {(xi,yi,zi)}. The problem is that f(x,y,z) can be anything.

Look at the simpler example in 2D ... if I have ordered pairs {(1,1),(2,1),(3,1),...} we could say that the curve is y=1 ... but it could also be y=cos(kx): k=2pi, so which is it? There are an infinite number of possible cosine curves... then there are other periodic functions ... and, in this case, there are infinite data points. If there were finite data points, then I could also fit polynomials. Then there are all the possible irregular functions, peicewise functions and on and on and on. In 3D f(x,y,z) could even loop back on itself.

Programs like MATLAB have built-in assumptions that they use to do interpolation - they do not, in general, find the equation of the generating function.
gridfit, your example, for instance, assumes the data corresponds to a surface z=f(x,y)... and makes assumptions about the nature of the surface.

For the 2D case I could use the polyfit function - but I have to also input the order of the polynomial I want to fit.
 
Last edited:
Given any finite number of points, there exist an infinite number of functions that give those points. In fact, given n points, there exist an infinite number of polynomials of degree n that give those points.
 
Well its more t=f(v,e)
 
CjStaal said:
Well its more t=f(v,e)
Doesn't help.
Basing a mathematical model purely on datapoints, without reference to the underlying physics (or whatever), is an exercise in numerology. In any real environment you should have some preconception of the relationship, even if it is only smoothness and asymptotic behaviour.
In most cases, a first order approximation (over a limited range of values) will be a linear fit. Standard regression tools will allow you to get the best such fit to the data. But beware of trying to extrapolate beyond the range of datapoints unless you have information regarding asymptotes.
Beyond that, smoothness assumptions could justify the use of splines, etc. You should avoid feeding in more arbitrary constants to achieve the fit than are justified by the number of datapoints and their precision. There are standard tests for that. G--gle parameter estimation model chi-square.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K