Sorry, I forgot to put the function in the last post...![]()
The function is this: sin(x) + differential(sin(x^2))
It is not too complex actually... but it may take too many seconds for an Expression Gate to calculate it...
Hi again! I'm Scasbyte...
I need help!. I'm making a racing car with smooth acceleration, however I would like to use a function to get the speed, instead of a Value Smoother, the function is this:
[attachment=828:function3.jpeg]
X is time, and Y is speed, but there is a big problem!!!, the function is just too complex to calculate, ¿What can I do? ¿Are there easier functions that describe the same movement?
Thanks!!!
Sorry, I forgot to put the function in the last post...![]()
The function is this: sin(x) + differential(sin(x^2))
It is not too complex actually... but it may take too many seconds for an Expression Gate to calculate it...
Actually I'm pretty sure it won't take more than a second to calculate...
It might not be TOO complex for the Expression chip but it sure is to me.
Try it out, although I don't understand what is it to make it go...
Hey! Do you want to try it with me?
The complex is almost always better.
You can approximate the curve which should be good enough for your needs and then just use it instead.
(You can probably use the equation you have there too, by simply approximating the differential)
Use a few iterations of a Maclaurin series:Hi again! I'm Scasbyte...
I need help!. I'm making a racing car with smooth acceleration, however I would like to use a function to get the speed, instead of a Value Smoother, the function is this:
[attachment=828:function3.jpeg]
X is time, and Y is speed, but there is a big problem!!!, the function is just too complex to calculate, ¿What can I do? ¿Are there easier functions that describe the same movement?
Thanks!!![/b]
two or three terms should do just fine.
Maclaurin series, sin(x) = x - x^3/(3!) + x^5/(5!) - x^7/(7!) ...
EDIT: Sorry, I was wrong about the estimate the first time,
Use THIS: 2+x-1/6*x^3-x^4+1/120*x^5
it fits so nicely over the range you need.
Bookmarks