This shows you the differences between two versions of the page.
user:bh011695:star [2010/03/25 20:47] – created bh011695 | user:bh011695:star [2010/03/25 20:48] (current) – bh011695 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <file bash star.sh> | ||
+ | #!/bin/bash | ||
+ | # | ||
+ | #RADIUS=50 | ||
+ | # | ||
+ | xPos=( 50 50 50 50 50 ) | ||
+ | yPos=( 10 15 25 50 150 ) | ||
+ | ELEMENTS=5 | ||
+ | . / | ||
+ | xwit -root -warp 433 400 | ||
+ | #Draws the bottom left of the circle | ||
+ | xSub=0 | ||
+ | ySub=0 | ||
+ | xte ' | ||
+ | while [ $xSub -lt $ELEMENTS ]; do | ||
+ | xwit -root -rwarp ${xPos[$xSub]} ${yPos[$ySub]} | ||
+ | let xSub=$xSub+1 | ||
+ | let ySub=$ySub+1 | ||
+ | done | ||
+ | |||
+ | #Draws the bottom right | ||
+ | xSub=4 | ||
+ | ySub=4 | ||
+ | while [ $xSub -ge 0 ]; do | ||
+ | xwit -root -rwarp ${xPos[$xSub]} -${yPos[$ySub]} | ||
+ | let xSub=$xSub-1 | ||
+ | let ySub=$ySub-1 | ||
+ | done | ||
+ | |||
+ | #Draws the top right | ||
+ | xSub=0 | ||
+ | ySub=0 | ||
+ | while [ $xSub -lt $ELEMENTS ]; do | ||
+ | xwit -root -rwarp -${xPos[$xSub]} -${yPos[$ySub]} | ||
+ | let xSub=$xSub+1 | ||
+ | let ySub=$ySub+1 | ||
+ | done | ||
+ | #Draws the top left | ||
+ | xSub=4 | ||
+ | ySub=4 | ||
+ | while [ $xSub -ge 0 ]; do | ||
+ | xwit -root -rwarp -${xPos[$xSub]} ${yPos[$ySub]} | ||
+ | let xSub=$xSub-1 | ||
+ | let ySub=$ySub-1 | ||
+ | done | ||
+ | xte ' | ||
+ | </ |