POV-Ray : Newsgroups : povray.general : Isosurface help Server Time
29 Jul 2024 12:21:02 EDT (-0400)
  Isosurface help (Message 5 to 14 of 14)  
<<< Previous 4 Messages Goto Initial 10 Messages
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

From: clipka
Subject: Re: Isosurface help
Date: 24 Jul 2012 07:01:34
Message: <500e808e$1@news.povray.org>
Am 24.07.2012 02:52, schrieb Chaanakya:

> 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?

So if I understand you correctly, what you want is something that is 
square at the base, but rounded at the top?

Would this one fit your needs (talking of basic shapes here, not exact 
measurements)?

-------------------------------------
#version 3.6;
#include "colors.inc"

global_settings {
   max_trace_level 256
   ambient_light White * 0.1
   assumed_gamma 1.0
}

camera {
   location <10,10,3>
   look_at <0,0,0>
   angle 25
}

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

/*
#declare RADIUS = 2;
#declare YHEIGHT = RADIUS - sqrt(RADIUS*RADIUS - 2);
*/

#declare YHEIGHT = 0.5;
#declare RADIUS = 1/YHEIGHT + YHEIGHT/2;

intersection {
   box { <-1,0,-1>, <1,YHEIGHT+RADIUS,1> }
   sphere { <0,YHEIGHT-RADIUS,0>, RADIUS }
   pigment { color Red }
}
-------------------------------------

This gives you a cut-sphere dome over a square base, with the corners 
"resting" at y=0 and the apex reaching up to y=YHEIGHT (radius of the 
sphere is computed automatically); alternatively, you can specify the 
radius of the sphere (apex height is computed automatically), see 
commented-out lines.


Post a reply to this message

From: Chaanakya
Subject: Re: Isosurface help
Date: 24 Jul 2012 08:50:00
Message: <web.500e9998fb628f717f523b7e0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 24.07.2012 02:52, schrieb Chaanakya:
>
> > 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?
>
> So if I understand you correctly, what you want is something that is
> square at the base, but rounded at the top?
>
> Would this one fit your needs (talking of basic shapes here, not exact
> measurements)?
>
> -------------------------------------
> #version 3.6;
> #include "colors.inc"
>
> global_settings {
>    max_trace_level 256
>    ambient_light White * 0.1
>    assumed_gamma 1.0
> }
>
> camera {
>    location <10,10,3>
>    look_at <0,0,0>
>    angle 25
> }
>
> light_source {
>    <100,1000,0>
>    color White
> }
>
> /*
> #declare RADIUS = 2;
> #declare YHEIGHT = RADIUS - sqrt(RADIUS*RADIUS - 2);
> */
>
> #declare YHEIGHT = 0.5;
> #declare RADIUS = 1/YHEIGHT + YHEIGHT/2;
>
> intersection {
>    box { <-1,0,-1>, <1,YHEIGHT+RADIUS,1> }
>    sphere { <0,YHEIGHT-RADIUS,0>, RADIUS }
>    pigment { color Red }
> }
> -------------------------------------
>
> This gives you a cut-sphere dome over a square base, with the corners
> "resting" at y=0 and the apex reaching up to y=YHEIGHT (radius of the
> sphere is computed automatically); alternatively, you can specify the
> radius of the sphere (apex height is computed automatically), see
> commented-out lines.

That's almost what I'm looking for, thank you!  Is it possible to have the sides
smoothly decline to y=0? (Rather than have it sharply decline as it does here?)

-Chaanakya


Post a reply to this message

From: clipka
Subject: Re: Isosurface help
Date: 24 Jul 2012 15:44:00
Message: <500efb00$1@news.povray.org>
Am 24.07.2012 14:48, schrieb Chaanakya:
> clipka <ano### [at] anonymousorg> wrote:

>> This gives you a cut-sphere dome over a square base, with the corners
>> "resting" at y=0 and the apex reaching up to y=YHEIGHT (radius of the
>> sphere is computed automatically); alternatively, you can specify the
>> radius of the sphere (apex height is computed automatically), see
>> commented-out lines.
>
> That's almost what I'm looking for, thank you!  Is it possible to have the sides
> smoothly decline to y=0? (Rather than have it sharply decline as it does here?)

Not with a sphere cutout (nor with a paraboloid). I don't know a formula 
off the top of my head that does this.


Post a reply to this message

From: Chaanakya
Subject: Re: Isosurface help
Date: 24 Jul 2012 15:55:01
Message: <web.500efc80fb628f717f523b7e0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 24.07.2012 14:48, schrieb Chaanakya:
> > clipka <ano### [at] anonymousorg> wrote:
>
> >> This gives you a cut-sphere dome over a square base, with the corners
> >> "resting" at y=0 and the apex reaching up to y=YHEIGHT (radius of the
> >> sphere is computed automatically); alternatively, you can specify the
> >> radius of the sphere (apex height is computed automatically), see
> >> commented-out lines.
> >
> > That's almost what I'm looking for, thank you!  Is it possible to have the sides
> > smoothly decline to y=0? (Rather than have it sharply decline as it does here?)
>
> Not with a sphere cutout (nor with a paraboloid). I don't know a formula
> off the top of my head that does this.

Alright thank you very much :)  I'll work with this and see what happens.  Thank
you again!

- Chaanakya


Post a reply to this message

<<< Previous 4 Messages Goto Initial 10 Messages

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