A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: [delaunay image processor]

  1. #1
    Member
    Join Date
    Jul 2000
    Posts
    59

    [delaunay image processor]

    Hi,

    currently I´m writing a few image processors in AS3. Initially I`ve implemented a Delaunay triangulation that works quiet fine and performat (by having ~25 FPS constantly).


    Launch
    .

    You might use it as transition effect between images, so I put up 3 images back to back that can be skipped onClick. Even if the transition is running, the framerate stays agreeabke high on my computer.


    Cheers
    pwd

  2. #2
    flip-flopper scottPadgett's Avatar
    Join Date
    Jan 2005
    Location
    Boston
    Posts
    425
    Hi,

    This is exactly the thing I've been looking to get into for a while. Can you point me to any tutorials that explain the theory behind how this is done?

    Many thanks.
    :: scott ::

  3. #3
    Member
    Join Date
    Jul 2000
    Posts
    59
    ...in a couple of basic steps (without the math stuff):

    1.) Read-In the image and loop-for width-, height-, and colour-values of the image

    2.) Store those values in an array

    3.) built up triangles for each xy-Position of the anchorpoints you have stored

    4.) detect if a one of the points is located within a triangle you´ve built already. If so, then triangulate
    once more

    5.) Every triangle get´s the color-value of the xy-position due to their anchorpoints


    The transition´s are simple for-loops through numChildren-list´s that access each triangle as Sprite that is finally animated with TweenLite.


    Finally the result ( in very basic steps! ) =)
    pwd

  4. #4
    flip-flopper scottPadgett's Avatar
    Join Date
    Jan 2005
    Location
    Boston
    Posts
    425
    how often should you set an anchor point? are you setting these at equal intervals or using some function to pick out the points that you set as anchors?

    what is TweenLite?
    :: scott ::

  5. #5
    Member
    Join Date
    Jul 2000
    Posts
    59
    Quote Originally Posted by scottPadgett
    how often should you set an anchor point?
    ...that not a thing of you must have to set a specific number of anchor points.
    just as many as you like to. if you set lesser points, then the triangulation is logically ruffer and the image isn´t conspicuous very well.

    Quote Originally Posted by scottPadgett
    are you setting these at equal intervals or using some function to pick out the points that you set as anchors?
    as I said: at first, you loop through an image and read-in those points.
    after that, you access each point in another step, but no interval or enterFrame is used to do this, just another for-loop.

    Quote Originally Posted by scottPadgett
    what is TweenLite?
    that.


    pwd

  6. #6
    flip-flopper scottPadgett's Avatar
    Join Date
    Jan 2005
    Location
    Boston
    Posts
    425
    this is awesome. i had no idea there were better, faster Tween classes out there, than the one written by Adobe.

    are you offering up the source code for this thing--did i miss it somewhere on your site?
    :: scott ::

  7. #7
    Member
    Join Date
    Jul 2000
    Posts
    59
    I will not release the sources right now, ´cause that processor is a part of a few image processors that I develop right now.

    When all the work is done and implemented in the project I do all this stuff for, then I will release the sources.

  8. #8
    Viral tick lordofduct's Avatar
    Join Date
    May 2008
    Location
    South Florida
    Posts
    159
    coincidentally, I'm working on some triangulation algorithms myself.

    Right now what I want to complete in total using several different algorithms I've been writing is construct a RISK AI engine. Triangulation is gonna make that a lot freaking easier and dynamic.

  9. #9
    Member
    Join Date
    Jul 2000
    Posts
    59
    and right now, I´ve released my second image processor, dealing with voronoi diagrams - here.

    cheers
    drek

  10. #10
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,361
    Have you taken a look at making pixel bender filters?

  11. #11
    Member
    Join Date
    Jul 2000
    Posts
    59
    Quote Originally Posted by senocular
    Have you taken a look at making pixel bender filters?
    "yes, of course"...

    I´ve already uploaded a few to adobe´s pixel bender exchange:

    fisheye


    smudge



    slicer


    it´s pure fun to play with pbj´s (even if I miss the comfort of loops a lot!), but those voronoi and delaunay image processor should run with AS3, so Pixel Bender wasn´t an option.

    cheers
    drek

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center