Sponsored Content
Full Discussion: Drawing
Top Forums Shell Programming and Scripting Drawing Post 81710 by Ygor on Tuesday 23rd of August 2005 11:38:00 AM
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:
                    *******
                 ****      ***
                **           **
               **             **
              **                *
             **                 **
            **                   **
            *                     *
            *                     *
           *                      **
           *                       *
           *                       *
           *                       *
           *                       *
           *                       *
           **                      *
            *                     *
            *                     *
            **                   **
             **                 **
              **               **
               **             **
                **           **
                 ***       ***
                    *******

 

5 More Discussions You Might Find Interesting

1. 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

2. 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

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. 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

5. 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
IGAWK(1)							 Utility Commands							  IGAWK(1)

NAME
igawk - gawk with include files SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ... igawk [ all gawk options ] [ -- ] program-text file ... DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1). AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like @include getopt.awk in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path. OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports. EXAMPLES
cat << EOF > test.awk @include getopt.awk BEGIN { while (getopt(ARGC, ARGV, "am:q") != -1) ... } EOF igawk -f test.awk SEE ALSO
gawk(1) Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995. AUTHOR
Arnold Robbins (arnold@skeeve.com). Free Software Foundation Nov 3 1999 IGAWK(1)
All times are GMT -4. The time now is 03:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy