POV-Ray : Newsgroups : povray.beta-test : wineglass.pov: quadric QCone_Y and CSG merge Server Time
28 Dec 2024 06:26:06 EST (-0500)
  wineglass.pov: quadric QCone_Y and CSG merge (Message 1 to 5 of 5)  
From: Bob Hughes
Subject: wineglass.pov: quadric QCone_Y and CSG merge
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

From: Bent
Subject: Re: wineglass.pov: quadric QCone_Y and CSG merge
Date: 29 May 2005 23:05:01
Message: <web.429a82c8b4432fcab605db230@news.povray.org>
"Bob Hughes" <bob### [at] charternet> wrote:
> #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}
> }

Things get stranger...
If you replace the clipped_by section with:
   clipped_by {
      plane { y, -1.0  }
   }
....you end up with an empty ring partway along the shape in addition to the
previously-mentioned disappearing act above +1*y. (Compare with the same
scene rendered in 3.61a...)

As far as the comments, I can't seem to find quadrics.cpp anywhere...

Bent


Post a reply to this message

From: Bent
Subject: Re: wineglass.pov: quadric QCone_Y and CSG merge
Date: 29 May 2005 23:20:01
Message: <web.429a85bab4432fcab605db230@news.povray.org>
Okay, I've reduced the scene greatly:

//Start of scene

camera {location -5*z}

background{color rgb 1}

light_source {<-10, 10, -10> color rgb 1}

merge{
quadric {<1, -1, 1>, <0, 0, 0>, <0, 0, 0>, 0 clipped_by{plane{y,-1}}}
sphere{0,1 scale <1,3,1>}
pigment {color rgb .5}}

//End of scene

See if this helps any.

Bent


Post a reply to this message

From: Bent
Subject: Re: wineglass.pov: quadric QCone_Y and CSG merge
Date: 29 May 2005 23:25:00
Message: <web.429a876eb4432fcab605db230@news.povray.org>
Curiouser and curiouser...

The difference function has a problem too:
//Start of scene

camera {location <0,4,-5> look_at 0}

background{color rgb 1}

light_source {<-10, 10, -10> color rgb 1}

difference{
quadric {<1, -1, 1>, <0, 0, 0>, <0, 0, 0>, 0 clipped_by{plane{y,-1}}}
sphere{0,2}
pigment {color rgb .5}}

//End of scene

(I changed things around a little...)

Also, try adding an inverse to the quadric - you get the same thing as if
you were to replace the difference with the merge again...

Bent


Post a reply to this message

From: Bent
Subject: Re: wineglass.pov: quadric QCone_Y and CSG merge
Date: 29 May 2005 23:35:01
Message: <web.429a8953b4432fcab605db230@news.povray.org>
For that matter, replacing the quadric with a poly doesn't change a thing:
poly {2,<1,0,0,0,-1,0,0,1,0,0> clipped_by{plane{y,-1}}}

Bent


Post a reply to this message

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