User Tools

Site Tools


user:bh011695:star

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

user:bh011695:star [2010/03/25 20:47] – created bh011695user:bh011695:star [2010/03/25 20:48] (current) bh011695
Line 1: Line 1:
 +<file bash star.sh>
 +#!/bin/bash
 +#
 +#RADIUS=50
 +#RADIUS_SQUARED=$RADIUS*$RADIUS
 +xPos=( 50 50 50 50 50 )
 +yPos=( 10 15 25 50 150 )
 +ELEMENTS=5
 +. /home/ubuntu/scripts/xpaint_function.sh
  
 +xwit -root -warp 433 400
 +#Draws the bottom left of the circle
 +xSub=0
 +ySub=0
 +xte 'mousedown 1'
 +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 'mouseup 1'
 +</file>