just a little preview of what's to come. Using a series of hermite splines, a path is created. Particles(plane objects) then follow this path continuously. I'll be making an editor so you can draw the path you want, along with a function so that you can load and run the files for the particle effects. So if you want something a little different than the typical "fountain" particle effect, just wait for this.
rem setup system
sync on
sync rate 60
randomize timer()
color backdrop rgb(128,128,128)
rem catmullrom vector order: control, pt1, pt2, control
rem hermite vector order: pt1, control, pt2, control
type vector
x as float
y as float
z as float
endtype
rem 2 vectors as line segment's endpoints, 2 vectors for control points
type hermiteline
a as vector
b as vector
c as vector
d as vector
endtype
rem time value, position on spline(between 0 and 1)
rem spline number, which section of the whole spline the particle is currently on
rem speed - how fast the time value increments (acts like velocity)
rem obj - particle object number
type particle
time as float
spline as integer
speed as float
obj as integer
endtype
rem vector points for hermite splines
null = make vector3(1)
null = make vector3(2)
null = make vector3(3)
null = make vector3(4)
rem result vector
null = make vector3(5)
rem number of points defining hermite spline
spline_total = 5
rem array of hermite splines
dim spline(spline_total) as hermiteline
value = 1000
for t = 1 to spline_total
if t > 1
spline(t).a.x = spline(t-1).c.x
spline(t).a.y = spline(t-1).c.y
spline(t).a.z = spline(t-1).c.z
spline(t).b.x = spline(t-1).d.x
spline(t).b.y = spline(t-1).d.y
spline(t).b.z = spline(t-1).d.z
else
spline(t).a.x = rnd(value)
spline(t).a.y = rnd(100)-50
spline(t).a.z = rnd(value)
spline(t).b.x = rnd(value)
spline(t).b.y = rnd(100)-50
spline(t).b.z = rnd(value)
endif
spline(t).c.x = rnd(value)
spline(t).c.y = rnd(100)-50
spline(t).c.z = rnd(value)
spline(t).d.x = rnd(value)
spline(t).d.y = rnd(100)-50
spline(t).d.z = rnd(value)
next t
rem array of particles
p_total = 50
dim particles(p_total) as particle
rem create particles
for t = 1 to p_total
make object plain t, 15,15
xrotate object t,180
particles(t).time = rnd(100)/100.0
particles(t).spline = rnd(spline_total-1)+1
particles(t).speed = 0.0005 + rnd(500)/100000.0
particles(t).obj = t
next t
rem world space reference object
make matrix 1,1000,1000,10,10
rem start and end points of path
make object sphere 998,20 : position object 998,spline(1).a.x,spline(1).a.y,spline(1).a.z
make object sphere 999,20 : position object 999,spline(spline_total).c.x,spline(spline_total).c.y,spline(spline_total).c.z
position camera 0,200,-100
point camera 250,0,250
do
rem update particle position
for t = 1 to p_total
rem which spline segment particle is on
r = particles(t).spline
rem get the 4 vectors
set vector3 1,spline(r).a.x,spline(r).a.y,spline(r).a.z
set vector3 2,spline(r).b.x,spline(r).b.y,spline(r).b.z
set vector3 3,spline(r).c.x,spline(r).c.y,spline(r).c.z
set vector3 4,spline(r).d.x,spline(r).d.y,spline(r).d.z
rem create the hermite spline and store position into vector "5"
hermite vector3 5,1,2,3,4,particles(t).time
rem position the particle at the new coordinates
position object particles(t).obj, x vector3(5), y vector3(5), z vector3(5)
set object to camera orientation particles(t).obj
rem update variables
particles(t).time = particles(t).time + particles(t).speed
if particles(t).time > 1
particles(t).time = 0
particles(t).spline = particles(t).spline + 1
if particles(t).spline > spline_total then particles(t).spline = 1
endif
next t
sync
loop
"eureka" - Archimedes