POV-Ray : Newsgroups : povray.general : Isosurface help : Re: Isosurface help Server Time
29 Jul 2024 14:21:43 EDT (-0400)
  Re: Isosurface help  
From: Chaanakya
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

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