POV-Ray : Newsgroups : povray.newusers : Constraining objects Server Time
31 Oct 2024 21:03:53 EDT (-0400)
  Constraining objects (Message 1 to 3 of 3)  
From: Vincent99
Subject: Constraining objects
Date: 17 Feb 2015 00:50:00
Message: <web.54e2d5b582b0a119e91f18f90@news.povray.org>
Hi Guys,
Newbie to the site.
I am trying to render an isosurface but the contained_by container/envelope is
restricted to either a "Box" by default or I can specify a "Sphere".
This all works fine, however I would like to use a spheroid as container and
have been trying to use the boollean union of my object with the "clipped_by"
expression and the spheroid defined by:

clipped_by {sphere{0,1 scale<Rx,Ry,Rz> rotate<0,0,-70> inverse}

where I can defined the RX, Ry & Rz axes dimensions

Unfortunately this always results in a Parse error
with the error occurring immediately after the "Clipped_by" expression

error: Parse Error: Expected "object or directive", threshold found instead

Any guidance would be appreciated
regards

Part of working code:

*************************************************************
#declare saddle=function{1*pow(y,2)- pow(x/1.8,2)+z }

isosurface {
    function { saddle( x,y,z)}
      contained_by {  sphere { <0, 0, 0>, 5} //box {<-3,-2,-10>, <3,2,10>   }
  // clipped_by { sphere{ o, 1 scale<Rx,Ry,Rz> rotate <0,0,-70> inverse} }
              }
  threshold 0
  accuracy .05
  max_gradient 3227
 open
  material {
        texture {
          pigment { color rgbf <0.98, 1.0, 0.99, 0.75> }
          finish { F_Glass4 }
                }
        interior {I_Glass caustics .1}
                }

  rotate <0,0,-70>
            }
******************************************************************


Post a reply to this message

From: Thomas de Groot
Subject: Re: Constraining objects
Date: 17 Feb 2015 03:17:19
Message: <54e2f90f@news.povray.org>
On 17-2-2015 6:46, Vincent99 wrote:
> *************************************************************
> #declare saddle=function{1*pow(y,2)- pow(x/1.8,2)+z }
>
> isosurface {
>      function { saddle( x,y,z)}
>        contained_by {  sphere { <0, 0, 0>, 5} //box {<-3,-2,-10>, <3,2,10>   }
>    // clipped_by { sphere{ o, 1 scale<Rx,Ry,Rz> rotate <0,0,-70> inverse} }
>                }
>    threshold 0
>    accuracy .05
>    max_gradient 3227
>   open
>    material {
>          texture {
>            pigment { color rgbf <0.98, 1.0, 0.99, 0.75> }
>            finish { F_Glass4 }
>                  }
>          interior {I_Glass caustics .1}
>                  }
>
>    rotate <0,0,-70>
>              }
> ******************************************************************
>
Clipped_by{} should not be /inside/ contained_by{}. Instead put it 
/after/ open.

-- 
Thomas


Post a reply to this message

From: Vincent99
Subject: Re: Constraining objects
Date: 19 Feb 2015 07:10:01
Message: <web.54e5d129139bf5063de73fee0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 17-2-2015 6:46, Vincent99 wrote:
> > *************************************************************
> > #declare saddle=function{1*pow(y,2)- pow(x/1.8,2)+z }
> >
> > isosurface {
> >      function { saddle( x,y,z)}
> >        contained_by {  sphere { <0, 0, 0>, 5} //box {<-3,-2,-10>, <3,2,10>   }
> >    // clipped_by { sphere{ o, 1 scale<Rx,Ry,Rz> rotate <0,0,-70> inverse} }
> >                }
> >    threshold 0
> >    accuracy .05
> >    max_gradient 3227
> >   open
> >    material {
> >          texture {
> >            pigment { color rgbf <0.98, 1.0, 0.99, 0.75> }
> >            finish { F_Glass4 }
> >                  }
> >          interior {I_Glass caustics .1}
> >                  }
> >
> >    rotate <0,0,-70>
> >              }
> > ******************************************************************
> >
> Clipped_by{} should not be /inside/ contained_by{}. Instead put it
> /after/ open.
>
> --
> Thomas

Cheers Thomas
That helped
Vincent


Post a reply to this message

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