
-----------------------------------
Misha
Tue Oct 05, 2004 5:00 pm

crazy circles
-----------------------------------
this is my cool random circle program. the circles go crazy!

[code]
% Sept 27 2004
% input: there is no input
% output: draw a random sized circle anywhere on the screen
%---------------------------------
var x,y,x2,y2,col : int

randomize
loop

randint (x,20,500)
randint (y,20,500) 
randint (x2,1,100)
randint (y2,1,100)
randint (col,1,30)
drawfilloval (x,y,x2,y2,col)

end loop 
[/code]

-----------------------------------
Paul
Tue Oct 05, 2004 5:37 pm


-----------------------------------
ooo! we should have a poll asking how many of us has done that at one time or another, I'd be expecting a high number.
BTW, try drawfillpolygon 
I had some fun with that

-----------------------------------
Dan
Tue Oct 05, 2004 8:58 pm


-----------------------------------
i like doing it with just draw.dot (or w/e the comand for just one pixeal is) then puting it in a infitenloop and fullscreen. It looks kind of like a messed up t.v. Tho it is intresting to know that in theroy if u randomly pic a color for every pixel on the screen you could have the posbility of making any pic or even a video if it is in the loop. Just that the odds are so very very very low tho.

-----------------------------------
Paul
Tue Oct 05, 2004 9:59 pm


-----------------------------------
something like this?

var WinID:= Window.Open ('graphics: 319, 319, nobuttonbar')
Window.SetPosition (WinID,300 ,200)
var b: int
loop
for decreasing a: maxy..1
for c: 1..maxx
randint (b, 22, 30)
Draw.Dot (c, a, b)
end for
end for
end loop


-----------------------------------
djlenny_3000
Wed Oct 06, 2004 8:23 am


-----------------------------------
hey misha #1 i recomend taking of the header for *cough* privacy #2 everyone in our compsci class made  that program

-----------------------------------
gigaman
Wed Oct 06, 2004 8:43 am


-----------------------------------
misha our whole class has a copy of that prgram. oh and paul is right drawfillpolygon is fun

-----------------------------------
Paul
Wed Oct 06, 2004 10:45 am


-----------------------------------
misha our whole class has a copy of that prgram. oh and paul is right drawfillpolygon is fun
no kidding, show this to ur class lol

setscreen ("graphics: max;max;offscreenonly") 
var number: int 
put "How many sides?" 
get number 
colorback (black) 
cls 
var x : array 1 .. number of int 
var y : array 1 .. number of int 
var incx: array 1..number of int 
var incy: array 1..number of int 
for a: 1..number 
randint (x(a), 100, maxx-100) 
randint (y(a), 100, maxy-100) 
incx(a):=Rand.Int(-5,5) 
incy(a):=Rand.Int(-5,5)  
end for 
loop 
for a: 1..number 
x(a)+=incx(a) 
y(a)+=incy(a) 
end for 
drawfillpolygon (x, y, number, 12) 
View.Update 
cls 
for a: 1..number 
if y(a)>=maxy or y(a) 