Re: problem with output of the program on different OS



On May 12, 8:06 pm, Bart <b...@xxxxxxxxxx> wrote:

I had a further look at Pelles C version (now that I can run it from
the command line, I can make progress..)

With 3 compilers, ray 463 hits only triangle 654 of the 1200
triangles.
With Pelles C, ray 463 hits triangles 654 and 745, at equal distances.


I just added a raycount member to ray data structure and kept track of
rays hitting triangles. I got some what different results. ray 463 is
hitting triangle 943 at distance 1006.67112

a ray hitting two triangles at same distance is nothing but ray
hitting the edge shared by two triangles or the vertex.

Varying your EPSILON made no difference.

Well I varied EPSILON and there was a little difference in output but
still no where near the results obtained with other compilers.

So it starts to look more like some strange numeric problem; perhaps
Pelles C does some calculations a little differently, or perhaps
something more serious; this requires more investigation by someone
with a lot more time!

It could still be a bug in /your/ calculations which may depend too
heavily on some very small value which is treated differently between
different C systems.

maybe you are right but isn't it strange that PellesC is the only
compiler giving a result like this. If there was a serious bug in the
program, then there would have been atleast one compiler which could
have given strange result ?


BTW this is a hell of a complicated program; I wouldn't have used C
for this. Not until it was 100% working with some reference results
anyway. (I(/we?) still don't know what the right output is supposed to
be. Makes testing a little difficult!)


What other languages in your opinion could have been used ? I was told
C because speed was important to my application.
.



Relevant Pages

  • Re: problem with output of the program on different OS
    ... With Pelles C, ray 463 hits triangles 654 and 745, at equal distances. ... still no where near the results obtained with other compilers. ...
    (comp.lang.c)
  • Re: one million triangles
    ... the triangles may be placed in any data ... possibility is to create a bounding volume tree using boxes. ... the ray does not intersect this box, ... any point if the ray does not intersect a child box, ...
    (comp.graphics.algorithms)
  • Re: one million triangles
    ... the triangles may be placed in any data ... possibility is to create a bounding volume tree using boxes. ... any point if the ray does not intersect a child box, ... I could do a standard ray/plane intersection and just make ...
    (comp.graphics.algorithms)
  • Re: one million triangles
    ... the first triangle of intersection? ... How are your triangles currently organized: ... of subspaces and presort triangles into that ... Than you find what subspace ray ...
    (comp.graphics.algorithms)
  • Re: My New Website
    ... in the x ray we see just say 'black points' nothing else ... you have there say two atome with a 'close to zero' distance!!! ... Angetrem* cos alpha (what ever cos alpha might be(in the x direction ... those,black points' 'the atoms' ...
    (sci.physics)

Loading