POV-Ray : Newsgroups : povray.programming : "minus" clause : Re: "minus" clause Server Time: 6 Jul 2008 00:08:06 GMT
  Re: "minus" clause  
From: Le Forgeron
Date: 22 Jan 2007 12:03:31
Andrey K. scripsit::
> Le Forgeron <jgrimbert [at] freefr> wrote:

>> Too much ambiguity for my taste.

> Order, in which objects allocated, very significant here.
> 

I won't reenter the fight about prefix vs infix operation. (do not
even mention postfix...)
CSG is prefix within povray SDL, so just keep it that way.

Or soon you will get a request of a reverse-polish notation for
expression. Let's do it the Forth way !
sphere{ 0,1 } MyObj =

is too easy...

1 0 sphere MyObj =

is better!

> 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
> }

There is a shorter syntax
union {
       difference {
       a
       b
       c
       }
   d
}



-- 
Eifersucht ist die Leidenschaft, die mit Eifer sucht, was Leiden
schafft.

Eco: -8.75 Soc: -6.72
http://www.politicalcompass.org/


Post a reply to this message

Copyright 1991-2004 POV-Team™