|
|
|
|
|
|
| |
| |
|
|
From: Christoph Hormann
Subject: Announce: IsoCSG include file 0.2.1
Date: 13 Mar 2002 08:36:40
Message: <3C8F55E7.77E12712@gmx.de>
|
|
|
| |
| |
|
|
I fixed a few problems since i posted the first version in p.b.s-f. Also
wrote some documentation and an add-on for the Povray 3.5 insert menu.
http://www.tu-bs.de/~y0013390/pov/ic/index.html
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 13 Mar. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 13 Mar 2002 14:36:39 +0100, Christoph Hormann <chr### [at] gmxde>
wrote:
> I fixed a few problems since i posted the first version in p.b.s-f. Also
> wrote some documentation and an add-on for the Povray 3.5 insert menu.
> http://www.tu-bs.de/~y0013390/pov/ic/index.html
Can I have feature request ?
I think it could be interesting to somehow add automatic calculation of
bounding/container box. I mean making pairs:
IC_Box (V1, V2) and IC_BBox (V1, V2)
IC_Sphere(Center,R) and IC_BSphere(Center,R)
IC_Cone(V1,R1,V2,R2) and IC_BCone(V1,R1,V2,R2)
and so on.
All macros with B letter can internally call those without B but additionally
also create real object. For example IC_BBox(V1,V2) can looks like
#macro IC_BBox(V1,V2)
IC_Box(V1,V2) , box{V1,V2}
#end
Note this important comma as part of RValue. Now CSG operations with bounding
consideration can look like:
#macro IC_BDifference2( F1 , B1, F2 , B2 )
IC_Difference2( F1 , F2 ) , difference{ B1 B2 }
#end
Also additional transformation macros should be added such IC_BScale etc.
And finnally you can split that result into function and container:
#macro IC_Extents( F , B , Min , Max )
#declare Min = min_extent( B );
#declare Max = max_extent( B );
function{ F(x,y,z) }
#end
Having corners of container somebody can easly increase/decrease it with some
margin to consider deformations and apply it to the isosurface.
Was this proposition understable ?
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Great work and documentation, I'm sure this took some time. I'm eager to
find out if there's a way to BLOB those mixed primitives? I suppose this
can't be done, at least with sharp-edged objects like boxes.
Regards,
Hugo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 13 Mar 2002 15:41:59 +0100, "Hugo" <hua### [at] post3teledk> wrote:
> Great work and documentation, I'm sure this took some time. I'm eager to
> find out if there's a way to BLOB those mixed primitives? I suppose this
> can't be done, at least with sharp-edged objects like boxes.
Blobed isosurfaces are described in 3.5 documentation.
ABX
Post a reply to this message
|
|
| |
| |
|
|
From: Christoph Hormann
Subject: Re: Announce: IsoCSG include file 0.2.1
Date: 13 Mar 2002 10:28:04
Message: <3C8F7004.C189E475@gmx.de>
|
|
|
| |
| |
|
|
>
> [...]
>
> Can I have feature request ?
> I think it could be interesting to somehow add automatic calculation of
> bounding/container box.
> [...]
> Was this proposition understable ?
>
Yes, but i'm not sure if i will add this, you won't be able to declare
things like:
#declare fn_1=IC_BBox(-1, 1)
And this would lead to a lot of confusion i think. I might add some
global variables to manage the relevant extends of each macro call. This
way you could easily design the function as now and just use these global
variables in the 'contained_by{}' statement afterwards (or i could provide
a 'Create_Container()' macro doing this automatically).
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 13 Mar. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|
| |
| |
|
|
From: Christoph Hormann
Subject: Re: Announce: IsoCSG include file 0.2.1
Date: 13 Mar 2002 10:31:04
Message: <3C8F70B8.5A1C54CC@gmx.de>
|
|
|
| |
| |
|
|
Hugo wrote:
>
> Great work and documentation, I'm sure this took some time. I'm eager to
> find out if there's a way to BLOB those mixed primitives? I suppose this
> can't be done, at least with sharp-edged objects like boxes.
>
As ABX said this is described in the 3.5 docs.
It is on my list for future extensions of the include file.
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 13 Mar. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 13 Mar 2002 16:28:04 +0100, Christoph Hormann <chr### [at] gmxde>
wrote:
> Yes, but i'm not sure if i will add this, you won't be able to declare
> things like:
>
> #declare fn_1=IC_BBox(-1, 1)
when you want function then you call
#declare fn_1=IC_Box(-1, 1); // without B
when you want function with container then you call
#declare fn_1=IC_Extents( IC_BBox(-1, 1), V1, V2 );
All user have to convert statement made in your set of macros is to add letter
B in all names and enclose whole function in IC_Extents call.
IC_Extents gets 4 parameters but 2 of them are returned from IC_BBox
> And this would lead to a lot of confusion i think.
With good documentation you can avoid it
> I might add some
> global variables to manage the relevant extends of each macro call.
Note that my example maintained bounding objects instead extents. In
particular when you apply hundreds of small rotations into object then
bounding stored as Min,Max corners can grow up while bounding stored as object
is still the same size.
> This
> way you could easily design the function as now and just use these global
> variables in the 'contained_by{}' statement afterwards (or i could provide
> a 'Create_Container()' macro doing this automatically).
In this case it could be better to name it Get_Container() then direct create
contained_by{} statement. Coordinates are useful for further modifications.
ABX
Post a reply to this message
|
|
| |
| |
|
|
From: Christoph Hormann
Subject: Re: Announce: IsoCSG include file 0.2.1
Date: 13 Mar 2002 11:11:13
Message: <3C8F7A1F.44247447@gmx.de>
|
|
|
| |
| |
|
|
>
> [...]
>
> when you want function then you call
>
> #declare fn_1=IC_Box(-1, 1); // without B
>
> when you want function with container then you call
>
> #declare fn_1=IC_Extents( IC_BBox(-1, 1), V1, V2 );
>
All right, this would work.
>
> > And this would lead to a lot of confusion i think.
>
> With good documentation you can avoid it
But i want to keep it as simple as possible, doubling the number of macros
and having several additional helpers macros would not exactly simplify
things. Also the CSG macros (difference, etc.) right now can take any
other function too. The 'B' version would be more restrictive. And
infinite shapes (only 'plane' right now) would lead to nonsense results.
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 13 Mar. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 13 Mar 2002 17:11:11 +0100, Christoph Hormann <chr### [at] gmxde>
wrote:
> But i want to keep it as simple as possible, doubling the number of macros
> and having several additional helpers macros would not exactly simplify
> things.
You can stay as is with your iso_csg.inc include file and not change anything
in your set of macros neither documentation. In fact I did everything for you.
Take a look what was changed (after moment in povray.binaries.scene-files - be
carefull - not tested). If user want simple version then he use your script as
"iso_csg.inc" if he want automatic container then he add b in letter of
include file, macro names, and addional IC_Extents call. I think it is simple
enough.
> Also the CSG macros (difference, etc.) right now can take any
> other function too.
> The 'B' version would be more restrictive.
Not, you still can use any other function, just add additional parametr as
container of this function.
> And infinite shapes (only 'plane' right now) would lead to nonsense results.
Sure, but author can aware about it in documentation ... ;-)
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 13 Mar 2002 14:36:39 +0100, Christoph Hormann <chr### [at] gmxde>
wrote:
> I fixed a few problems since i posted the first version in p.b.s-f. Also
> wrote some documentation and an add-on for the Povray 3.5 insert menu.
>
> http://www.tu-bs.de/~y0013390/pov/ic/index.html
Here is proposition of IC_Box macro with function returning linear distance to
the box shape.
#macro IC_Box( Start , End )
#local Start=Start+<0,0,0>;
#local End=End+<0,0,0>;
#local Cx=max(Start.x, End.x);
#local Cy=max(Start.y, End.y);
#local Cz=max(Start.z, End.z);
#local Dx=min(Start.x, End.x);
#local Dy=min(Start.y, End.y);
#local Dz=min(Start.z, End.z);
#local Inside=function{pattern{object{box{ Start , End }}}};
function(x, y, z){
select(
Inside(x,y,z),
0,
f_r(min(x-Dx,max(x-Cx,0)),min(y-Dy,max(y-Cy,0)),min(z-Dz,max(z-Cz,0))),
max(x-Cx, y-Cy, z-Cz, Dx-x, Dy-y, Dz-z)
)
}
#end
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|