POV-Ray : Newsgroups : povray.beta-test : wineglass.pov: quadric QCone_Y and CSG merge : wineglass.pov: quadric QCone_Y and CSG merge Server Time
29 Jul 2024 02:33:09 EDT (-0400)
  wineglass.pov: quadric QCone_Y and CSG merge  
From: Bob Hughes
Date: 22 May 2005 03:13:03
Message: <429030ff$1@news.povray.org>
Having checked the revision.txt file I see that quadrics.cpp has comments 
concerning these QCone_Y shapes, which are being used in the 
scenes\advanced\wineglass.pov file. Unfortunately, I haven't looked at those 
comments so I am just going to give an example scene file by taking only the 
relevant parts.

In short, the merge is where the trouble shows itself. I thought it might be 
have been the clipping or the previous CSG, but this final merge is where it 
all breaks down. Hopefully that will help you find the problem.


/* BEGIN TEST SCENE */
/* problem with wineglass.pov file rendered in 3.7.0.beta.5a.icl8.win32 */

#include "shapes.inc"

#declare Plain=texture {pigment {rgb 1}}

#declare Rim =
   torus {0.975, 0.025
   clipped_by { plane { -y, 0.0 } }
   scale <15.0, 10.0, 15.0>
   translate 24.0*y
   texture {Plain}
}

#declare Top = intersection {
   plane { y, 1.0  }
   object { QCone_Y }
   object { QCone_Y scale <0.97, 1.0, 0.97> inverse }

   clipped_by { plane { y, 0.0 inverse } }
   scale <15.0, 10.0, 15.0>
   translate 14.0*y
   texture {Plain}
}

#declare Stem =
cylinder { y*3.25, y*14, 1
  texture {Plain}
}

#declare Base = object {
//sphere {0,1}
//cone{0,0,-y,1}
   QCone_Y  // this shape is causing CSG merge trouble
   clipped_by {
      plane { y, 0.0 }
      plane { y, -1.0 inverse }
   }
   translate 1.0*y
   scale <12.0, 3.25, 12.0>
   texture {Plain}
}

// CSG union is okay, so try it instead of the
// merge, which causes everything above +1*y to disappear
merge {
 object {Rim}
 object {Top}
 object {Stem}
 object {Base}
   scale <1.0, 1.50, 1.0>
}

light_source {
 <10,10,-100>,1
}

camera {
 location <0,60,-60>
 look_at <0,20,0>
}
/* END TEST SCENE */


Post a reply to this message

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