povray icon indicating copy to clipboard operation
povray copied to clipboard

Numerical inaccuracy in shapes2.inc

Open wfpokorny opened this issue 5 years ago • 1 comments

Summary

Numerical inaccuracy in shapes2.inc's as reported by Robert Munyer on July 21, 2019 in the newsgroup threads:

http://news.povray.org/povray.binaries.images/thread/%3C87imrvxg7g.fsf%40munyer.com%3E/

and

http://news.povray.org/povray.general/thread/%3C5d357b5e%241%40news.povray.org%3E/

Environment

A shipped include file, so any back to at least v3.7 and currently renders inaccurately in v3.8 at commit 74b3ebe.

Steps to Reproduce

povray +H240 +W320 ico-vertex.pov

Expected Behavior

As posted at:

http://news.povray.org/povray.binaries.images/thread/%3C87imrvxg7g.fsf%40munyer.com%3E/

Actual Behavior

As posted at:

http://news.povray.org/povray.binaries.images/thread/%3C87imrvxg7g.fsf%40munyer.com%3E/

Render Settings

See command line above. Otherwise defaulted.

Scene

#version 3.7;

#include "colors.inc"
#include "shapes.inc"
#include "shapes2.inc"

global_settings { assumed_gamma 1 }

object { Icosahedron scale 10000 pigment { color Yellow } }

#local V = <0, 5627, 11256>;

camera { look_at V location V + <5, 0, 15> }

light_source { V + <10, 10, 20> color White }

Output

See newsgroup binary images thread.

Suggested Solution

Le Forgeron provided branch and a fix for hgpovray38 as mentioned in the newsgroups. I captured as a stand alone branch which will be periodically re-based to master until a fix is adopted. See:

https://github.com/wfpokorny/povray/tree/fix/JG_angles-of-platonic-polyhedrons

wfpokorny avatar Aug 04 '19 10:08 wfpokorny

This looks easy enough to fix in passing before we release v3.8.0.

c-lipka avatar Jun 16 '21 13:06 c-lipka