Right... That does make sense except for the "draw the point"...
Shouldn't that have an X and Y coordinate?
It does: it's the sum of two other points with an x and y coordinate. I'm
mostly a Director person so these vector sums are done natively: Flash
doesn't do anything so useful. But hopefully this should work.
I've just tested it in Lingo, and it works pretty well. If it's any help,
I've attached the code here. Translating to actionScript shouldn't be too
hard.
on drawWobble a, b, wobbliness
if voidp(b) then b=random(100)+10
if voidP(a) then a=random(100)+10
if voidP(wobbliness) then wobbliness=(a*a+b*b)/1000.0 -- seems to give
pretty good results
pts=[]
errorFactor=0
mx=random(100)+50
repeat with i=0 to mx
q=i*8*pi/100 -- average of four loops
p=point(a*sin(q), b*cos(q))
norm=point(b*sin(q) , a*cos(q))
norm=norm/sqrt(norm[1]*norm[1]+norm[2]*norm[2]) -- make it unit length
pts.add(p+norm*errorFactor)
errorFactor=errorFactor+random(100)*wobbliness*0.01-wobbliness/2
if abs(errorFactor)>10 then errorFactor=errorFactor*0.95 -- hold it in if
deviating too far
end repeat
-- add drawing code here
end
HTH
Danny
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders