|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Trigometric Functions
are there any libraries for mlab and control unit for trigometric functions?
|
|
#2
|
|||
|
|||
|
Re: Trigometric Functions
|
|
#3
|
||||
|
||||
|
Re: Trigometric Functions
Quote:
1.) Precomputed lookup tables. Fast to read from but eat alot of program space. If you are cramped for program space you can reduce the number of points in the table and use linear interpolation. 2.) CORDIC algorith. I'm lazy. Google it 3.)Parabolic approximation. a halfsin function can be approximated reasonably well using a parabola. All other trig functions can be derived from halfsine. This goes for lookup tables too. You only need to store half of a sin cycle 4.) calculatea series on the fly. We actually tested this and it worked reasonable well if you precomputer the factorials. I wouldn't recommend it though. It is rather slow compared to the other approaches. We did it more to show that it could be done. There are a few old threads on forums that discuss this topic. Again I'm lazy. Search for them yourself |
|
#4
|
||||||
|
||||||
|
Re: Trigometric Functions
Quote:
|
|
#5
|
|||||
|
|||||
|
Re: Trigometric Functions
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Do you write functions for your code? | Max Lobovsky | Programming | 26 | 11-03-2004 07:04 |
| Important functions of a first robot? | Ianworld | General Forum | 5 | 15-04-2003 13:29 |
| Primary Functions Poll | Ben Mitchell | Rules/Strategy | 1 | 16-02-2003 02:10 |
| What? Isnt everyone building new functions on their robot?? | archiver | 2001 | 4 | 24-06-2002 01:34 |
| Return of the Inverse Trig Functions | Leo M | Programming | 3 | 24-01-2002 08:12 |