|
![](/i/fill.gif) |
I don't know if this is related to Florian's earlier problem with
fields, but I'm getting some unusual effects with fields in MechSim with
MegaPov 1.0.
I'm trying to apply (different) forces to various parts of a model. The
test scene below has three masses, and a field with an x-gradient (this
is shown on the vertical plane). The field alternates between a positive
and a negative force, and the masses are spaced so that two are in the
center of the negative region and one is in the positive. However, all
of the masses move in tandem. There are no other gravity or environment
forces present. Is there an easy way to achieve what I want to do?
#version unofficial megapov 1.0;
#include "mechsim.inc"
#declare field_func =
pigment
{
gradient x
scale 2
translate 0.5*x
color_map
{
[0.0 rgb <0,0,1000>]
[1.0 rgb <0,0,-1000>]
}
}
global_settings {
max_trace_level 10
assumed_gamma 1
mechsim {
gravity <0, 0, 0>
method 2
#if (frame_number!=1)
step_count 300
time_step (1/30)/300
topology {
load_file "test.dat"
save_file "test.dat"
}
field {function
{pigment{field_func}}}
#else
step_count 0
topology {
#declare obj_dens = 2000;
#declare obj_stiff = 5000;
#declare obj_damp = 200;
mass { <0, 0, 0.95>, <0, 0, 0>, 0.2 density obj_dens }
mass { <1, 0, 0.95>, <0, 0, 0>, 0.2 density obj_dens }
mass { <-1, 0, 0.95>, <0, 0, 0>, 0.2 density obj_dens }
save_file "test.dat"
}
#end
}
}
MechSim_Show_All_Objects(-1,false, -1, "")
camera {
location <0, -10, 0.5>
direction y
sky z
up z
right (4/3)*x
look_at <0,0,1>
angle 30
}
light_source {
<3.2, -0.3, 1.8>*100000
color rgb <1.6, 1.5, 1.0>
}
sky_sphere {
pigment {
gradient z
color_map {
[0.00 rgb <0.8,0.9,1.0>]
[0.10 rgb <0.6,0.7,1.0>]
[0.25 rgb <0.2,0.3,0.8>]
}
}
}
plane { y, 0 pigment { field_func }}
Thanks,
--John
Post a reply to this message
|
![](/i/fill.gif) |