POV-Ray : Newsgroups : povray.general : Possible bug with (only?) simple objects and large values : Possible bug with (only?) simple objects and large values Server Time
5 Aug 2024 04:13:34 EDT (-0400)
  Possible bug with (only?) simple objects and large values  
From:
Date: 30 Nov 2002 03:12:55
Message: <3de87307$1@news.povray.org>
I am using numbers with solar-system sized values eg. 2x10^8.
I have just noticed what seems to be a bug with some solids
(code attached).

I have a sphere at the origin and a differenced cylinder
bracketing it. When the camera moves from a distance of
10 million to 11 million units the sphere disappears, but the
cylinder remains.

Additionally a torus at 152 million units disappears, whilst another
differentiated cylinder further out is visible in the same view,
in fact in another view the torus suddenly ends for no apparent
reason.

I would like to know if others who run this code see the same
issues, or if it is just platform specific...

The following code illustrates this bug, change the camera
statement from camera1 to camera2 to see the first bug,
set it at camera4 to see the second bug.

I am running PoV3.5  under windows95 with a P4 1.2GHz and
512Mb of memory.

If the items uniformly disappeared I would think it was a
floating overflow or something, however only certain items
seem to disappear, and not necessarily the furthest.

On my machine the system seems to have about 17 digits
of precision for floats as I am only using 9 this should not be
an issue (I determined this by doubling a float in a loop and
printing the results and marking where the least significant
digit started to become in error):

#declare cnt=0;
#declare value=1;

#while (cnt < 70)
        #declare value=value*2;
        #debug concat("Value is:",str(cnt,0,-1)," total is
       ",str(value,0,-1),"\n")
        #declare cnt=cnt+1;
#end

	-Dan

----- Problem pov file ------

// Disappearing item bug

#include "colors.inc"

#declare camera1=camera { // sun not visible
	location <100,1000000,-11000000>
	look_at <0,0,0>
	angle 35
}

#declare camera2=camera { // sun visible
	location <100,1000000,-10000000>
	look_at <0,0,0>
	angle 35
}

#declare camera4=camera {
	location <  0,  1200000, -153568000>
	look_at  <10000000, -100000, -151000000>
	angle 35
}

#declare camera7=camera { // Top View
	location <     0,500000000,0>
	look_at <0,0,0>
	angle 45
}

camera {camera1}

sphere { //sun
         <0,0,0>, 679948
         pigment {Yellow}
         finish {ambient .7} }

light_source { <0,0,-156000000> colour White }

object { // Sun indicator
	difference {
		cylinder { <0,35000000,0>, <0,-35000000,0>, 900000 }
		cylinder { <0,800000,0>, <0,-800000,0>, 910000 }
	}
	pigment { colour Blue }
	finish { ambient 1 }
}

object {
         torus { 152000000, 400000 }

	pigment { colour Green }
	finish { ambient 1 }
}


object { // Ring
	difference {
		cylinder { <0,-1000000,0>, <0,1000000,0>, 153570000 }
		cylinder { <0,-1000001,0>, <0,1000001,0>, 153567000 }
	    }
	pigment { colour White }
	finish { ambient .7 }
}


Post a reply to this message

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