    \documentstyle[epsfig,psfig,portrait]{seminar}
% \input{eepic.sty}



\pagestyle{empty}
\thispagestyle{empty}

\portraitonly
\def\printportrait{\special{portrait}}    % Works with dvips.
\slideframe{none}

%\setlength{\topmargin}{-0.1in}
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{9.0in}

\newcommand{\Reals}{\mbox{\normalsize{I\mbox{\hspace{-0.03in}}R}}}
\newcommand{\inner}[2]{\left<{#1}, {#2} \right>}

\setlength{\oddsidemargin}{-10mm}

\begin{document}


\begin{slide*}
Technion - Israel Institute of Technology \\
Computer Science Department \vspace{0.8in} \\

\begin{center}
{\Large WD-pic, A WYSIWYG, Direct-Manipulation pic \vspace{0.2in}}\\ 
Shpilberg Faina
\vspace{0.4in}\\ 
Supervisor: Daniel M. Berry\\
\end{center}
\end{slide*}

\begin{small}

\begin{slide*}
\begin{center}
 {\large Two kinds of picture drawing software:  \vspace{0.1in}}
\end{center}
\begin{itemize}
	\item	batch, such as {\bf Pic}, {\it Latex} and

	\item	WYSIWYG (What You See Is What You Get), direct manipulation,
		such as {\it xfig}, {\it VISIO}, {\it MS draw} {\it Mac Draw}etc.

\end{itemize}

\end{slide*}

\begin{slide*}
{\large The advantages of batch drawing software:}  
\begin{itemize}
   \item User can insert or delete an element or change its sizes or location without destroying the entire picture.
   \item It is easier to manipulate large groups of elements treated as a unit.
\end{itemize}

{\large The disadvantages of batch drawing software:}
\begin{itemize}
   \item User cannot see picture as it is being composed, and because of it he/she could have problems with proportions, sizes, text string's length, etc.
   \item As a result it is easier to make an error.
\end{itemize}
\end{slide*}

\begin{slide*}

{\large The advantages of WYSIWYG, direct-manipulation drawing software are:}

\begin{itemize}
  \item User can see  a whole  picture. 
  \item It is easier to make decision about such matters as exact type of element (for example {\bf box} or {\bf circle}), element size, position of text string, etc. and to avoid  obvious errors.
\end{itemize}

{\large The disadvantages of WYSIWYG, direct-manipulation drawing software are:}
\begin{itemize}
  \item A change of one element can destroy an entire picture.
  \item It is not comfortable to manipulate parameters  large groups of elements, for example changing the default size for all {\bf boxes} or changing the direction of elements in the picture. 
\end{itemize}

\end{slide*}



\begin{slide*}
\begin{figure}[h]
\begin{center}
\epsfysize = 2.8in \epsfbox{Slide11.ps}
\end{center}
\end{figure}
\end {slide*}



\begin{slide*}
 WD-pic is a combination of batch and
WYSIWYG, direct-manipulation drawing program, an
enhancement of the well-known batch {\bf Pic} program that works with the
same {\bf Pic} language. The internal representation of any picture is
editable {\bf Pic} language of the style that a human would enter.
\end{slide*}

\begin{slide*}
WD-pic is a UNIX system line drawing program. It is intended chiefly for
technical document illustration, such as flow charts, state diagrams and so on.
Pictures, interactively created by WD-pic can be saved as batch program,
and batch programs can be displayed and edited interactively with the help of
WD-pic.
\end{slide*}

\begin{slide*}
The line drawing included in the document were produced by the author using 
WD-pic. Thus the production of this thesis constitutes a case study of its use.
\end{slide*}

\begin{slide*}
\begin{figure}[h]
\begin{center}
\epsfysize = 2.8in \epsfbox{Design.ps}
\end{center}
\end{figure}
Principal execution steps in WD-pic from GUI event to the picture on the screen.
\end{slide*}


\begin{slide*}
\begin{figure}[h]
\begin{center}
\epsfysize = 1.5in \epsfbox{Slide3.ps}
\end{center}
\end{figure}
  {\bf Pic} is a language for specifying pictures so that they can be typeset as an integral part of a document preparation system
\end{slide*}

\begin{slide*}
\begin{center}
 {\large {\bf Pic} language classification.}
\end{center}
\begin{figure}[h]
\begin{center}
\epsfysize = 3in \epsfbox{Slide4.ps}
\end{center}
\end{figure}
\end{slide*}

\begin{slide*}
\begin{center}
 {\large {\bf Pic} compiler execution.}
\end{center}
\begin{figure}[h]
\begin{center}
\epsfysize = 3in \epsfbox{Slide5.ps}
\end{center}
\end{figure}
\end{slide*}


\begin{slide*}
\begin{center}
 {\large {\bf Pic} compiler data structures.}
\end{center}
\begin{figure}[h]
\begin{center}
\epsfysize = 3in \epsfbox{ObjStr.ps}
\end{center}
\end{figure}
\end{slide*}


\begin{slide*}
    Using {\bf Pic} compiler data structures, we created  the WD-editor data
structures, allowing  us to store all necessary information  for
working with a picture via both graphical interface and a text editor interface. After that,
we modified the {\bf Pic} compiler data structures in order that they confirm  to the 
WD-editor data structures. Also we changed  the {\bf Pic} compiler code
so that it supports the modified data structures. 
\end{slide*}






\begin{slide*}
\begin{center}
       {\large Two ways of  picture's representation in the WD-pic}
\end{center}
 \begin{itemize}
   \item  drawing data structures, data structures containing all necessary geometric and
drawing information for each element of the picture.
   \item {\bf Pic} data structure, data structure containing a representation of the {\bf Pic} text.
 \end{itemize}
\end{slide*}



\begin{slide*}
\begin{figure}[h]
\begin{center}
\epsfysize = 2.3in \epsfbox{Slide6.ps}
\end{center}
\end{figure}
\tiny
  \begin{itemize}
    \item WD-pic updates its data structures.
    \item The WD-pic updates only
{\bf Pic} internal representation and uses it to create a file according to the {\bf Pic} standard. This file is passed to the {\bf Pic} compiler as an input data. 
The {\bf Pic} compiler creates all necessary data structures and passes them to the WD-pic for it to draw the picture.
\normalsize
\end{slide*}


\begin{slide*}
\begin{center}
 {\large Examples of WD-pic execution. \vspace{0.4in}}
\end{center}
\begin{figure}[h]
\begin{center}
\epsfysize = 1.1in \epsfbox{Slide7.ps}
\end{center}
\end{figure}
\vspace{0.7in}
\begin{itemize}
  \item Addition of the box.
  \item Insertion of the box.
\end{itemize}

\end{slide*}



\begin{slide*}
\begin{center}
 {\large WD-pic data structures.}
\end{center}
\begin{figure}[h]
\begin{center}
\epsfysize = 3in \epsfbox{PicObjStr.ps}
\end{center}
\end{figure}
\end{slide*}


\begin{slide*}
\begin{center}
 {\large Pic text list. \vspace{0.3in}}
\end{center}

\begin{itemize} 
  \item  a string, corresponding to a {\bf Pic} element: \newline \newline
    {\em A1: box dotted width 1}  \newline
\begin{figure}[h]
\begin{center}
\epsfysize = 0.75 in \epsfbox{Box.ps}
\end{center}
\end{figure}
    {\em circle rad 1 ``CIRCLE''  } \newline
\begin{figure}[h]
\begin{center}
\epsfysize = 1in \epsfbox{ExCirc.ps}
\end{center}
\end{figure}

          \item a string, corresponding to a {\bf Pic} operator: \newline
  {\em  for $i = 1$ to 7 by 2 do \{ \newline
      arc radius $1/i$ \newline
      \}}
\begin{figure}[h]
\begin{center}
\epsfysize = 1.2in \epsfbox{Loop.ps}
\end{center}
\end{figure}
\item a string, corresponding to the drawing direction changing:\newline
{\em up} \newline
 {\em left} \newline
       \item a string, corresponding to the {\bf Pic} default sizes changing:\newline
{\em boxwid = 1.5} \newline
 {\em reset boxwid} \newline
 \end{itemize}
\end{slide*}

\begin{slide*}
\begin{center}
 {\large Object array. \vspace{0.3in}}
\end{center}
\footnotesize
\[\begin{array}{ll} 
  \mbox{\em \hspace*{0in}  union \{}  & \\
  \mbox{\em \hspace*{0.2in} PicTextDef *Ptr;}  & \\
  \mbox{\em \hspace*{0.2in} int Num;} &\\
  \mbox{\em \hspace*{0in} \}PicTextUnion;} &\mbox{\tiny pointer to the Pic text list} \\
  \mbox{\em \hspace*{0in} int o\_type;} & \mbox{\tiny the element's type}\\
  \mbox{\em \hspace*{0in} int o\_count;} & \mbox{\tiny the length of o\_val} \\
  \mbox{\em \hspace*{0in} int o\_nobj;}	& \mbox{\tiny the index of the element}\\
  \mbox{\em \hspace*{0in} int o\_mode;} & \mbox{\tiny drawing direction}\\
  \mbox{\em \hspace*{0in} float o\_x;} &   \\
  \mbox{\em \hspace*{0in} float o\_y; } & \mbox{\tiny coordinates} \\
  \mbox{\em \hspace*{0in} int o\_nt1;} & \mbox{\tiny the first index in the String array} \\
  \mbox{\em \hspace*{0in} int o\_nt2;} & \mbox{\tiny the second index in the String array} \\
  \mbox{\em \hspace*{0in} int o\_attr;} &\mbox{\tiny line's style, fill mode, etc.} \\
  \mbox{\em \hspace*{0in} int param1;} & \\
 \mbox{\em \hspace*{0in} int param2;} & \\
 \mbox{\em \hspace*{0in} void* param3;} & \\
 \mbox{\em \hspace*{0in} float param4;} & \\		
 \mbox{\em \hspace*{0in} float o\_fillval;} & \mbox{\tiny fill value}\\
  \mbox{\em \hspace*{0in} ofloat o\_val[1]}; &\mbox{\tiny additional data} \\
\end{array}
	\]
\normalsize
\begin{center}
 {\large String array. \vspace{0.3in}}
\end{center}
\[\begin{array}{ll}
\mbox{\hspace*{0in}{\em int t\_type;}} &\mbox{\tiny string's adjustment} \\
\mbox{\hspace*{0in}{\it char t\_op;}} & \\	
\mbox{\hspace*{0in}{\it char t\_size;}} & \\
\mbox{\hspace*{0in}{\it char *t\_val;}} &\mbox{\tiny pointer to the string} \\
\end{array}
	\]

\end{slide*}



\begin{slide*}
\begin{figure}[h]
\begin{center}
\epsfysize = 3.5in \epsfbox{MainWindow.ps}
\end{center}
\end{figure}
\end{slide*}

\begin{slide*}
\begin{figure}[h]
\begin{center}
\epsfysize = 3.5in \epsfbox{MainWindBox.ps}
\end{center}
\end{figure}
\end{slide*}


\begin{slide*}
\begin{center}
{\large Elements parameters}
\end{center}
\begin{figure}[h]
\begin{center}
\epsfysize = 2.5in \epsfbox{Button.ps}
\end{center}
\end{figure}
\end{slide*}

\begin{slide*}
%\begin{center}
%{\large Examples of dialogs \vspace{0.3in}}
%\end{center}
\begin{figure}[h]
\begin{center}
\epsfysize = 1.3in \epsfbox{Size.ps}
\end{center}
\end{figure}
\vspace{0.7in}
\begin{figure}[h]
\begin{center}
\epsfysize = 1.3in \epsfbox{Fill.ps}
\end{center}
\end{figure}
\begin{figure}[h]
\begin{center}
\epsfysize = 1.3in \epsfbox{Line.ps}
\end{center}
\end{figure}
\end{slide*}

\begin{slide*}
\begin{figure}[h]
\begin{center}
\epsfysize = 2.8in \epsfbox{MenuBar.ps}
\end{center}
\end{figure}
\end{slide*}

\begin{slide*}
%\begin{center}
%\large{Examples of dialogs}
%\end{center}
\begin{figure}[h]
\begin{center}
\epsfysize = 1in\epsfbox{LoopDial.ps}
\end{center}
\end{figure}
\end{slide*}


\begin{slide*}
\begin{figure}[h]
\begin{center}
\epsfysize = 2.3in\epsfbox{Defaults.ps}
\end{center}
\end{figure}
\begin{figure}[h]
\begin{center}
\epsfysize = 1.1in\epsfbox{Reset.ps}
\end{center}
\end{figure}
\end{slide*}

\begin{slide*}
\begin{center}
\large{Example of simple picture in WD-pic}
\end{center}
\begin{figure}[h]
\epsfysize = 0.6in\epsfbox{Simple.ps}
\end{figure}
\vspace{0.3in}
 The sequence of actions, executed in WD-pic.
 \begin{enumerate}
   \item Click Push Button {\it circle}.
   \item Click Push Button {\it line}.
   \item Click Push Button {\it circle}.
   \item Click Push Button {\it same}.
 \end{enumerate}
\end{slide*}

\begin{slide*}
\begin{center}
\large{Example of simple picture in {\em xfig}}
\end{center}
\begin{figure}[h]
\epsfysize = 0.6in\epsfbox{Simple.ps}
\end{figure}
\vspace{0.7in}
The sequence of actions, executed in {\em xfig}.
 \begin{enumerate}
   \item Click Push Button for {\bf circle}.
   \item Adjust circle size.
   \item Click Push Button for {\bf line}.
   \item Adjust line length and direction.
   \item Click Push Button  copy.
   \item To copy the first {\bf circle} and adjust it position.
 \end{enumerate}
\end{slide*}



\begin{slide*}
\begin{center}
\large{Examples of changes in the {\bf Pic}}
\end{center}
\begin{figure*}[h]
\begin{tabular}{lll}

\epsfysize = 1.5in\epsfbox{Cor1.ps} &
\epsfysize = 1.5in\epsfbox{Cor2.ps} &
\epsfysize = 1.7in\epsfbox{Cor3.ps} \\
(a) & (b) &(c) \\
\end{tabular}
\end{figure*}
\tiny
\begin{itemize}
\item (a) \neline
.PS \newline
A0 :box  \newline
A1 :box at A0 + (0.3 ,2)  \newline
arrow from A0 .nw to A1 .nw \newline
.PE
\item  (b) \newline
.PS \newline
A0 :box \newline
A1 :box at A0 + (1.3, 2)  \newline
arrow from A0 .nw to A1 .nw \newline
.PE
\item (c) \newline
.PS \newline
A0 :box \newline
A1 :box at A0 + (0.3 , 2) width 0.5 height 1.0\newline
arrow from A0 .nw to A1 .nw \newline
.PE
\end{itemize}
\small
\end{slide*}








\begin{slide*}
\begin{figure}[h]
\begin{center}
\epsfysize = 1in \epsfbox{If.ps}
\end{center}
\end{figure}
.PS \newline
pi =atan2 (0 ,-1 ) \newline
for i =0 to pi by 0.1 do\{  \newline
   if (s = sin(i)) $>$ 0.8    then  {s = 0.8}  \newline
   "x" at i/2, s/2 \newline
 \}  \newline
.PE
\end{slide*}


\begin{slide*}
\begin{center}
\end{center}
\begin{figure}[h]
\begin{center}
\epsfysize = 2.0in \epsfbox{Circle1.ps}
\end{center}
\end{figure}
\tiny
\begin{itemize}

\item  First:

.PS \newline
A0 :circle radius 0.5  \newline
circle radius 0.7 at A0 \newline
circle radius 0.9 at A0  \newline
circle radius 1.1 at A0  \newline
circle radius 1.3 at A0   \newline
.PE \newline

\item  Second:

.PS \newline
A0 :circle radius 0.5 \newline
for i =1 to 4 do \newline
{circle rad (0.5 + 0.2 * i) at A0} \newline
.PE \newline
\end{itemize}
\small

\end{slide*}



\begin{slide*}
\begin{center}
\end{center}
\begin{figure}[h]
\begin{center}
\epsfysize = 1.8in \epsfbox{Face.ps}
\end{center}
\end{figure}
\tiny
.PS

A1 :circle radius 1  \newline
circle at A1 +(-0.58 ,0.31 )radius 0.1 \newline
circle at A1 +(0.44 ,0.38 )same  \newline
down  \newline
line from A1 +(-0.14 ,0.22 ) \newline
spline from A1 +(-0.54 ,-0.38 )right 0.40 down 0.40  $\backslash $ \newline
 then right 0.60 up 0.40  \newline
spline from A1 .w left 0.30 up 0.90  $\backslash $  \newline
 then left 0.30 up 0.60  $\backslash $  \newline
 then right 0.60 down 0.60  $\backslash $  \newline
 then right 0.30 up 0.90  $\backslash $  \newline
 then right 0.30 down 0.60  $\backslash $  \newline
 then right 0.30 up 0.60  $\backslash $  \newline
 then right 0.30 down 0.30  $\backslash $  \newline
 then right 0.30 up 0.60  $\backslash $  \newline
 then down 0.60  $\backslash $  \newline
 then right 0.60  $\backslash $ \newline
 then left 0.30 down 0.60  $\backslash $ \newline
 then right 0.60 to A1 .e  \newline
.PE
\small
\end{slide*}

\begin{slide*}
\begin{center}
\end{center}
\begin{figure}[h]
\begin{center}
\epsfysize = 2.3in \epsfbox{Person.ps}
\end{center}
\end{figure}
\tiny
.PS

down 

circle 

A0 :ellipse height 1.2 

line from A0 .nw left linewid *1 down lineht *1 

line from A0 .ne right linewid *1 down lineht *1 

line from A0 .sw left linewid *1 down lineht *2 

line from A0 .se right linewid *1 down lineht *2 

.PE
\small

\begin{slide*}

\end{document}


