On Fri, Jun 29, 2012 at 12:46 PM, phoenix <284281...@qq.com> wrote:
> Hi,
> In the last couple of days I have implemented the b-rep conversion function
> for superell. When n <= 2 and e <= 2, it produces the exact same result as
> we want, but when one of them is greater then two, they are slightly
> different.

Different from the implicit form or different from examples elsewhere?

> (This may result from the non-smooth surface of the super
> ellipsoid when n or e > 2, as the NURBS surfaces always tend to be smooth.)

Can you post a few pictures illustrating the problem?  If you need
sharp corners, I think there may be a way to do that (if nothing else
using multiple surfaces, but there may be other options as well.)

> And I also looked into other primitives, and have some questions. As for the
> 'grip' primitive, is it something like half? I found it does not show in 
> raytracing.
> So, in what situation do we usually use this primitive? And for
> what purpose?

IIRC, grip is used to describe relationships between other primitives
- it doesn't have a shape itself.  So it's not a candidate for NURBS
conversion.

> Besides, I'm also quite confused with the 'cline' primitive.
> Its detailed name is FASTGEN4 CLINE, and FASTGEN4 is another data format.
> After I raytrace this primitive in different views, I still cannot imagine
> what its shape should be. So, could someone please figure it out?

The best I can offer is the following from the documentation of the
system from which cline originally comes:
http://bzflag.bz/~starseeker/cline.pdf

If the raytrace results of cline are view dependant (I don't recall
for sure) then it cannot be represented properly as a NURBS brep in
any case.

> At this time, most primitives already have implemented b-rep conversion
> functions and the functions works quite well, and I will still test the
> results and modify the code if there's some problems. And, what else can I
> do besides the testing and modifying? Could someone please give me some
> suggestions?

Well, if you want to undertake the next phase (going from unevaluated
CSG trees to evaluated ones) the problem that needs to be addressed is
the so-called "surface-surface" intersection problem.

Starting with a simple example - let's say you have two spheres, one
of which is being used to subtract a "slice" out the other one.  Right
now, we can represent the two individual spheres as Breps, but we
can't express the shape that results from the subtraction.  To do so,
you need to describe the intersection of the two NURBS surfaces
representing the spheres (a NURBS curve, in this case, although it
might be a point or a surface in some cases) and create new NURBS
surfaces corresponding to the first sphere without the "carved out"
part, and the "negative surface" from the second sphere that goes into
the hole in the first.  The combination of those two surfaces
describes the "evaluated" boolean of the two spheres.

There is a fair bit of literate on the topic, and a variety of
possible approaches, so if it sounds interesting you can look it over
and see what you think.  Some quick links:

http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.42.181

http://www.cs.berkeley.edu/~hling/research/paper/curve.htm
http://www.cs.berkeley.edu/~hling/research/paper/intersection.htm

http://dl.acm.org/citation.cfm?id=1364937 (intersection discussion it
towards the end - we don't currently use GPUs but often the algorithms
are useful even without them.)

http://www.idav.ucdavis.edu/publications/print_pub?pub_id=80

Cheers,
CY

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to