  We present a theoretical study of the shaping of the time-evolution of
field-free orientation of linear molecules. We show the extend to which the
degree of orientation can be steered along a desired periodic time-dependent
signal. The objective of this study is not to optimize molecular orientation
but to propose a general procedure to precisely control rotational dynamics
through the first moment of the molecular axis distribution. Rectangular and
triangular signals are taken as illustrative examples. At zero temperature, we
compute the quantum states leading to such field-free dynamics. A TeraHertz
laser pulse is designed to reach these states by using optimal control
techniques. The investigation is extended to the case of non-zero temperature.
Due to the complexity of the dynamics, the control protocol is derived with a
Monte-Carlo simulated annealing algorithm. A figure of merit based on the
Fourier coefficients of the degree of orientation is used. We study the
robustness of the control process against temperature effects and amplitude
variations of the electric field.
