POV-Ray : Newsgroups : povray.programming : povray crashes : Re: povray crashes Server Time
29 Jul 2024 06:16:52 EDT (-0400)
  Re: povray crashes  
From: Lothar Esser
Date: 3 Aug 1998 17:36:43
Message: <35C61F56.58F6294@chop.swmed.edu>
Ron Parker wrote:

> I did a cursory examination of the normal functions for the three objects
> you mentioned, and all do a VNormalize(Result, Result) as the last operation.
>
> The normal method for the object in question is at
> Ray_Intersection->Object->Methods->Normal_Method
>
> Is it possible that one or more of your triangles have strange normals?
>

   This is a distinct possibility. I'll have my program that generates the input
for povray    check the normals for this problem. It should not happen but you
never know ...

> For example, a smooth_triangle defined as
>
>    smooth_triangle { 0, -z, x, z, y, z }
>
> will have a zero normal along a line from .5*x to .5*y but will not trigger
> any warnings or errors at parse time.  When POV normalizes a zero normal, it
> should generate either a division by zero fault or a NAN.

> I think you should be able to find most of these bad triangles by choosing a
> normal vector from one vertex and dotting each of the other two normal
> vectors with it.  If either or both results are negative, you might have a
> bad triangle.

> If you want to catch them automatically in POV, you can set a trap in
> parse.c in the Parse_Smooth_Triangle function.  Since these aren't your
> garden-variety degenerate triangle, you may want to generate an error when
> you see one rather than just eliminating it as the existing degenerate
> triangle test does.  If you're actually using a mesh, you'll have to set
> the trap in Parse_Mesh.

   Well, although I have come experience with C, I don't really feel up this. It
might take longer
    to find the place in povray and add some code without destroying it, than to
modify the
    program that generates the input.

   Thanks for all the good advice ! I do think I am on the right track thanks to
your help.

    Best wishes,

   Lothar Esser

------------------------------------------------------------------
Dr. Lothar Esser
Howard Hughes Medical Institute
5323 Harry Hines Blvd.
Dallas Texas 75235-9050
E-mail : ess### [at] chopswmededu
------------------------------------------------------------------


Post a reply to this message

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