POV-Ray : Newsgroups : povray.general : Isosurface help Server Time
29 Jul 2024 10:17:51 EDT (-0400)
  Isosurface help (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: Chaanakya
Subject: Isosurface help
Date: 23 Jul 2012 15:10:01
Message: <web.500da13cc397323e7f523b7e0@news.povray.org>
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:

#version 3.6;
#include "colors.inc"

global_settings {
  max_trace_level 256
  ambient_light White
  assumed_gamma 1.0
}

camera {
  location <10,10,0>
  look_at <0,0,0>
  // rotate <0,0,-clock*90>
}

light_source {
  <1000,1000,0>
  color White
}

plane {
  y, -10
  pigment { hexagon Green, White, Blue }
}

isosurface {
  function {
    -y - ((3*pow(x,2) + 3*pow(z,2))/(200000)) + 1.00003
  }
  // contained_by { box { -2,2 } }
  pigment {
    color Red
  }
}

I'm assuming that even though z = -x (in POV-Ray), it doesn't really matter for
the equation since x (in the equation) is squared.  Thanks in advance!

- Chaanakya


Post a reply to this message

From: Chaanakya
Subject: Re: Isosurface help
Date: 23 Jul 2012 16:00:01
Message: <web.500dacf9fb628f717f523b7e0@news.povray.org>
"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:
>
> #version 3.6;
> #include "colors.inc"
>
> global_settings {
>   max_trace_level 256
>   ambient_light White
>   assumed_gamma 1.0
> }
>
> camera {
>   location <10,10,0>
>   look_at <0,0,0>
>   // rotate <0,0,-clock*90>
> }
>
> light_source {
>   <1000,1000,0>
>   color White
> }
>
> plane {
>   y, -10
>   pigment { hexagon Green, White, Blue }
> }
>
> isosurface {
>   function {
>     -y - ((3*pow(x,2) + 3*pow(z,2))/(200000)) + 1.00003
>   }
>   // contained_by { box { -2,2 } }
>   pigment {
>     color Red
>   }
> }
>
> I'm assuming that even though z = -x (in POV-Ray), it doesn't really matter for
> the equation since x (in the equation) is squared.  Thanks in advance!
>
> - Chaanakya

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?

- Chaanakya


Post a reply to this message

From: clipka
Subject: Re: Isosurface help
Date: 23 Jul 2012 16:43:20
Message: <500db768@news.povray.org>
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.


Post a reply to this message

From: Chaanakya
Subject: Re: Isosurface help
Date: 23 Jul 2012 16:55:00
Message: <web.500db981fb628f717f523b7e0@news.povray.org>
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?

Thanks!

- Chaanakya


Post a reply to this message

From: Stephen
Subject: Re: Isosurface help
Date: 23 Jul 2012 17:03:43
Message: <500dbc2f$1@news.povray.org>
On 23/07/2012 9:52 PM, Chaanakya wrote:
> How do I get the elliptic paraboloid
> to show up?

Use a bigger box.

-- 
Regards
     Stephen


Post a reply to this message

From: clipka
Subject: Re: Isosurface help
Date: 23 Jul 2012 17:13:34
Message: <500dbe7e$1@news.povray.org>
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.)


Post a reply to this message

From: Chaanakya
Subject: Re: Isosurface help
Date: 23 Jul 2012 19:55:01
Message: <web.500de3eefb628f713eebe80d0@news.povray.org>
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.


Post a reply to this message

From: Chaanakya
Subject: Re: Isosurface help
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

From: Chaanakya
Subject: Re: Isosurface help
Date: 23 Jul 2012 20:20:01
Message: <web.500dea29fb628f713eebe80d0@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.

I'm essentially trying to get a 0.00003 unit chunk out of the top of the sphere.
 I found an example for the hemisphere and I will try to work with that (I kind
of get how to do it, but I can't seem to get the chunk I need experimenting with
the box in the intersection).


Post a reply to this message

From: Chaanakya
Subject: Re: Isosurface help
Date: 23 Jul 2012 20:55:01
Message: <web.500df1bafb628f713eebe80d0@news.povray.org>
"Chaanakya" <nomail@nomail> wrote:
> "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.
>
> I'm essentially trying to get a 0.00003 unit chunk out of the top of the sphere.
>  I found an example for the hemisphere and I will try to work with that (I kind
> of get how to do it, but I can't seem to get the chunk I need experimenting with
> the box in the intersection).

I have a problem.  When I cut a chunk out of the sphere, it still has a circular
base.  I would like a square base.  How would I achieve that?

Thank you very much in advance!  (and sorry for spamming the thread like this
:P)

- Chaanakya


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

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