POV-Ray : Newsgroups : povray.binaries.images : Bug report: shapes2.inc icosahedron numerical inaccuracy Server Time: 19 Aug 2019 14:40:53 GMT
  Bug report: shapes2.inc icosahedron numerical inaccuracy (Message 1 to 2 of 2)  
From: Robert Munyer
Subject: Bug report: shapes2.inc icosahedron numerical inaccuracy
Date: 21 Jul 2019 20:47:17
Message: <87muh7xgh9.fsf@munyer.com>
(See thread with same subject, in povray.general.)

Close view of an icosahedron vertex, before and after fixing the angles.

$ povray +H240 +W320 ico-vertex.pov


Post a reply to this message


Attachments:
Download 'before-after.png' (13 KB)

Preview of image 'before-after.png'
before-after.png


 

From: Robert Munyer
Subject: Bug report: shapes2.inc icosahedron numerical inaccuracy
Date: 21 Jul 2019 20:53:10
Message: <87imrvxg7g.fsf@munyer.com>
I wanted an icosahedron module for OpenSCAD, and didn't find anything
on-line that I liked, so I wrote this:

  intersection_for
      (a_z = [-180 : 72 : 179],
       a_y = [atan2 (4, 3 + sqrt (5)),
              atan2 (sqrt (10 + sqrt (20)), sqrt (5 - sqrt (20)))])
    rotate ([0, a_y, a_z])
      cube ([2, 2, sqrt (3/4) + sqrt (5/12)], true);

I thought that I could double-check my math by verifying that my
angles matched POV-Ray's angles.  They didn't quite match.  A close
view of a POV-Ray icosahedron vertex reveals that it is malformed
(see PNG in message with same subject, in povray.binaries.images).

calculated: 52.6226318593503043571428615050624824299049526181
pov-ray:    52.6625

calculated: 10.8123169635717062912849447744842228988908330822
pov-ray:    10.8125

One of POV-Ray's angles is wrong only in the last digit, but the
other angle has _three_ wrong digits.


Post a reply to this message


Attachments:
Download 'us-ascii' (1 KB)

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