??? 03/15/05 15:12 Read: times |
#89723 - 8051 Maths Responding to: ???'s previous message |
David Toretto said:
Hello !
I'm doing some routines to plot dots and lines on a graphical display. For non-linear lines, or circles, i don't know if it's better to use Bresenham algorithms or using the trigonometric routines (sin,cos,tan,etc..) already existing. Do you know if 80x51 uP are good (fast) for trigo-math or is better to use all-integer algorithms like Bresenham ? Depends. If you can use Bresenham integer only tests and you can confine that integer to 8 bits then that us definitely the way to go with the 8051. Even if the integer test extends to 16 bits then Bresenham is still likely to be fastest and the smallest code. Anything that needs floating point will definitely be much slower than this. However, if your display is only 256 by 256 pixels you may as well use a look up table for sin and cos. You can use the same 256 entry look up table for both sin and cos in any quadrant. This will be much faster than floating point. Ian |
Topic | Author | Date |
80x51 it's good for math ? | 01/01/70 00:00 | |
assumptions and answer | 01/01/70 00:00 | |
8051 Maths | 01/01/70 00:00 | |
yes and | 01/01/70 00:00 | |
Fast![]() | 01/01/70 00:00 |