Shailesh Tripathi
B.Tech. Part-IV
Electronics Engineering
IIT-BHU (Varanasi)
On Tue, Mar 21, 2017 at 2:51 AM, Vasco Alexandre da Silva Costa <
vasco.co...@gmail.com> wrote:
> On Mon, Mar 20, 2017 at 2:54 PM, Shailesh Tripathi <
> shailesh.tripathi.ec...@itbhu.ac.in> wrote:
>
>> Hello,
>> A few more doubts!
>>
>> 1. For the NEAR_ZERO function in "common.cl", the epsilon value used
>> should be *"RT_PCOEFF_TOL"* or *"RT_DOT_TOL"? *Basically, what are
>> these two different tolerance value for?
>>
>
> The maximum error value depends on the operations performed.
>
It is used to check if the imaginary part of the root is zero (in hrt.c), "*if
(NEAR_ZERO(complex[j].im, RT_***_TOL))". *In this case which one needs to
be used and why?
>
> 2. In the "part", "rhc" and "rpc" codes, in place of "*segp->seg_in"* and
>> "*segp->seg_out", hits[0] and hits[1] *are used in the kernels. But in
>> the "*hrt*" code, these variables are not used. Would it be correct to
>> define these in the kernels? If yes, should it be linked the same way as in
>> other files?
>>
>
> HEART (hrt) primitives can have 4 ray-primitive intersection points
> similar to the TORUS (tor) primitive. IIRC all the other primitives you
> mentioned can only have 2 intersection points. So the intersections are
> processed differently.
>
>
>>
>> 3. In "common.cl", *'bn_complex_t' *is defined but '*bn_poly_t' *is
>> not. So I I defined it in "common.cl" itself.
>>
>
> 'bn_poly_t' is not defined because it isn't necessary for our purposes and
> it wastes memory. Regardless of the kind of polynomial it always allocates
> as much memory as if it was a 6th order polynomial. See how 'tor_shot.cl'
> uses the solver for an example. You just allocate a double array with the
> required size and then pass it together with the polynomial length to the
> solver.
>
I will study the code and get back to you.
Thanks for your help :)
>
> --
> Vasco Alexandre da Silva Costa
> PhD in Computer Engineering (Computer Graphics)
> Instituto Superior Técnico/University of Lisbon, Portugal
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel