Computer Science, asked by Anonymous, 4 months ago

task for coders


Code the figure attached above using LateX only


Explain your steps too​

Attachments:

Answers

Answered by NewGeneEinstein
22

Answer:

So for coding the figure we use picture Environment

Code:-

\setlength {\unitlength}{1cm}\begin{picture}(0,0)\linethickness {0.4mm}\multiput(0,0)(0,1){3}{\put(0,0){\line(1,0){2}}}\multiput (0,0)(1,0){3}{\put(0,0){\line (0,1){2}}}\end{picture}

construction :-

  • First add the basic code of picture Environment.
  • Set the unit length as 1cm and the page size as (0,0)

______

\setlength {\unitlength}{1cm}\begin{picture}(0,0)\end{picture}

______

  • Now we will do further constructions using multiput command

_______

\multiput(x_1,y_1)(x_2,y_2){number of objects}{object}

_______

Now put values

  • We have to construct 3 horizontal lines .
  • Hence number of objects is 3

___________

\setlength {\unitlength}{1cm}\begin{picture}(0,0)\multiput(0,0)(0,1){3}{\put(0,0){\line(1,0){2}}}\end{picture}

____________

  • Now use the same way to construct 3 vertical lines

\rule {100}{1}

\setlength {\unitlength}{1cm}\begin{picture}(0,0)\multiput(0,0)(0,1){3}{\put(0,0){\line(1,0){2}}}\multiput (0,0)(1,0){3}{\put(0,0){\line (0,1){2}}}\end{picture}

\rule {100}{2}

  • Make the line thick by using \thicklines or \linethickness {}

______________

\setlength {\unitlength}{1cm}\begin{picture}(0,0)\linethickness {0.4mm}\multiput(0,0)(0,1){3}{\put(0,0){\line(1,0){2}}}\multiput (0,0)(1,0){3}{\put(0,0){\line (0,1){2}}}\end{picture}

We have done now

Note:-

view the answer at desktop site for complete well shown diagram

Similar questions