User Tag List

Results 1 to 3 of 3

Thread: Draw circle algorithmically with surface object

  1. #1
    No Products Registered

    Join Date
    Dec 2006
    Posts
    319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Draw circle algorithmically with surface object

    In the file posted below there is a simple test of Bresenham's circle algorithm used with the surface object.

    View MFA

    However it's doesn't work well and instead of a cirlce it draws a rhombus-looking shape. The problem seems to be in how I have implemented the if-else part. I tried doing some kind of nested loop but it didn't work well either. Anyone know how to do this part correctly?

    I used the algorithm as it is presented here:
    http://www.eazynotes.com/notes/computer-graphics/algorithms/bresenham-circle-algorithm.pdf


  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Draw circle algorithmically with surface object

    There are 2 errors in your code.

    The first error is as you stated the 'else' part - in the first On loop "if" condition, you alter the D variable and then compare to its value later, which is wrong. You need a switch variable for that.

    The other area is that you use the wrong formula in the second action... use D( "Surface" )+4*(Xd( "Surface" )-Yd( "Surface" ))+10


  3. #3
    No Products Registered

    Join Date
    Dec 2006
    Posts
    319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Draw circle algorithmically with surface object

    That's so beautiful, the absolute perfection of math. Thanks Looki.

Similar Threads

  1. [request] draw/surface-like object
    By SolarB in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 8th October 2013, 08:45 AM
  2. How to draw a circle with Surface Object ( Flash )
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 21st September 2012, 03:04 AM
  3. Draw Line avec l'extension surface.
    By SpringUp in forum File Archive
    Replies: 4
    Last Post: 23rd October 2011, 11:22 PM
  4. Draw polygon in surface object.
    By keokeo in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 12th April 2011, 04:30 PM
  5. Saving drawed surface using the Draw Object?
    By Rushino in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 2nd July 2006, 11:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •