home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Extra 1996 #6 / AmigaPlus-eXtra-6-96.iso.7z / AmigaPlus-eXtra-6-96.iso / programme / dust / dusthelp2 / cdeform < prev    next >
Text File  |  1996-03-22  |  5KB  |  88 lines

  1.   COMMAND CDEFORM
  2. -----------------------------------------------------------------
  3.     Purpose: Deform a curve of an object to fit a curve of another
  4.              object. This the "Allround-effect" of Dust. You can
  5.              create morphs in high-quality, animated boolean
  6.              effects, ... using this command.
  7.       Usage: CDEFORM(<src-object>,<dest-object>,<sg1>,<sg2>,<round>[,2 control-curves])
  8.  
  9.              <sg1> and <sg2> are the names of two subgroups defining
  10.              the curve. Both objects have to contain these subgroups.
  11.              The curves are build from the list of boundary-edges.
  12.              All boundary-edges which are found in both subgroups
  13.              are taken to build the curve.
  14.              If you are able to define the curve using one subgroup
  15.              then specify "" or "NONE" for the second one.
  16.              If your second subgroup is the whole object specify
  17.              "MAIN" or "DEFAULT" without defining this subgroup.
  18.  
  19.              The <round>-parameter specifies which points are
  20.              interpolated and which are taken directly from the
  21.              destination-object. Interpolated points which have
  22.              a relative distance less than <round> from
  23.              a destination point are turned in this destination-point.
  24.              Values from 0.0 (interpolate all points) to 1.0 (interpolate
  25.              no points) are possible.
  26.  
  27.  
  28.              The optional 4 parametes "2 control-curves" are the
  29.              names of 4 subgroups which define two control-curves
  30.              which are taken to search the startpoint for closed
  31.              curves.
  32.  
  33.    Examples: cdeform(1,2,G1,G2,0.0)
  34.              cdeform(1,2,G1,,0.2)
  35.              cdeform(1,2,G1,MAIN,0.1)
  36.  
  37.       Notes: 1. You may ask: What are curves in my polygon-object ?
  38.                 In fact Dust moves some points of the source object
  39.                 to the location of some points of the destination-
  40.                 object. To get a smooth behavior without turning
  41.                 polygons sorted curves are needed. If the point-count
  42.                 of the source-object is greater than the one of the
  43.                 destination-object the remaining points are interpolated
  44.                 linear using this curves.
  45.              2. Both curves must be of the same type (open or closed)
  46.              3. Now you can morph a closed head into a sphere,
  47.                 a face into a plane, a torus with 12x5 points into
  48.                 a torus with 12*24 points in the highest quality
  49.                 you can imagine.
  50.              4. In the most cases you will need two subgroups to define
  51.                 your curve exactly.
  52.              5. If you deform some neighbour-curves it can happen
  53.                 that the faces become turned. In this case you have two
  54.                 choices:
  55.                  a) use the STARTPCORR-parameter
  56.                      Example:
  57.                      You morphed four curves:
  58.                       CDEFORM(1,2,G1,"",0.0)
  59.                       CDEFORM(1,2,G2,"",0.0)
  60.                       CDEFORM(1,2,G3,"",0.0)
  61.                       CDEFORM(1,2,G4,"",0.0)
  62.                      The triangles between the 2nd and the 3rd curve
  63.                      are turned in the same direction, the triangles between
  64.                      the 3rd and the 4th curve are turned in the opposite
  65.                      direction. Then try the STARTPCORR-parameter on the
  66.                      3rd curve:
  67.                      SET(STARTPCORR,0)
  68.                      CDEFORM(1,2,G1,"",0.0)
  69.                      SET(STARTPCORR,0)
  70.                      CDEFORM(1,2,G2,"",0.0)
  71.                      SET(STARTPCORR,1)
  72.                      CDEFORM(1,2,G3,"",0.0)
  73.                      SET(STARTPCORR,0)
  74.                      CDEFORM(1,2,G4,"",0.0)
  75.                      If the result are now better try a higher value to find
  76.                      the optimum otherwise use negative values.
  77.                  b) use control-curves
  78.                      The control curves always are the neighbour and
  79.                      the previous neighbour-curve:
  80.                       CDEFORM(1,2,G1,"",0.0)
  81.                       CDEFORM(1,2,G2,"",0.0)
  82.                       CDEFORM(1,2,G3,"",0.0,G2,"",G1,"")
  83.                       CDEFORM(1,2,G4,"",0.0)
  84.                     No doubt, the control-curves are the better choice
  85.                     but always you need 2 previous curves !
  86.               6. see also CDEFORMINTERP, EXPANDSG, SHRINKSG and
  87.                  PREFS (INTERPMODE, FORCESWAP, STARTPCORR)
  88.