Re: IFS transformations

From: Stewart Robert Hinsley ({$news$}_at_meden.demon.co.uk)
Date: 01/08/05

  • Next message: Roger L. Bagula: "Re: IFS transformations"
    Date: Sat, 8 Jan 2005 14:09:51 +0000
    
    

    In article <NiRDd.1237$q97.825@reader1.news.jippii.net>, Ville Ahonen
    <devnull@thesubmachine.com> writes
    >Thanks alot, Roger and Stewart. As I don't have a mathematical
    >background, some (=most :-) ) of the stuff Roger wrote was a bit beyond
    >my understanding. But I think I got the basic idea. I've summed up what
    >I understood from your posts below. Please correct me if I'm wrong in my
    >assumptions.
    >
    >I will first calculate
    >
    >(x', y') = (x, y) ( 1 0 ) + (e, f)
    > ( 0 1 )
    >
    >, then take the (x', y') from above and scale it
    >
    >(x', y') = (x, y) ( s 0 )
    > ( 0 s )
    >
    >, strech the above
    >
    >(x', y') = (x, y) ( s1 0 )
    > ( 0 1 )
    >
    >, skew the above
    >
    >(x', y') = (x, y) ( 1 s2 )
    > ( 0 1 )
    >
    >and finally rotate the above
    >
    >(x', y') = (x, y) ( cos t sin t )
    > ( -sin t cos t )
    >
    >with the variables e for horisontal translation, f for vertical
    >translation, s for scale, s1 for strech, s2 for skewness and angle t.
    >After that I would add the resulting (x', y') to the old (x, y), plot it
    >and reiterate n times to produce the picture.
    >
    > - Ville
    >

    That should do the trick. (You do realise you need at least two
    transforms for an IFS?) Note

    1) Affine transformations are not in general commutative, i.e. the order
    in which you do them matters. I tend to use the order contraction,
    rotation, translation - 'cos I'm investigating self-similar figures I
    don't often worry about stretch and skew.

    2) For calculation you can simplify the translation to

           (x', y') = (x, y) + (e, f)

    3) The program will be more efficient if you multiply the matrices
    together and to calculate the transform in one operation, e.g.
    contraction and rotation combine as

           (x', y') = (x, y) ( c.cos(t) c.sin(t) )
                             ( -c.sin(t) c.cos(t) )

    -- 
    Stewart Robert Hinsley
    

  • Next message: Roger L. Bagula: "Re: IFS transformations"

    Relevant Pages

    • Re: Dxf file from OpenGl style entity
      ... hide transforms inside block/blockrefs ... I use this kind of translation to translate GL commands into win32 printer data. ... When I wrote OpenGl entities I used a lot of transformation like ... glTranslate, glRotate, and I used to save state matrix (glPushMatrix, ...
      (comp.cad.autocad)
    • Re: Grid Point
      ... points with xyz coordinates to compare ... transforms. ... Make small rotations and translation in this matrix, ...
      (comp.programming)