next up previous contents index
Next: \symmetry Up: Geometrical operators Previous: \rabbit_ear   Contents   Index

Subsections


\shift

Description 

Operator \shift provides the way to represent diagrams in pseudo 3D. Classically, diagrams show each sheet layer separately such as diagrams were drawn with some perspective angle. Sometimes it's even useful to draw graphical elements as it cannot be seen in reality. For this reason, a real and computed 2D projection of a 3D geometrical representation of the model can limit the expressiveness of the Doodle language. We think it's better to let user express a fake 3D as he wants.

In this approach, the user's work is bigger than in the automated way even if there is no physic limitations. In order to reduce this effort the \shift operator has been introduced. Its goal is to modify the visual coordinates of a particular vertex. With the vertex to shift this operator takes two values related to each geometrical axis (first for the horizontal one and the second for the vertical one). \shift locally changes a vertex position using two little relative values expressed in millimeter (can be float values). The coordinates don't change internally, the change is only visual but geometrical operations (even the future ones) such as intersection, symmetry etc...use the shifted coordinates to reflect the visual reality.

In fact, if a shifted point is used into an geometrical operation to produce a new point, this new vertex has its physical coordinates computed such as the shifted point wasn't shifted and the system computes also shifting values to reflect the geometrical operation in the visual world. Indeed, if the system wouldn't compute this former values the result of the geometrical operator would be confusing.
The right figure below highlights one of those situation.

This operator should only appear in a step block.

Figure: Left: Example of the operator \shift. Point a and point c have internally the same position. The a coordinates have been set in this case with a \move(a,c); operator. Note that this operator does not handle edges masking, on this figure we have explicitly redraw edge [a, d] using edge [c, b] as limit (cf. § [*]).
Right: This figure is surely useless but it presents the case of a geometrical operator producing a new vertex using a shifted point. c has been shift by 1cm to the left but in fact its physical position hasn't be modified. The new vertex aa is defined as the symmetric of c through edge [d, b]. The internal position is equivalent to one of a, but since a is no longer the visual symmetric of c through edge [d, b] due to the shift operation, Doodle computes aa shifting values to draw aa correctly. If user unshifts the vertex aa it will be drawn in the a position.
\includegraphics[]{figures/shift}\includegraphics[]{figures/shift_geo}

Usage

  \shift(a, 4, 0); % draw point 'a' 4mm right to its real position. 

Formal structure

  \shift(VERTEX, DX, DY);

Parameters

  VERTEX
  Description    : Indicates the vertex which is shifted.
  Type           : Symbol, vertex identifier.
  Allowed values : Any vertex identifier previously defined.

  DX
  Description    : Indicates the horizontal relative shift. 
  Type           : Integer (millimeter).
  Allowed values : Any integer value are allowed.
                   
  DY
  Description    : Indicates the vertical relative shift. 
  Type           : Integer (millimeter).
  Allowed values : Any integer value are allowed.


next up previous contents index
Next: \symmetry Up: Geometrical operators Previous: \rabbit_ear   Contents   Index
Doodle reference manual HTML version generated using LaTeX2HTML by Jérôme Gout, 2001-10-29
Doodle is hosted by Sourceforge, go to SourceForge Logo for more information
©2000-2001 Doodle