Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rotating some points , seems slow
#7
slenkar Wrote:yeah im using that FSin cos it seemed to be the fastest(?)

here is a little demo of the dots being rotated, it makes a nice picture too

<!-- m --><a class="postlink" href="http://www.4shared.com/file/VKojb8gm/rotate.html">http://www.4shared.com/file/VKojb8gm/rotate.html</a><!-- m -->
there is a delay at the beginning while the FSin values are calculated
interesting point about the circle command...
Keep in mind that Circle only computes 1/4 of the circle. The other 3 quarters are just calculated by reflection Wink
For drawing circles, I think you should definitely use CIRCLE (both CIRCLE & DRAW are heavily optimized, they don't use the ROM routines at all - ok, just bragging, but it took me a lot of time :roll: ).

On the other hand, I you want circle coords for other purposes (e.g. calc coordinates in a trajectory), maybe you should have a look at library-asm/circle.asm Wink
The bresenham circle algorithm is described here: <!-- m --><a class="postlink" href="http://en.wikipedia.org/wiki/Midpoint_circle_algorithm">http://en.wikipedia.org/wiki/Midpoint_circle_algorithm</a><!-- m --> (the C routine under the "Optimization section").
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)