Thanks, Daemon.
@Netmon: Cool function. I changed the code to use lines instead of dots. The lines look better and more solid now (at least from what I've tested)
Function bline(x1,y1,vx1,vy1,x2,y2,vx2,vy2)
`put a v in front of the first set of x2 and y2 to make a curve
t as float
stp as float
stp = sqrt((x1-x2)^2+(y1-y2)^2)
print stp
print 1/stp
stp = 1/stp
For t = 0 to 1 Step stp
px# = x1*(1-t)^3 + 3*vx1*(1-t)^2*t + 3*vx2*(1-t)*t^2 + x2*t^3
py# = y2*(1-t)^3 + 3*vy1*(1-t)^2*t + 3*vy2*(1-t)*t^2 + y2*t^3
`uncomment the two lines above to make a curve
` px# = x1*(1-t) + x2*t
` py# = y1*(1-t) + y2*t
if t=0 then opx#=px# : opy#=py#
line opx#,opy#, px#,py#
opx#=px#
opy#=py#
next t
EndFunction
In Daemon's example:
randomize timer()
sw=screen width()
sh=screen height()
for i=1 to 100
bline(rnd(sw),rnd(sh),rnd(sw),rnd(sh),rnd(sw),rnd(sh),rnd(sw),rnd(sh))
next i
wait key
end
Function bline(x1,y1,vx1,vy1,x2,y2,vx2,vy2)
`put a v in front of the first set of x2 and y2 to make a curve
t as float
stp as float
stp = sqrt((x1-x2)^2+(y1-y2)^2)
print stp
print 1/stp
stp = 1/stp
For t = 0 to 1 Step stp
px# = x1*(1-t)^3 + 3*vx1*(1-t)^2*t + 3*vx2*(1-t)*t^2 + x2*t^3
py# = y2*(1-t)^3 + 3*vy1*(1-t)^2*t + 3*vy2*(1-t)*t^2 + y2*t^3
`uncomment the two lines above to make a curve
` px# = x1*(1-t) + x2*t
` py# = y1*(1-t) + y2*t
if t=0 then opx#=px# : opy#=py#
line opx#,opy#, px#,py#
opx#=px#
opy#=py#
next t
EndFunction