POV-Ray : Newsgroups : povray.programming : "minus" clause : Re: "minus" clause Server Time
17 May 2024 05:35:15 EDT (-0400)
  Re: "minus" clause  
From: Andrey K 
Date: 21 Jan 2007 19:30:01
Message: <web.45b404b8b920906b8123242a0@news.povray.org>
Le Forgeron <jgr### [at] freefr> wrote:
> would you subtract c from b or (a+b) ?
>
> Also, how would you interpret
> union { a minus b minus c d } ?
>
> Too much ambiguity for my taste.

So, let`s look on
union{
  a
  b
  minus c
  d
}

yes, it equal to ((a+b)-c)+d

So

union{
  a
  minus b
  c
}

not equal to

union{
  a
  c
  minus b
}

Order, in which objects allocated, very significant here.

Your`s sample "union { a minus b minus c d }" is equal to next clause:

union{          // ((a minus b) minus c) + d
  difference{   // (a minus b) minus c
    difference{ // a minus b
      a
      b
    }
    c
  }
  d
}


Post a reply to this message

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