I needed to do an arc-type thing and came up with this code (no media needed, but you might need to update your setup.agc to allow 800,800):
dim a_spr[500]
SetVirtualResolution(800, 800)
// values to play with
// set the random start/stop both to zero for perfect curve
ang1 = 0 // start angle, 0 is straight down from the center
ang2 = 180 // stop angle
astep = 20 // increment for setting use angle
rad# = 100 // radius from center to nominal curve edge
rnd1 = 2 // lowest random value to add
rnd2 = 10 // highes random value to add
cx# = 400 // center x position
cy# = 400 // center y position
// display the center
c_spr = CreateSprite(0)
SetSpriteSize(c_spr,5,5)
SetSpriteColor(c_spr,255,255,0,255)
SetSpriteOffset(c_spr,3,3)
SetSpritePositionByOffset(c_spr,cx#,cy#)
// make the arc
for ang=ang1 to ang2 step astep
// get a random bit
irnd = Random(rnd1,rnd2)
// add to the values used
uang = ang + irnd
urad# = rad# + irnd
// get the position
x2# = urad# * Sin(uang) + cx#
y2# = urad# * Cos(uang) + cy#
// create a sprite
i_spr = CreateSprite(0)
SetSpriteSize(i_spr,5,5)
SetSpriteColor(i_spr,255,0,255,255)
SetSpriteOffset(i_spr,3,3)
SetSpritePositionByOffset(i_spr,x2#,y2#)
// store for cleanup
a_spr[ang] = i_spr
next ang
do
Sync()
loop
// clean up
DeleteSprite(c_spr)
for cnt=ang1 to ang2 step astep:DeleteSprite()a_spr[cnt]:next cnt
Varying the random values to large ones has interesting effects.
And, boy, do we need air conditioning in Northern Virginia. Our weather system is reporting 36.10 celsius (96.62 fahrenheit), but only 26% humidity. I'm staying inside.
Cheers,
Ancient Lady