POV-Ray : Newsgroups : povray.general : Isosurface help : Re: Isosurface help Server Time
29 Jul 2024 08:10:52 EDT (-0400)
  Re: Isosurface help  
From: Chaanakya
Date: 23 Jul 2012 20:00:01
Message: <web.500de548fb628f713eebe80d0@news.povray.org>
"Chaanakya" <nomail@nomail> wrote:
> clipka <ano### [at] anonymousorg> wrote:
> > Am 23.07.2012 22:52, schrieb Chaanakya:
> > > clipka <ano### [at] anonymousorg> wrote:
> > >> Am 23.07.2012 21:58, schrieb Chaanakya:
> > >>> "Chaanakya" <nomail@nomail> wrote:
> > >>>> Hey guys!  I just had a quick question...
> > >>>>
> > >>>> I was trying to generate the graph of this function (in Cartesian
coordinates):
> > >>>>
> > >>>> -z + 1.00003 = (3x^2 + 3y^2)/(200000)
> > >>>>
> > >>>> However, when I render the following code, nothing shows up except for the
> > >>>> plane:
> > >> ...
> > >>>> isosurface {
> > >>>>     function {
> > >>>>       -y - ((3*pow(x,2) + 3*pow(z,2))/(200000)) + 1.00003
> > >>>>     }
> > >>>>     // contained_by { box { -2,2 } }
> > >>>>     pigment {
> > >>>>       color Red
> > >>>>     }
> > >>>> }
> > >> ...
> > >>> Even more strangely, when I use the equally valid function
> > >>>
> > >>> function {
> > >>>     y + 3*pow(x,2)/200000 + 3*pow(z,2)/200000 - 1.00003
> > >>> }
> > >>>
> > >>> I get a cube.  I think there's something fundamental about isosurfaces that
I'm
> > >>> not understanding?  That is, how should I convert the function z =
-3x^2/200000
> > >>> - 3y^2/200000 + 1.00003 into an isosurface?
> > >>
> > >> Do un-comment the "contained_by" line!
> > >>
> > >> At x=0,z=0 you have y = 1.00003, which is outside the default
> > >> contained_by object (box{1,1}), and even at the maximum x and z
> > >> (x=1,z=1) you have y = 1.00000, which just barely touches the box.
> > >>
> > >> I.e. the surface you defined is (for practical purposes) all outside
> > >> default container; so the inside of the default container is either
> > >> completely outside the isosurface (first version) so that you don't see
> > >> anything, or completely inside (second version) so that you simply see
> > >> the container's shape.
> > >
> > > I'm trying to figure out exactly what container I should use - if I use box {
> > > <-1,1,-1>,<1,1.00003,1> } I get nothing (I understand why).  If I use box {
> > > <-1,0.9,-1>,<1,1.00003,1> } I get a box.  How do I get the elliptic paraboloid
> > > to show up?
> >
> > At the current dimensions, the curvature of the isosurface is simply too
> > small to be noticeable
> >
> > You'll need to use a much larger bounding container (and move back the
> > camera a whole lot) to see anything. Something like
> > contained_by{box{-20000,20000}}.
> >
> > (BTW your elliptic paraboloid seems pretty circular to me.)
>
> I think I figured out another way of doing what I want to do using spheres.  I
> will try it out and report back.

Is there any way of creating e.g. a hemisphere using CSG?  Or for that matter,
is there any way of 'cutting off' a part of the sphere (e.g. below a certain y
value)?


Post a reply to this message

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