|
|
This is just a very simple particle system for simulating smoke. It
should work fine in the official version, it doesn't use any MegaPOV
features.
//*******************************************
#macro SRand(Seed) (rand(Seed)*2 - 1)#end
#declare RS = seed(6463681);
#declare Wind = < 1, 0, 0>;
#declare Drag = 0.25;
#declare Buoyancy = 0.1;
#declare StartTemperature = 5;
#declare CoolRate = 0.7;
#macro SmokeParticle(Iter, StartPos, StartVel, Radius, RandRadius,
Jitter)
#local Pos = StartPos;
#local Vel = StartVel + < SRand(RS)*Jitter, SRand(RS)*Jitter,
SRand(RS)*Jitter>;
#local T=StartTemperature;
#local J=0;
#while(J < Iter)
#local T = T*CoolRate;
#local Force = y*T*Buoyancy + (Wind - Vel)*Drag;
#local Vel = Vel + Force;
#local Pos = Pos + Vel;
#local J=J+1;
#end
sphere {Pos, Radius+RandRadius*rand(RS)}
#end
union {
#declare Wind = < 0, 0, 0>;
#declare Pos = < 8, 0.5, 0>;
#declare J=0;
#declare Parts=150;
#while(J < Parts)
SmokeParticle(25*(1-J/Parts), Pos, y*1.5, 0.25, 0.25, 0.5)
SmokeParticle(25*(1-J/Parts), Pos, y*1.5, 0.25, 0.25, 0.5)
#declare Pos = Pos - x*0.1;
#declare J=J+1;
#end
difference {
cylinder {< 0,-0.5, 0>, < 0, 2, 0>, 1.5}
cylinder {< 0, 0, 0>, < 0, 3, 0>, 1.45}
texture {
pigment {color Yellow}
}
translate Pos
}
texture {
pigment {color White}
// pigment {color White*0.2 transmit 0.75}
// pigment {color White filter 0.9}
}
scale 0.5
}
//*******************************************
--
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
|
|
|
In article <39845138.D8F1DAB2@pacbell.net>, lin### [at] povrayorg
wrote:
> How did you manage to resist the temptation ? :)
It wasn't easy. Actually, the actual scene used image_width and
image_height to readjust the camera when changing aspect ratios...and I
almost made a more powerful macro using my transform patch and/or the
spline patch(the one I like, with the spline {} syntax). Then there was
the compulsion to do it all with my particle_system patch, or to add the
ability to control it using eval_pigment()...but I managed to hold
myself back. :-)
--
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
|