POV-Ray : Newsgroups : povray.unofficial.patches : MegaPOV Plus ipf_profile problem Server Time
2 Sep 2024 04:19:37 EDT (-0400)
  MegaPOV Plus ipf_profile problem (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Margus Ramst
Subject: MegaPOV Plus ipf_profile problem
Date: 17 Jul 2000 16:52:02
Message: <397363FD.44B2276A@peak.edu.ee>
Anybody have any success using the ipf_profile feature in Chris's patch?
Running 0.2.5 (Windows compile), I get "Singular matrix in MInvers" whenever I
try to use ipf_profile (type 1 or 2). The simulation completes OK, then parse
exits with the aforementioned error.
Example (sligtly modified from particleFalls.pov):

particle_system {
        wind < 0, 0, 0>
        iterations 250
        time 200
        environment object {Floor}
        threshold 1.5
                                
        particle_emitter {
                location < 0, 4.1, 0>
                radius 0.3
                lifespan 1000
                rate 5
                direction < 0, 0.2, 0>
                ipf_profile {
                    2, .005,
                    .5, 2
                }
        }

        texture {
                pigment {color rgb < 0.7, 0.75, 1>}
        }
}

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

From: Chris Huff
Subject: Re: MegaPOV Plus ipf_profile problem
Date: 17 Jul 2000 18:24:55
Message: <chrishuff-8C517C.17252517072000@news.povray.org>
In article <397363FD.44B2276A@peak.edu.ee>, Margus Ramst 
<mar### [at] peakeduee> wrote:

> Anybody have any success using the ipf_profile feature in Chris's patch?
> Running 0.2.5 (Windows compile), I get "Singular matrix in MInvers" 
> whenever I try to use ipf_profile (type 1 or 2). The simulation 
> completes OK, then parse exits with the aforementioned error.

My first thought is that NaN values are getting into the simulation 
somewhere, and messing up the particle stretch calculations.
There is a bug in the particle stretch feature, one of the variables is 
left uninitialized, so you have to manually turn it off by using 
"particle_stretch 0,0" if you don't want to use this feature. This will 
be fixed in the next version.

As for the ipf feature...my advice would be not to use it right now. It 
is still very imperfect, and I will be making some changes in the future 
to allow multiple fluid types. For one thing, the internal function 
doesn't work with falloff values below 1 or even values above 1. Since 
you used 2 as the exponent, it won't behave as it should.

-- 
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

From: Margus Ramst
Subject: Re: MegaPOV Plus ipf_profile problem
Date: 17 Jul 2000 19:11:07
Message: <39738497.A75CD4CC@peak.edu.ee>
Chris Huff wrote:
> 
> As for the ipf feature...my advice would be not to use it right now. It
> is still very imperfect, and I will be making some changes in the future
> to allow multiple fluid types. For one thing, the internal function
> doesn't work with falloff values below 1 or even values above 1. Since
> you used 2 as the exponent, it won't behave as it should.
> 

Thanks.
One more thing: the probem also seems to occur on the first (non-ipf) run after
the ipf run. Consecutive runs (unmodified) are OK.

Out of curiosity, if you feel like explaining, how is the inter-particle
collision implemented? It takes lot of time, which is understandable, but it
strikes me as slow even with a very small ipf_distance (if I understand its
purpose correctly). Are you already using some sorting algorithm, like kd-tree
or oct-tree, to optimize things?

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

From: Chris Huff
Subject: Re: MegaPOV Plus ipf_profile problem
Date: 17 Jul 2000 21:11:45
Message: <chrishuff-75BABC.20121517072000@news.povray.org>
In article <39738497.A75CD4CC@peak.edu.ee>, Margus Ramst 
<mar### [at] peakeduee> wrote:

> Thanks.
> One more thing: the probem also seems to occur on the first (non-ipf) 
> run after the ipf run. Consecutive runs (unmodified) are OK.

So you run the simulation with inter-particle forces, then run it 
without, and *then* it aborts parsing? Sounds like some variable isn't 
being initialized...


> Out of curiosity, if you feel like explaining, how is the 
> inter-particle collision implemented?

It isn't...the particles are points, with no size. "IPF" stands for 
Inter-Particle Forces. Basically, each particle is pushed toward or away 
from it's neighboring particles within the ipf distance, with a force 
that depends on the distance. Positive values attract, negative values 
repel(or is it the other way around...?). The default function produces 
a symmetrical curve going from +1 to -1, with a relatively flat area in 
the middle, which pulls toward more distant particles and pushes away 
from nearer particles. The spline ("custom" profile) option allows you 
to specify the curve with a spline {} instead of using the built-in 
function. Particles outside the ipf distance are ignored.

I am thinking of adding a type of "solid" particles which *would* have 
collision, but I need to learn more about simulating rigid object 
collisions first. This is something I can't seem to figure out on my 
own...the only ways I can think of would be very computationally 
expensive.


> It takes lot of time, which is understandable, but it strikes me as 
> slow even with a very small ipf_distance (if I understand its purpose 
> correctly). Are you already using some sorting algorithm, like 
> kd-tree or oct-tree, to optimize things?

I haven't implemented any kind of sorting yet, though I plan to. 
Currently, every particle has to be checked for distance, so every 
particle has to be compared against every particle in existence for 
distance, once for every iteration. This is why it is so slow.
I will probably use some kind of tree of nested, overlapping 
boxes(octree?), though it is still in the planning stages. One of the 
problems is that it will have to cope with particles moving from one 
area of space to the next.
Oh, and what is a kd-tree? I have heard of it, and I know it is some 
sort of data structure, but that is the limit of my knowledge.
Any suggestions for optimization techniques for this would be welcome.
Also, something similar may be used to bound the generated blob shape 
more efficiently, and could also be used to optimize the blob pattern...

-- 
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

From: Margus Ramst
Subject: Re: MegaPOV Plus ipf_profile problem
Date: 18 Jul 2000 00:11:02
Message: <3973CAE0.332679B@peak.edu.ee>
Chris Huff wrote:
> 
> So you run the simulation with inter-particle forces, then run it
> without, and *then* it aborts parsing? Sounds like some variable isn't
> being initialized...

Strange, it sometimes happens without running ipf previously (although that
seems to be a sure-fire way). Haven't found the connection yet.

> 
> It isn't...the particles are points, with no size. "IPF" stands for
> Inter-Particle Forces. Basically, each particle is pushed toward or away
> from it's neighboring particles within the ipf distance, with a force
> that depends on the distance.

I see. Actually, I think this is sufficient in most cases, especially with
liquids. As for the "solid" particles - I don't think inter-particle collision
and deflection would be at all expensive for spherical particles, and
prohibitively expensive for most other shapes. What physical properties would be
needed? Collision is easy, deflection and impact energy absorption too, friction
I'm not so sure about... What else?

BTW, I found an interesting page discussing sorting algorithms for particle
systems (specifically kd-trees and Barnes-Hut trees). I saw no actual code, but
pretty informative nevertheless. The URL is:
http://physics.gmu.edu/~large/lr_forces/lr_general.html

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

From: Pabs
Subject: Re: MegaPOV Plus ipf_profile problem
Date: 18 Jul 2000 00:37:12
Message: <3973DF2C.2ED10B3F@hotmail.com>
Margus Ramst wrote:

> > It isn't...the particles are points, with no size. "IPF" stands for
> > Inter-Particle Forces. Basically, each particle is pushed toward or away
> > from it's neighboring particles within the ipf distance, with a force
> > that depends on the distance.
>
> I see. Actually, I think this is sufficient in most cases, especially with
> liquids. As for the "solid" particles - I don't think inter-particle collision
> and deflection would be at all expensive for spherical particles, and
> prohibitively expensive for most other shapes. What physical properties would be
> needed? Collision is easy, deflection and impact energy absorption too, friction
> I'm not so sure about... What else?

What about rotation effects - where as 2 spheres are moving through space they
rotate around an axis and when they collide their subsequent movements, velocities &
rotations depend on both the velocities and rotation axes of the two particles.
--
Bye
Pabs


Post a reply to this message

From: Margus Ramst
Subject: Re: MegaPOV Plus ipf_profile problem
Date: 18 Jul 2000 00:44:34
Message: <3973D2BD.A92017E7@peak.edu.ee>
Pabs wrote:
> 
> 
> What about rotation effects - where as 2 spheres are moving through space they
> rotate around an axis and when they collide their subsequent movements, velocities &
> rotations depend on both the velocities and rotation axes of the two particles.

Yes, but is this really worth the computational expense? I suspect the spin of
individual particles has little perceptible effect on the overall behaviour a
large particle system.

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

From: Margus Ramst
Subject: Re: MegaPOV Plus ipf_profile problem
Date: 18 Jul 2000 01:01:15
Message: <3973D6A4.7B4276EB@peak.edu.ee>
Some more potentially interesting resources.

The first has a PS paper and source code of a density-based particle sorting
mechanism (uses kd-trees):
http://www.sns.ias.edu/~eisenste/hop/hop.html

And a brief description of kd-trees:
http://web.mit.edu/napoli/www/6.838/kd.html


-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

From: Pabs
Subject: Re: MegaPOV Plus ipf_profile problem
Date: 18 Jul 2000 01:07:16
Message: <3973E637.34F973E@hotmail.com>
Margus Ramst wrote:

> Yes, but is this really worth the computational expense? I suspect the spin of
> individual particles has little perceptible effect on the overall behaviour a
> large particle system.

I think when considering *Solid Particles* or balls/spheres we are getting out of the
_particle_ domain (aren't particles 1D not 3D) & into the physics of solid objects a
bit
more, which is a lot more complex than that of particles.
--
Bye
Pabs


Post a reply to this message

From: Margus Ramst
Subject: Re: MegaPOV Plus ipf_profile problem
Date: 18 Jul 2000 01:18:52
Message: <3973DAC6.302D37D8@peak.edu.ee>
Pabs wrote:
> 
> I think when considering *Solid Particles* or balls/spheres we are getting out of
the
> _particle_ domain (aren't particles 1D not 3D) & into the physics of solid objects a
bit
> more, which is a lot more complex than that of particles.

They are still particles in the sense of being elements in a very large set,
where the contribution of the individual is relatively small. It's a case of
diminishing returns. I think the physics model of individual particles needn't
be, and cannot be, as accurate as, say, when simulating the collision of just
two big spheres.

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.