Posts: 2,404
Threads: 153
Joined: Jan 2005
Okay, a simple game that shouldn't take but 5mins of your time.
Object: Make a circle using PSET
RULES:
1. Ten lines or under to be fair... (Can be done in six :wink: )
2. No use of colins " : " <- those
3. Any radius you want if its in the screen
4. Must be round if that makes since..
5. Only one PSET can be used..
6. QB or FB, just note on which, or use the matching Syntax tag.
Get all that? Now try it..

.. Good luck!
Kevin (
x.t.r.GRAPHICS)
Posts: 1,057
Threads: 156
Joined: Aug 2003
Code:
CLS
SCREEN 13
rad = (3.14159265#) / 180
FOR i = 1 TO 361 STEP .5
oldx = x: oldy = y
x = INT(50 * (COS(rad * i))) + 160
y = INT(50 * (SIN(rad * i))) + 100
PSET (x, y), 15
NEXT
Posts: 1,774
Threads: 62
Joined: Aug 2003
OK, why not?
Code:
Screen 18, 32
Do While InKey$=""
Y=(Y+1)Mod 480
For X = 0 to 639
If ABS(SQR((320-X)^2 + (240-Y)^2))<= 255 then PSet(X,Y),RGB(0,0,255-ABS(SQR((320-X)^2 + (240-Y)^2)))
Next
Loop
Posts: 442
Threads: 107
Joined: Feb 2005
here's mine
Code:
screen 13
dim as integer x, y, xmov, ymov
dim as double angle
x = 25 : y = 25
do : angle = angle + .01
xmov = x * sin(angle) + y * cos(angle)
ymov = y * sin(angle) - y * cos(angle)
pset (xmov + 160,ymov + 100),4 : loop
yay, its a circle :bounce:
ah crap... no colons, well, i guess its back to the drawing board
url=http://www.random-seed.net]
![[Image: asylumsig.png]](http://www.random-seed.net/files/asylumsig.png)
[/url]
Posts: 442
Threads: 107
Joined: Feb 2005
and w/ a little more work (3 minits) i've came up w/ the answer
Code:
screen 13
dim as integer xmov,ymov,angle
do
angle = angle + 1
xmov = 25 * sin(angle) + 25 * cos(angle)
ymov = 25 * sin(angle) - 25 * cos(angle)
pset (xmov + 160,ymov + 100),4
loop
does that qualify.... i win! :bounce:
uh, make this official freebasic submission
url=http://www.random-seed.net]
![[Image: asylumsig.png]](http://www.random-seed.net/files/asylumsig.png)
[/url]
Posts: 442
Threads: 107
Joined: Feb 2005
ah, and here's my qbasic version
Code:
screen 13
for i = 1 to 360
xmov = 25 * sin(i) + 25 * cos(i)
ymov = 25 * sin(i) - 25 * cos(i)
pset (xmov + 160,ymov + 100),4
next
so, make it official, this is my qbasic submission
url=http://www.random-seed.net]
![[Image: asylumsig.png]](http://www.random-seed.net/files/asylumsig.png)
[/url]
Posts: 1,272
Threads: 36
Joined: Feb 2003
Code:
SCREEN 13
PSET STEP(0, 0), 15
Sure the pixel may be square, but it's the best approximation possible of a circle with radius 0.5 pixels. :bounce:
Posts: 442
Threads: 107
Joined: Feb 2005
well, Sterling beat me :normal:
url=http://www.random-seed.net]
![[Image: asylumsig.png]](http://www.random-seed.net/files/asylumsig.png)
[/url]
Posts: 2,771
Threads: 96
Joined: Oct 2003
Quote:(Can be done in six :wink: )
Six? Six is for noobs

j/k
Code:
SCREEN 13
FOR i = 1 TO 360
PSET (SIN(i * 3.14 / 180) * 30 + 160, COS(i * 3.14 / 180) * 30 + 100)
NEXT
Posts: 480
Threads: 24
Joined: Mar 2003
3 lines:
[syntax="QBASIC"]FOR i! = -.5 TO 360 STEP .5
IF i! = -.5 THEN SCREEN 13 ELSE PSET (160 + COS(i! * 3.14 / 180) * 50, 100 + SIN(i! * 3.14 / 180) * 50), 15
NEXT i![/syntax]