POV-Ray : Newsgroups : povray.newusers : Singular matrix reading polygon : Re: Singular matrix reading polygon Server Time
29 Jul 2024 22:33:22 EDT (-0400)
  Re: Singular matrix reading polygon  
From: Mike Williams
Date: 23 Feb 2005 00:04:45
Message: <6XQdaBAh7AHCFws4@econym.demon.co.uk>
Wasn't it pixelphile who wrote:
>I'm trying to render an architectural design.  My CAD system generates
>(inter alia) the following:
>polygon { 5,
><-41.486087666667,0.272721000000,-5.718333333333>,
><-41.484943666667,0.271479000000,-5.717189333333>,
><-41.484891666667,0.272721000000,-5.719251333333>,
><-41.486087666667,0.272721000000,-5.718333333333>,
><-41.486087666667,0.272721000000,-5.718333333333>
>texture {Soft_blue
>}
>}
>- which causes "Parse Error: singular matrix in MInvers".  Actually my model
>contains hundreds of polygons that generate this message.
>What is it about the polygon that causes this?  Are the points not coplanar?
> (I've tried removing the final point - makes no difference).
>I can't easily change either the contents of the model (supplied by a third
>party) or the CAD system (ditto) so my scope for experimentation is
>limited.  I just need to know who to complain to!
>Apparently the same data file renders correctly under a different operating
>system, so it may be a rounding issue.  Surely POVRay can't be so sensitive
>to coplanarity or the polygon primitive would fail this way all the time?
>
>TIA for any ideas

Yes, it's some sort of rounding problem. Observe that the problem goes
away if we multiply the values by 100 and then scale it back down again
afterwards.

polygon { 5,
<-41.486087666667,0.272721000000,-5.718333333333>*100,
<-41.484943666667,0.271479000000,-5.717189333333>*100,
<-41.484891666667,0.272721000000,-5.719251333333>*100,
<-41.486087666667,0.272721000000,-5.718333333333>*100,
<-41.486087666667,0.272721000000,-5.718333333333>*100
texture {Soft_blue}
scale 0.01
}

I don't know why POV is trying to invert a matrix based on these points,
but when it does so the determinant of the matrix was getting rounded
down to zero.

Would it be possible for you to try scaling up the whole object in your
CAD program and then apply "scale 0.01" to the whole union once you've
got it into POV? 

The fact that three of the five points are identical is nothing to do
with the problem, since the error still happens with a polygon 3 using
the three non-identical points.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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