|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Pre Scriptum: Sorry for my english language.
N.B. Abstract article.
I think, may the "minus" clause be useful for "union" and "merge" ?
Often need make hole, and then allocate in this hole some object. For
example:
wall_object, window_hole_object, and window_frame_object (with glasses and
curtains :) ).
Normal way, to make it:
union{
// making wall with hole
difference{
wall_object
window_hole_object
}
// making holled wall with window
window_frame_object
}
Using "minus" clause:
union{
wall_object
// making wall with hole
MINUS window_hole_object
// making holled wall with window
window_frame_object
}
Difference between both cases not very match, but (I think), second case is
more readable.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Andrey K. scripsit::
> Pre Scriptum: Sorry for my english language.
>
> N.B. Abstract article.
>
> I think, may the "minus" clause be useful for "union" and "merge" ?
> Often need make hole, and then allocate in this hole some object. For
> example:
> wall_object, window_hole_object, and window_frame_object (with glasses and
> curtains :) ).
>
> Normal way, to make it:
>
> union{
> // making wall with hole
> difference{
> wall_object
> window_hole_object
> }
> // making holled wall with window
> window_frame_object
> }
>
> Using "minus" clause:
>
> union{
> wall_object
> // making wall with hole
> MINUS window_hole_object
> // making holled wall with window
> window_frame_object
> }
>
> Difference between both cases not very match, but (I think), second case is
> more readable.
>
>
>
This look purely like syntaxing sugar (and it tastes bad too me).
Please draw your CSG tree for both, and explain the difference if any.
I do not see the interest, moreover it is confusing when used on
something like:
union { a
b
minus c
d
}
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.
--
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Andrey K. scripsit::
> Le Forgeron <jgr### [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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Le Forgeron <jgr### [at] freefr>.
Yes, it was not very good idea. As result, I surrender. :)
Thanks.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|