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

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