/[gzz]/gzz/Documentation/Manuscripts/Irregu/irregu.tex
ViewVC logotype

Diff of /gzz/Documentation/Manuscripts/Irregu/irregu.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.114 by tjl, Sat Nov 30 17:55:34 2002 UTC revision 1.115 by tjl, Sat Nov 30 18:25:10 2002 UTC
# Line 583  solid shapes. Line 583  solid shapes.
583    
584  XXX figs for all these shapes!  XXX figs for all these shapes!
585    
586    \subsubsection{2D offset texture}
587    
588  The type of offsetting in Eq.(\ref{eqoffset}) is implemented  The type of offsetting in Eq.(\ref{eqoffset}) is implemented
589  in modern texture shading hardware, such as the NV25 architecture.  in modern texture shading hardware, such as the NV25 architecture.
590  The image of the undistorted shape can be stored in a texture and accessed  The image of the undistorted shape can be stored in a texture and accessed
591  with texture coordinates offset by (read from) another texture.  with texture coordinates offset by (read from) another texture.
592  This is called an offset (dependent) texture access.  This is called an offset (dependent) texture access.
593    
594  On hardware without such capabilities, such as the NV10, we can  \subsubsection{Polygonal XXX}
595  obtain a similar effect by constraining the offset  
596    On hardware without texture shading capabilities, such as the NV10, we can
597    obtain a suitable shape by constraining the offset
598  in the direction of the normal. This can be done by rendering  in the direction of the normal. This can be done by rendering
599  into a texture a function which is 1 inside the undistorted shape and  into a texture a function which is 1 inside the undistorted shape and
600  falls off linearly with distance. The hardware is capable of adding  falls off linearly with distance. The hardware is capable of adding
# Line 866  and another bit is written to the stenci Line 870  and another bit is written to the stenci
870  ending up on screen.  ending up on screen.
871  That stencil bit is then used to draw borders for the torn edges.  That stencil bit is then used to draw borders for the torn edges.
872    
873  If a canvas is torn into multiple pieces, the above methods  % If a canvas is torn into multiple pieces, the above methods
874  produce edges that do not fit together: the edges of adjacent  % produce edges that do not fit together: the edges of adjacent
875  pieces have opposing ripples.  % pieces have opposing ripples.
876  The problem is partly solved by inverting (i.e., $1-f(\p)$)  % The problem is partly solved by inverting (i.e., $1-f(\p)$)
877  the ripple function for either one of each pair of facing sides.  % the ripple function for either one of each pair of facing sides.
878  But then a 180 degree rotation of a pair of fitting pieces  % But then a 180 degree rotation of a pair of fitting pieces
879  inverts the torn shape between them, breaking the principle of  % inverts the torn shape between them, breaking the principle of
880  tying ripple shape to canvas location.  % tying ripple shape to canvas location.
881    %
882  \if0  % \if0
883  The problem can be fully solved with a vector valued ripple function  % The problem can be fully solved with a vector valued ripple function
884  $F({\p})$, $\Vert F({\p})\Vert \le 1$,  % $F({\p})$, $\Vert F({\p})\Vert \le 1$,
885  using $f({\p}) = (1 + N \cdot F({\p}))/2$,  % using $f({\p}) = (1 + N \cdot F({\p}))/2$,
886  where $N$ is the unit normal  % where $N$ is the unit normal
887  of the envelope. The dot product automatically inverts the  % of the envelope. The dot product automatically inverts the
888  function for a 180 degree rotation.  % function for a 180 degree rotation.
889  XXX: equivalent to drawing each envelope section by real 2D-offsetting  % XXX: equivalent to drawing each envelope section by real 2D-offsetting
890  of a half-plane  % of a half-plane
891    %
892  The texture shader version can directly use the vector valued ripple function.  % The texture shader version can directly use the vector valued ripple function.
893  It can also be used with the  % It can also be used with the
894  pre-computed borders method by pre-computing the dot product, too.  % pre-computed borders method by pre-computing the dot product, too.
895  However, even the connected case then requires a full 360 degree span  % However, even the connected case then requires a full 360 degree span
896  of pre-computed outer surfaces.  % of pre-computed outer surfaces.
897  \fi  % \fi
898    %
899  \if0  % \if0
900  Content drawn using stencil.  % Content drawn using stencil.
901  Inside only needs to be drawn twice. ???  % Inside only needs to be drawn twice. ???
902  Can create ``outside'' stencil and draw inside only once.  % Can create ``outside'' stencil and draw inside only once.
903    %
904  Curved lines: \\  % Curved lines: \\
905  - dicing \\  % - dicing \\
906  - non-rectangular segments need projective texture mapping for  % - non-rectangular segments need projective texture mapping for
907    the connected case: rectangular sections are stretched together \\  %   the connected case: rectangular sections are stretched together \\
908    %
909  Corners: \\  % Corners: \\
910  - motion problem with connected edge on non-rectangular segments  % - motion problem with connected edge on non-rectangular segments
911    on a straight line  %   on a straight line
912    (the ripples ``rotate'' when the tearout shape moves)  \\  %   (the ripples ``rotate'' when the tearout shape moves)  \\
913  - rounded corners to make segments more rectangular \\  % - rounded corners to make segments more rectangular \\
914  - possible problem with self-intersecting envelope \\  % -%  possible problem with self-intersecting envelope \\
915  - could move spine to the inner edge with the spine-normal definition \\  % - could move spine to the inner edge with the spine-normal definition \\
916  - creating corners by intersecting two straight lines with stencil \\  % - creating corners by intersecting two straight lines with stencil \\
917    %
918    %
919  Jigsaw puzzle problems: \\  % Jigsaw puzzle problems: \\
920  - tear-out pieces do not fit together \\  % - tear-out pieces do not fit together \\
921  - partially solved using inverted version of the texture \\  % - partially solved using inverted version of the texture \\
922  - better solution by using a two-component texture  % - better solution by using a two-component texture
923  \fi  % \fi
924    
925  \section{Example applications}  \section{Example applications}
926    

Legend:
Removed from v.1.114  
changed lines
  Added in v.1.115

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26