POV-Ray : Newsgroups : povray.newusers : problem intersection or difference Server Time
29 Jul 2024 04:19:35 EDT (-0400)
  problem intersection or difference (Message 1 to 5 of 5)  
From: Chrisir
Subject: problem intersection or difference
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

From: Chris B
Subject: Re: problem intersection or difference
Date: 16 Nov 2006 07:56:23
Message: <455c5ff7@news.povray.org>
"Chrisir" <nomail@nomail> wrote in message 
news:web.455c56d113f4bbfa6b71dc850@news.povray.org...
>
> I have a problem with
> intersection or difference
> using objects I defined.
>
> Chris
>

Hi Chris,

You're code is doing what you're telling it to do, so what's your problem?

Regards,
Chris B.


Post a reply to this message

From: Mike Williams
Subject: Re: problem intersection or difference
Date: 16 Nov 2006 10:13:32
Message: <7gFtHAA26HXFFwjg@econym.demon.co.uk>
Wasn't it Chrisir who wrote:
>
>
>
>Hello!
>
>I have a problem with
>intersection or difference
>using objects I defined.
>
>Thank you very much!
>
>Greetings,
>
>Chris


The syntax is

intersection  {
  object {MyBlob1}
  object {MyBox1}
}


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Chrisir
Subject: Re: problem intersection or difference
Date: 16 Nov 2006 16:00:01
Message: <web.455cd0a49bdb3fe5385164a40@news.povray.org>
> intersection  {
>   object {MyBlob1}
>   object {MyBox1}
> }


That exactly did it for me!

Sorry, I wasn't specific enough.
Those lines produced a syntax error
in my version. That's why I asked,
now it's solved!

Thanks to you and Greetings!

Chrisir


Post a reply to this message

From: Mark Birch
Subject: Re: problem intersection or difference
Date: 16 Nov 2006 18:35:00
Message: <web.455cf4799bdb3fe54daddc090@news.povray.org>
You don't need the extra 'object' wrapper around your #declared objects...

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

could be written as

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

It will still work the same when used as

object{MyBox1}

It has nothing to do with your 'problem' though...


Post a reply to this message

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