POV-Ray : Newsgroups : povray.newusers : problem intersection or difference : problem intersection or difference Server Time
29 Jul 2024 02:26:39 EDT (-0400)
  problem intersection or difference  
From: Chrisir
Date: 16 Nov 2006 07:20:00
Message: <web.455c56d113f4bbfa6b71dc850@news.povray.org>
Hello!

I have a problem with
intersection or difference
using objects I defined.

Thank you very much!

Greetings,

Chris



Code



// create a smooth blobby shape
#declare RadiusVal   = 2.9;  // 1.0; // (0 < RadiusVal) outer sphere of
influence on other components
#declare StrengthVal = 0.4; // (+ or -) strength of component's radiating
density

#declare MyBlob1 = object {
blob {
  // threshold (0.0 < threshold <= StrengthVal) surface falloff threshold #
  threshold 0.6
  sphere { < 0.75,   0,    0>, RadiusVal, StrengthVal }
  sphere { < 3.75,   0,    0>, RadiusVal, StrengthVal }
  sphere { < 0.75,   0,    1.25>, RadiusVal, StrengthVal }
  sphere { < 3.75,   0,    1.25>, RadiusVal, StrengthVal }
  //sphere { <-0.375,  0.65, 0>, RadiusVal, StrengthVal }
  //sphere { <-0.375, -0.65, 0>, RadiusVal, StrengthVal }
  //cylinder { -z, +z, RadiusVal, StrengthVal }
  // [sturm]
  scale 2

texture {
    pigment {
      color rgb <0.8,0.8,1.0>
    }
    finish{
      diffuse 0.3
      ambient 0.0
      specular 0.6
      reflection {
        0.8
        metallic
      }
      conserve_energy
    }
  }
}
rotate <45, 45, 0>
}

#declare MyBox1 = object { box { <-1, -1, -1>, <1, 1, 1> inverse }  }

// Test
// MyBlob1

// CSG difference, subtract intersections of shapes 2...N from Shape1
intersection  {
  MyBlob1
  MyBox1
}


Post a reply to this message

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