POV-Ray : Newsgroups : povray.general : CSG with sphere sweeps : CSG with sphere sweeps Server Time
23 Sep 2021 01:00:05 EDT (-0400)
  CSG with sphere sweeps  
From: s day
Date: 21 Apr 2021 09:30:00
Message: <web.6080282a9709008e8de81c16a8f0b95@news.povray.org>
OK, it has been a long time since I have used POV for anything but have I
forgotten a rule about using sphere_sweeps with CSG operations?

Below code has exactly the same sphere_sweep but when viewed at the lower angle
I see artifacts:

#version 3.7;


camera {
  location  <0, 0.0,-5.0>
  look_at   <0, 0, 0>
  right     x*image_width/image_height
}

// create a regular point light source
light_source {
  0*x                  // light's position (translated below)
  color rgb <1,1,1>    // light's color
  translate <-20, 40, -20>
}

// Set a color of the background (sky)
background { color rgb< 1, 1, 1> }

difference {
 box { <-2, -5, -0.1> <2, 5, 0.1> }
union {
sphere_sweep {
    b_spline
    5,
    < 2.2, -1.75, 0>, 0.45,
    < 0, 0, 0>, 0.45,
    <-0.50, 1.25, 0>, 0.35,
    <0.65, 2.5, 0>, 0.025,
    < 0.45, 5.0, 0>, -0.35
    tolerance 0.1

    scale <0.5, .5, 2>   rotate<0,0,0>
   }  // end of sphere_sweep --

sphere_sweep {
    b_spline
    5,
    < 2.2, -1.75, 0>, 0.45,
    < 0, 0, 0>, 0.45,
    <-0.50, 1.25, 0>, 0.35,
    <0.65, 2.5, 0>, 0.025,
    < 0.45, 5.0, 0>, -0.35
    tolerance 0.1

    scale <0.5, .5, 2>   rotate<0,0,0>  translate<-0.55,-2.1,0>
   }  // end of sphere_sweep --
}
material {
texture {
pigment { rgb <0.01, 0.51, 0.51> }
finish { specular albedo .1 roughness 0.001 brilliance 2 diffuse  albedo 0.9
reflection { 0.05, .1 fresnel on } conserve_energy }
}
interior { ior 1.6 }
}

}


Post a reply to this message


Attachments:
Download 'tmp.png' (20 KB)

Preview of image 'tmp.png'
tmp.png


 

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