POV-Ray : Newsgroups : povray.advanced-users : Constructing a geometry : Re: Constructing a geometry Server Time
3 Jul 2024 04:27:20 EDT (-0400)
  Re: Constructing a geometry  
From: Mike Williams
Date: 4 Feb 2009 23:36:01
Message: <nfIPBaAsymiJFwro@econym.demon.co.uk>
Wasn't it Amir_ni who wrote:
>Hi,
>
>I am trying to make a special shape in povray that is made by spheres, but
>neither "intersection" nor "difference" commands cannot help me. This is the
>problem: if the position of eight spheres are in a cubic form in a way that the
>distance between neighbor sphere is less than 1.4 times the radius of 
>spheres, a
>cavity is formed in the center of cube. I want to make the shape of 
>that cavity.
>The following code contains the the coordinates of eight spheres. In advance, I
>do appreciate your help.

Difference the spheres from a box

difference {

box {d/2, -d/2}

sphere { <d/2, d/2, d/2> ,  d/1.4}
sphere { <-d/2, -d/2, -d/2> ,  d/1.4}

sphere { <-d/2, d/2, d/2> ,  d/1.4}
sphere { <d/2, -d/2, -d/2> ,  d/1.4}

sphere { <d/2, -d/2, d/2> ,  d/1.4}
sphere { <-d/2, d/2, -d/2> ,  d/1.4}

sphere { <d/2, d/2, -d/2> ,  d/1.4}
sphere { <-d/2, -d/2, d/2> ,  d/1.4}

pigment{ color rgb<1,0,0> }
}


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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