frequently ask ? : Computers : Programming : Algorithms : Graphics : Vector

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 3 people (100%) answered Yes
Recently 3 of 3 people (100%) answered Yes

Entry

Graphics:What is general effect of any linear transformation simultaneously on all points of object?

Jun 4th, 2005 19:45
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 29 May 2021 - 01:26 pm ------------------------
Graphics:What is general effect of any linear transformation 
simultaneously on all points of object?
---
---
The general effect of any linear transformation, applied simultaneously
to all points of a given object will be a stretching and rotation of
the whole object.
---
The general shape of that object remains overall the same, so it will
still be easily recognizable.
===
This is because, each of the arrows, or vectors, pointing to each of
the points of the object is a rigid straight line. And all the linear
transformation does is one of the following operations:
 1. stretching or scaling that vector
 2. rotating that vector
 3. translation of that vector over a straight line.
And if you do this all at the same time, the whole object is thus
 and or stretched or scaled,
 and or rotated,
 and or translated over a straight line.
===
 1. a stretching of that arrow
    e.g.
     before
        /
       /
      /
     after
           /
          /
         /
        /
       /
      /
---
 2. a rotation of that arrow
    e.g.
     before
        /
       /
      /
     after
      \
       \
        \
---
 3. a translation of that arrow
    e.g.
     before
        /
       /
      /
     after
                                    /
                                   /
                                  /
---
e.g. any square is in general changed into a parallelogram by applying
     a linear transformation to any of its points.
---
e.g. any cube is in general changed into a parallelepiped by applying a
     linear transformation to any of its points.
---
1. Given is
   1. That you choose your origin (e.g. 0, 0, 0 in 3D, or 0,0 in 2D)
            |
            |    +----------+
            |    |          |
            |    |          |
            |    |          |
            |    |          |
            |    |          |
            |    +----------+
            |
          --+-----------------------
         0,0|
   2. To describe your object, you choose relevant points on your
      object
      1. Choosing a square, you have
            |   (1,2)       (2,2)
            |    +----------+
            |    |          |
            |    |          |
            |    |          |
            |    |          |
            |    |          |
            |    +----------+
            |   (1,1)       (2,1)
          --+-----------------------
         0,0|
      1. Then from this origin you point with an fixed length arrow to
         any of the points of your objects.
            |   (1,2)       (2,2)
            |    +----------+
            |    |         .|
            |    |        . |
            |    |       .  |
            |    |      .   |
            |    |     .    |
            |    |    .     |
            |    +---.------+
            |   (1,1)    . (2,1)
            |    . .   .
            |   . .  .
            |  . . .
            | . ..
            |...
          --+-----------------------
         0,0|
   3. Stretching or scaling all points of the object at once
      1. If you stretch or thus scale all arrows, simultaneously, with
         the same scale factor, it will just scale proportionally the
         whole object (thus e.g. creating a 2 times bigger (or smaller)
         object, a 3 times bigger (or smaller) object, ... a 4.6 times
         bigger (or smaller) object, ...).
         E.g. your hand after this operation should still be looking
              like your hand, only a bit bigger or smaller.
         This because you applied the same operation (stretching) at
         once, and equally, to all the points (or thus arrows) of the
         object.
      3. If you stretch or thus scale all arrows, simultaneously, with
         the different scale factors, depending on the axis (e.g.
         x-direction, y-direction, z-direction) it will just scale the
         whole object (thus e.g. creating a 2 times bigger (or smaller)
         object in that direction, a 3 times bigger (or smaller) object
         in that direction, ... a 4.6 times bigger (or smaller) object
         in that direction, ...).
         E.g. your hand after this operation should still be looking
              like your hand, only a stretched out or in in a certain
              direction. E.g. the width of your hand has become 3 times
              as large, while the length of your hand has become 10
              times as small.
         This because you applied the same operation (stretching or
         scaling) at once, and equally, to all the points (or thus
         arrows) of the object, in one direction.
   4. Rotating all points of the object at once
      1. If you rotate all arrows, simultaneously, over the same angle
         (e.g. 45 degrees), it will just rotate the whole object over
         that angle.
         This because you applied the same operation (rotation) at
         once, and equally, to all the points (or thus arrows) of the
         objects.
         You can see this possibly more clear if you imagine you freeze
         that object, with arrows pointing to each of its points.
         When you then rotate that whole freezed object over a certain
         angle, say 45 degrees, around the origin, the end effect will
         be that all of its arrows are also rotated over that same
         angle.
         Thus the other way around if you rotate now all of its arrows
         over the same degree, say 45 degrees, the object will thus
         have rotated over the same angle.
   5. If you rotate and stretch (or scale) all vectors simultaneously,
      it will in general stretch and rotate a square into a
      parallelogram, and or stretch and rotate a cube into a
      parallelepiped.
      This does shear the object but does not change its overall shape.
      1. To verify this experimentally, you could use the following
         idea
--- cut here: begin --------------------------------------------------
          For each of the points of the object
           apply the general linear transformation
          Endfor
--- cut here: end ----------------------------------------------------
      2. In general your transformation is
         1. a non linear transformation
         2. a linear transformation
      3. Now the general non linear transformation looks like:
         It thus says that xold depends on xold, yold and zold,
         similarly for yold and zold)
--- cut here: begin --------------------------------------------------
  xold = f1( xold, yold, zold )
  yold = f2( xold, yold, zold )
  zold = f3( xold, yold, zold )
--- cut here: end ----------------------------------------------------
      4. Now the general linear transformation looks like:
--- cut here: begin --------------------------------------------------
  xold = (number11) . xold + (number12) . yold + (number13) . zold
  yold = (number21) . xold + (number22) . yold + (number23) . zold
  zold = (number31) . xold + (number32) . yold + (number33) . zold
--- cut here: end ----------------------------------------------------
      5. This numbers are real values between minus infinity and
         plus infinity, but you can use similarly any numbers
         between 0 and 1, the end effect should be the same.
         (negative values should only rotate the object, or scale or
          translate the object in the opposite direction)
      6. So you could use the following program
         1. Store the points describing your figure in DATA
            or in an array
         2. Apply the following to each of this points
--- cut here: begin --------------------------------------------------
  xold = RND(1) . xold + RND(1) . yold + RND(1) . zold
  yold = RND(1) . xold + RND(1) . yold + RND(1) . zold
  zold = RND(1) . xold + RND(1) . yold + RND(1) . zold
--- cut here: end ----------------------------------------------------
         3. Here 'RND(1)' means generate a random real number
            between 0 and 1 (e.g. 0.1234234, e.g. 0.563222, ...)
         4. Draw the resulting object on the screen
---
---
Internet: see also:
---
Computer: Graphics: Vector: Link: Overview: Can you give overview of 
links about vector graphics?
http://www.faqts.com/knowledge_base/view.phtml/aid/36506/fid/1810
----------------------------------------------------------------------