yafray-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Yafray-devel] "nan" points.


From: Alejandro Conty Estevez
Subject: Re: [Yafray-devel] "nan" points.
Date: Tue, 31 Dec 2002 15:47:33 +0100
User-agent: Mutt/1.3.28i

> Yes, but the problem is that "nan" (from blender or C code ...) is not
> "None" from python!!
> The only idea I got is to verify for every point that it is a part of a
> triangle...I don't think it is a nice solution (O(n²)?).

O(n) if you use an extra vector to mark if a point is part of a face.
This is pseudo code:

boolvector used;

for i in used:
        i=false;

for f in faces:
        used[f.a]=true;
        used[f.b]=true;
        used[f.c]=true;

It's not memory efficent, but is better than the O(n^2) solution. Of
course would be better to know if a float equals to nan. Maybe in
www.python.org there is something bout it. Let me take a look...
I don't find anything. Try to compare it with "nan" maybe it returns a
string, you never know what the type is with python.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]