POV-Ray : Newsgroups : povray.binaries.images : iso_csg include file (11+16k) Server Time
18 Nov 2024 22:19:48 EST (-0500)
  iso_csg include file (11+16k) (Message 1 to 8 of 8)  
From: Christoph Hormann
Subject: iso_csg include file (11+16k)
Date: 18 Feb 2002 10:10:42
Message: <3C711970.4BE3EB5A@gmx.de>
I made a first version of this include file in June 2001 but it was fairly
difficult to use since function names could not be passed as macro
parameters.  

The file implements basic shapes and CSG operations as well as
transformations so all CSG objects using these shapes should be possible
to convert.

Currently available shape macros are:

- IC_Plane (Direction, Distance)  
- IC_Sphere (Center, Radius)  
- IC_Box (Start, End)  
- IC_Torus (MaR, MiR)                  
- IC_Cylinder (Start, End, Radius)  
- IC_Cone (Start, Radius1, End, Radius2)

Usage is still a bit ugly, but quite self explanatory, see the sample
scenes.

The first attached picture shows a sample CSG with a deformation using
noise functions.  It is all one isosurface object so it renders fairly
slow (nearly 2 hours on a K6).  Splitting things up into several objects
is probably a good idea.  I thought about implementing some kind of
bounding, but this would probably result in serious problems because of
infinite gradients.

The second sample refers to the recent discussion in p.g. about adding a
distance function to the povray shapes internally to allow proximity
calculations.  

The include file and the sample scenes will be in p.b.s-f soon.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 06 Feb. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message


Attachments:
Download 'iso_csg_test02.jpg' (16 KB) Download 'iso_csg_test03.jpg' (11 KB)

Preview of image 'iso_csg_test02.jpg'
iso_csg_test02.jpg

Preview of image 'iso_csg_test03.jpg'
iso_csg_test03.jpg


 

From:
Subject: Re: iso_csg include file (11+16k)
Date: 18 Feb 2002 10:34:36
Message: <g7727u47rk945es7v359qfr4pk43a46rnb@4ax.com>
On Mon, 18 Feb 2002 16:10:40 +0100, Christoph Hormann <chr### [at] gmxde>
wrote:

> Currently available shape macros are:
>
> - IC_Plane (Direction, Distance)  
> - IC_Sphere (Center, Radius)  
> - IC_Box (Start, End)  
> - IC_Torus (MaR, MiR)                  
> - IC_Cylinder (Start, End, Radius)  
> - IC_Cone (Start, Radius1, End, Radius2)

If you are interesting I can extract and modify my sources to
IC_Linear_Sphere_Sweep and IC_Lathe

> The second sample refers to the recent discussion in p.g. about adding a
> distance function to the povray shapes internally to allow proximity
> calculations.  

Looks interesting and sufficient for basic shapes however has obvious
limitation - closed list of objects.

ABX


Post a reply to this message

From: Christoph Hormann
Subject: Re: iso_csg include file (11+16k)
Date: 18 Feb 2002 10:53:23
Message: <3C712372.3170E6D6@gmx.de>

> 
> If you are interesting I can extract and modify my sources to
> IC_Linear_Sphere_Sweep and IC_Lathe

Yes, that would be interesting.

Since exact compatibility with the original shapes won't be possible with
all nonlinear spline based shapes i think having macros taking a spline as
parameter would be a good solution.

> 
> > The second sample refers to the recent discussion in p.g. about adding a
> > distance function to the povray shapes internally to allow proximity
> > calculations.
> 
> Looks interesting and sufficient for basic shapes however has obvious
> limitation - closed list of objects.
> 

I think it would be very difficult to use this as a proximity pattern for
CSG shapes since the gradients of all the functions are different and
therefore the proximity is different for the single CSG elements.  Also
all differences are likely to produce artefacts (like on the upper left of
the central sphere here).

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 06 Feb. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Hugo
Subject: Re: iso_csg include file (11+16k)
Date: 18 Feb 2002 11:20:24
Message: <3c7129c8@news.povray.org>
> Usage is still a bit ugly, but quite self explanatory, see the sample
> scenes.

Looks good. Can you apply transformations just as easily? Rotate, translate
etc.. I don't know much about the transform { } syntax yet, but maybe it's
useful for this.. Anyway you said "usage is still a bit ugly"..

It's a good idea to reduce the amount of math the user should know to use
isosurfaces.


Hugo


Post a reply to this message

From:
Subject: Re: iso_csg include file (11+16k)
Date: 18 Feb 2002 11:32:12
Message: <3ra27u8rcvu2viealp0bpo5up2dqkt60fe@4ax.com>
On Mon, 18 Feb 2002 17:27:03 +0100, "Hugo" <hua### [at] post3teledk> wrote:
> > Usage is still a bit ugly, but quite self explanatory, see the sample
> > scenes.
>
> Looks good. Can you apply transformations just as easily? Rotate, translate

Transformations on isosurface are described in documentation, however
Christopher as always made it simpler. Check pointed source.

> It's a good idea to reduce the amount of math the user should know to use
> isosurfaces.

But don't neglect math. It helps a lot in everything.

ABX


Post a reply to this message

From: Christoph Hormann
Subject: Re: iso_csg include file (11+16k)
Date: 18 Feb 2002 11:54:54
Message: <3C7131DD.BB27B916@gmx.de>
Hugo wrote:
> 
> > Usage is still a bit ugly, but quite self explanatory, see the sample
> > scenes.
> 
> Looks good. Can you apply transformations just as easily? Rotate, translate
> etc.. I don't know much about the transform { } syntax yet, but maybe it's
> useful for this.. Anyway you said "usage is still a bit ugly"..
> 

This was referring to the way the functions are handled.  For the
transformations there are macros like ABX mentioned.

Note that you can also use constructions like:

#declare fn_1=
IC_Difference2(
  IC_Box(<-0.3,0,0>,<0.3,10,2>), 
  IC_Cylinder(<-0.5,5,2>,<0.5,5,2>, 1)
)

which makes things better readable probably although it's still not
literally translatable from the conventinal CSG.

Christoph 

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 06 Feb. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: iso_csg include file (11+16k)
Date: 18 Feb 2002 13:07:44
Message: <3c7142f0@news.povray.org>

<3ra27u8rcvu2viealp0bpo5up2dqkt60fe@4ax.com>...

>But don't neglect math. It helps a lot in everything.


Love?


Post a reply to this message

From: Shay
Subject: Re: iso_csg include file (11+16k)
Date: 19 Feb 2002 10:47:05
Message: <3c727379$1@news.povray.org>
Someday I want to try and write the kinds of include and modeling files made
by you and ABX, but I'm too hooked on modeling right now to even try.

 -Shay

Christoph Hormann <chr### [at] gmxde> wrote in message
news:3C711970.4BE3EB5A@gmx.de...


Post a reply to this message

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