Drawing


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Drawing
# 1  
Old 08-22-2005
Drawing

Hi,

Is it possible to draw circle, box and other basic shapes using shell scripts ?

If so can anyone please tell as how to do it.

Thanks in advance.
# 2  
Old 08-22-2005
MySQL

To my understanding if you are expecting to draw basic shapes on a "telnet" session then at most you can achieve is character based shapes. As telnet is a charater based application.

To draw character based shapes I dont think its going to be that difficult Smilie though not as accurate you expect
# 3  
Old 08-23-2005
It is possible to arbitrarily set the cursor to some position, then write from there. See the TERMCAP database and tput (man tput) how that works and which limitations this procedure has.

Hope this helps
bakunin
# 4  
Old 08-23-2005
Just for fun...
Code:
awk -v X=12 -v Y=40 -v radius=12 'BEGIN{
  pi=3.142857
  system("tput clear")
  for(i=0 ;i<=359 ;i++){
    cmd=sprintf("tput cup %s %s", \
      int(.5 + X + (sin(i*pi/180)*radius)), \
      int(.5 + Y + (cos(i*pi/180)*radius)) )
    system(cmd)
    printf "*"
  }
  system("tput home")
}'

Not very circular...
Code:
                    *******
                 ****      ***
                **           **
               **             **
              **                *
             **                 **
            **                   **
            *                     *
            *                     *
           *                      **
           *                       *
           *                       *
           *                       *
           *                       *
           *                       *
           **                      *
            *                     *
            *                     *
            **                   **
             **                 **
              **               **
               **             **
                **           **
                 ***       ***
                    *******

Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Server room drawing software

Hello All, I want to get ride of Excel/word and want some software to draw my server room racks/server and overall topology. Please share you opinion/experience. thanks inadvance (1 Reply)
Discussion started by: Vit0_Corleone
1 Replies

2. Post Here to Contact Site Administrators and Moderators

Question Regarding Megabits Drawing

Dear Admins / Mods, I have been trying my luck with Megabits Drawing few times ;) but I am not sure how it works! :confused: http://i49.tinypic.com/2ake15f.jpg I have few questions:- Why this page for me is still showing 3 Lotto & 4 SuperForumLotto purchased even after the drawing... (22 Replies)
Discussion started by: Yoda
22 Replies

3. Programming

problems with drawing in x using xlib

Hi all, I'm currently learning xlib and I've encountered a bizarre mistake: function calls such as XDrawPoint, XDrawLine, etc., don't seem to work; a blank window with nothing in is appears. I believe this has something to do with the window manager I use, fluxbox. After checking the code and... (0 Replies)
Discussion started by: hydronium
0 Replies

4. Programming

[ C++ ] Drawing Program.

I made a program that prints dots and lines in a Page. So far that's all i could come up with. When i try to print the lines and the dots it just prints consecutive points,I want it to print the points & lines in the page's coordinates. I have been stuck for a long time now. Please Help. ... (12 Replies)
Discussion started by: Max_Payne
12 Replies

5. Programming

Line-drawing character!

Hi guys, I'm trying to make my program to print out tables usings line-drawing character (alternate char. set) with Curses Library. However, it always prints out control characters (^@) instead of the correct ones. code example: mvwaddch(my_window, 23, 12, ACS_RTEE); appreciate your help,... (5 Replies)
Discussion started by: zecoj
5 Replies
Login or Register to Ask a Question