Skip to main content
GameDev.net gamedev.net
🔒 Locked

unknown function

Started by crucifixion Jun 5, 2004 at 3:41 AM 6 replies 500+ views
Original Post
crucifixion
crucifixion
I have this unknown math function, and i need to make a function that mimics it''s output fairly close, and all i know is what i get back from what i give it, here''s a list: unknown(1) = 205 unknown(2) = 260 unknown(3) = 310 unknown(4) = 365 unknown(5) = 425 i know this can be done, but i don''t know how. any suggestions/solutions
Muzzafarath
Muzzafarath
Plot the points. "Draw a function" that looks like it will be a good approximation (should be pretty obvious once you've plotted the points).

[edited by - Muzzafarath on June 5, 2004 5:03:25 AM]
I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" - Larry Wall
markr
markr
Don''t hand out answers to homework questions!

Mark
Muzzafarath
Muzzafarath
Yeah, you''re right.
I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" - Larry Wall
higherspeed
higherspeed
I would write out every solution for you. But even if I did that forever there is no guarantee that I would reach the one you want, as there are uncountably many solutions, even on the integers.
ToohrVyk
ToohrVyk
The one and only correct answer is obviously f : x --> unknown(x)

However, you might find interesting to look into various interpolation/approximation techniques (linear interpolation, cubic interpolation, trigonometric interpolation, taylor infinite series, or plain simple lagrange or chebyshev polynomial interpolation).



crucifixion
crucifixion
Thank you all.

I will plot the points. However what i was looking for was an interpolation/approximation technique.

This is for a game I''m making, not a homework assignment.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.