Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / I need help with the curve value function .

Author
Message
dman
21
Years of Service
User Offline
Joined: 21st Feb 2005
Location:
Posted: 28th May 2010 22:44
I would like to know the inner workings of the curve value function.

is there a formula used or a routine.

I would like to use it for linear interpolation.

but I just want to see how it was done.

thank you.
Kira Vakaan
17
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 28th May 2010 22:53 Edited at: 28th May 2010 22:53
I don't really know how you'd use it for linear interpolation, I think you'd be better off writing your own function.

I'm not at my dev computer to test it again, but a while ago, I played around with it and (I'm pretty sure) I discovered that it returns:


I could be wrong, as it was a while ago and I might be remembering incorrectly.

dman
21
Years of Service
User Offline
Joined: 21st Feb 2005
Location:
Posted: 28th May 2010 23:00
I'm not sure what your code is or how to use it. I saw someone use the curve value function before for linear interpolation in audio.
Kira Vakaan
17
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 28th May 2010 23:08
I gave you the inner workings of curvevalue which I was pretty sure you asked for.

How about this?



dman
21
Years of Service
User Offline
Joined: 21st Feb 2005
Location:
Posted: 28th May 2010 23:12
Thanks very much, I appreciate the help.

I understand it now, used it it seems to be working fine.


thanks again.
Kira Vakaan
17
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 28th May 2010 23:16
You're welcome

However, I still don't understand how curvevalue can be used for linear interpolation. If you want a linearly interpolated value between two other values, you should look up "lerp".



Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 29th May 2010 01:27
OH! that's what lerp means!!!
I love that... it's like... LinEaR intERPolation


Kira Vakaan
17
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 29th May 2010 05:24
Lol, yup. I learned that pretty recently. I've used the function for a long time without knowing where its name comes from.

Y'know, I think we have similar math interests. Matrices, Vectors, and Trig and stuff. It's kinda cool.

Login to post a reply

Server time is: 2026-07-25 08:29:44
Your offset time is: 2026-07-25 08:29:44