POV-Ray : Newsgroups : povray.general : Announce: IsoCSG include file 0.2.1 Server Time
29 Jul 2024 08:24:09 EDT (-0400)
  Announce: IsoCSG include file 0.2.1 (Message 11 to 14 of 14)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Tor Olav Kristensen
Subject: Re: Announce: IsoCSG include file 0.2.1
Date: 14 Mar 2002 17:57:10
Message: <3C9129E6.373D4186@hotmail.com>
Christoph Hormann 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

Christoph, I have had a look at the
code in the iso_csg.inc file.

And below are some of my suggestions
for simplifications of those macros.

I'm not sure, but from a very brief
test on my slow P100 PC at home, the
iso_csg_test02.pov file seems to
render a little bit faster with these
changes.

I have not tested all the macros below,
because I do not have patience to do
further tests with this PC (~150 PPM).

I have also added to more macros:
IC_Reorient() and IC_AxisRotate()


Tor Olav


// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

#macro IC_Transform(Fn, Trans)

  #local fn_T = function { transform { Trans inverse } }

  function {
    Fn(
      fn_T(x, y, z).x,
      fn_T(x, y, z).y,
      fn_T(x, y, z).z
    )
  }

#end // macro IC_Transform 


#macro IC_Translate(Fn, pTranslate)

  IC_Transform(
    function { Fn(x, y, z) },
    transform { translate <0, 0, 0> + pTranslate }
  )

#end // macro IC_Translate


#macro IC_Scale(Fn, vScale)

  IC_Transform(
    function { Fn(x, y, z) },
    transform { scale vScale }
  )

#end // macro IC_Scale


#macro IC_Rotate(Fn, vRotate)       // Rotate Degrees

  IC_Transform(
    function { Fn(x, y, z) },
    transform { rotate <0, 0, 0> + vRotate }
  )

#end // macro IC_Rotate


#macro IC_RotateR(Fn, vRotate)      // Rotate Radians

  IC_Transform(
    function { Fn(x, y, z) },
    transform { rotate <0, 0, 0> + vRotate*180/pi }
  )

#end // macro IC_RotateR


#macro IC_Reorient(Fn, vAxis1, vAxis2)

  IC_Transform(
    function { Fn(x, y, z) },
    transform { Reorient_Trans(vAxis1, vAxis2) }
  )

#end // macro IC_Reorient


#macro IC_AxisRotate(Fn, Angle)

  IC_Transform(
    function { Fn(x, y, z) },
    transform { Axis_Rotate_Trans(vAxis, Angle) }
  )

#end // macro IC_AxisRotate


#macro IC_Matrix(Fn, Mtrx)       // not equivalent to the matrix transform!

  IC_Transform(
    function { Fn(x, y, z) },
    transform {
      matrix <
        Mtrx[0][0], Mtrx[0][1], Mtrx[0][2],
        Mtrx[1][0], Mtrx[1][1], Mtrx[1][2],
        Mtrx[2][0], Mtrx[2][1], Mtrx[2][2],
                 0,          0,          0
      >
    }
  )

#end // macro IC_Matrix

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7


Post a reply to this message

From: Christoph Hormann
Subject: Re: Announce: IsoCSG include file 0.2.1
Date: 16 Mar 2002 10:30:16
Message: <3C936501.FB97AE41@gmx.de>
Tor Olav Kristensen wrote:
> 
> Christoph, I have had a look at the
> code in the iso_csg.inc file.
> 
> And below are some of my suggestions
> for simplifications of those macros.
> 
> [...]

Sorry for the late reply, i had difficulty keeping track of all postings
recently.  

I tested the 'transform' version of the macros some time ago and found no
measurable difference.  I have the tendency to prefer the 'discrete'
version since you can actually see what happens... ;-)

The 'special' transforms will be added in the next release.

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:
Subject: Re: Announce: IsoCSG include file 0.2.1
Date: 18 Mar 2002 07:20:32
Message: <8plb9uge30bck8h0q12g3ljh6imkt4t9tj@4ax.com>
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.

Thank You, Chris. Your include files opened my eyes for simplest morphing I
have ever seen. Perhaps this was used somewhere before but I feel like
discoverer at this moment :-) Check povray.binaries.animations after moment.

All things I had to do were:
1) prepare initial appearance of object as (ISO)CSG
2) prepare final appearance of object as (ISO)CSG
3) write isosurface functions as
      (1-clock)*POV(x,y,z) + clock*v35(x,y,z)
   where  POV and v35 are isocsg combinations

Adventages:
1) Shape is desiagned as previously as simple CSG
2) No trace, interpolate, arrays, loops were involved
3) Morphing is pretty smoth

Disadventages:
Only speed probably but since inly simple functions are involved this
limitation is controled by complexity of CSG

Now I started to dream about
1) from desert to mountains landscape like in Walking With Dinosaurs
2) from seed to tree - with morphing of surface of bark
3) from youth to old age with morphing of wrinkles on the face
4) and so on

ABX


Post a reply to this message

From:
Subject: Re: Announce: IsoCSG include file 0.2.1
Date: 19 Mar 2002 08:32:35
Message: <h9fe9u0s1he7l8lgamkb45q29f6cdbr6l1@4ax.com>
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.

Could it be possible to remove optional "(x,y,z)" from all functions
declaration ? This stops from direct inlining into isosurface.

ABX


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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