|
MX-Spiral
6
24
681 bytes
1034 bytes
2003-10-31 00:00:00
2003-10-31 12:26:02
Oldes (oliva.david@seznam.cz)

Test spiral generation
|
|
background 153.165.139
;include %includes/txt_info.rswf
es: EmptySprite
shp_circle: shape [
fill color 255.255.255
;edge [color 0.0.0 width 3]
circle 5
]
spr_circle: Sprite shp_circle
exportAssets [spr_circle "circ"]
spr_spiral: sprite [
lines: place es
showFrame end
]
place spr_spiral [
at 160x160
actions [
load [
r: 20 i: 0 p: 0 c: 10
lx: ly: 0
lines.lineStyle(2 #661100 100)
lines.moveTo(0 r)
nextCircle: func[][
a: p + (i * (math.PI / c))
o: make object! [
_x: r * math.sin(a)
_y: r * math.cos(a)
]
;_root.info: rejoin [(math.sin(a)) " " o._x " " o._y]
lines.lineTo(o._x o._y)
attachMovie("circ" ("c" add i) (i + 10) o)
i++
;p: p + 0.5
c: c + 0.05
r: r + 1.1
]
]
enterFrame [
if i < 100 [nextCircle()]
]
]
]
stop
showFrame
end
|