POV-Ray : Newsgroups : povray.newusers : Elliptical Torus : Re: Elliptical Torus Server Time
29 Jul 2024 10:27:12 EDT (-0400)
  Re: Elliptical Torus  
From: Mike Williams
Date: 3 Mar 2006 01:36:43
Message: <MZzwpFA2M+BEFwDD@econym.demon.co.uk>
Wasn't it tgl who wrote:
> Is there some kind of distortion happening here or am I seeing things. I
>really need an accurate and consistant shape.

It's an optical illusion caused by the fact that you see more shadow on
the horizontal parts, and the shadow is the same colour as the
background.

If you run that test with a white background the illusion goes away and
you can see that the real shape is consistent.
background {rgb 1}
        
You can easily check the accuracy by adding some spheres with a slightly
larger radius along the ellipse, and observing that they all fit
properly.

camera {
  location <0,0,-10>
  look_at 0

}
light_source {
  <-5,15,-10>
  rgb 1
}

#local a = 5; //semimajor axis
#local b = 3; //semiminor axis
#local r = .5; //minor radius

#local n = 20;//number of spheres/accuracy of object


sphere_sweep {
  cubic_spline
  n+3,
  #local i=0;
  #while(i<=2*pi*(1+2/n))
    <a*sin(i),0,b*cos(i)>, r
    #local i=i+(2*pi/n);
  #end
  pigment { rgb y }
  finish { phong 1 }
  rotate <-90,0,0>
}

background {rgb 1}

#local i=0;
#while(i<=2*pi*(1+2/n))
  sphere{<a*sin(i),b*cos(i),0>, r+0.001 pigment {rgb <2,2,0>}}
  #local i=i+(2*pi/n);
#end


Post a reply to this message

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