Urgent !! How to draw the diagonal lines of the cube under the shell script

Source: Internet
Author: User
Urgent !! How to draw the diagonal lines of the cube under the shell script-general Linux technology-Linux technology and application information, the following is a detailed description. How to draw the diagonal lines of the cube under the shell script
Below is the painting of four sides of the Quadrilateral, similar to this format to draw the diagonal line of the cube ....


52 count = 1 draw a vertical line
53 for (r = $1; count <= $ BOX_HEIGHT; r ++); do
54 plot_char $ r $2 $ VERT
55 let count = count + 1
56 done
57
58 count = 1
59 c = 'expr $2 + $ BOX_WIDTH'
60 for (r = $1; count <= $ BOX_HEIGHT; r ++); do
61 plot_char $ r $ c $ VERT
62 let count = count + 1
63 done
64
65 count = 1 draw a horizontal line
66 for (c = $2; count <= $ BOX_WIDTH; c ++); do
67 plot_char $1 $ c $ HORZ
68 let count = count + 1
69 done
70
71 count = 1
72 r = 'expr $1 + $ BOX_HEIGHT'
73 for (c = $2; count <= $ BOX_WIDTH; c ++); do
74 plot_char $ r $ c $ HORZ
75 let count = count + 1
76 done




122 clear
123 R = 15
124 C = 15
125 H = 20
126 W = 40
127 col = 1
Draw_box $ R $ C $ H $ W $ col

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.