POV-Ray : Newsgroups : povray.binaries.animations : Re: Torus Torture : Re: Torus Torture Server Time
20 Jul 2024 23:24:08 EDT (-0400)
  Re: Torus Torture  
From: Wlodzimierz ABX Skiba
Date: 19 Jan 2001 04:59:51
Message: <3a681017$1@news.povray.org>
Chris Huff wrote in message ...
> In article <3a6746fe@news.povray.org>, "Rune" <run### [at] inamecom>
> wrote:
>
> > "Wlodzimierz ABX Skiba" wrote:
> > > I plan to mix [the deform patch] with tessalation patch
> > > and allow one directional deformations for meshes and
> > > bidirectional for other objects
> >
> > That's interesting. The mesh deformation would be handled in a
> > *completely* different way than for other objects, right?
>
> I think he is talking about a different deformation method that will
> work for all objects, but work by first converting them to a mesh.

I think about joining my method and method with deforming vertices
my method will be applied when you type predefined deform i.e. twist
or type deformations with two defined functions (bi-directional deformation)

box
 {
  1, 1
  texture { texture stuff }
  deform {twist 7}
  deform {MyDeformFunc(x,y,z,7,11) MyUndeformFunc(x,y,z,7,11)}
 }

but when you put only one user defined function or you type deformations
one-directional - this cause error

box
 {
  1, 1
  deform {warp{...}}
  deform {MyDeformFunc(x,y,z,3,5)
 }

noticed parsing *Error*: Only one direction of deformation specified - to achive
proper shape please tesselate it first!

and user must add tesselation with parameters he wants

box
 {
  1, 1
  tesselation { 7, 13, 15}
  deform {warp{...}}
  deform {MyDeformFunc(x,y,z,3,5)
 }

and this is parsed ok.

note that parameters above are only example and has no meaning
this way for such simple deformations like twisting you don't need waste memory
for copy of recalculated vertex becouse all is done with curved ray - but there
is gate for user defined deformation
there is even place for control points

#declare DeformationByControlPoint=
  function
   (
    Point_X,
    Point_Y,
    Point_Z,
    ControlPoint_X,
    ControlPoint_Y,
    ControlPoint_Z,
    Radius,
    Power=1
   )
  {
   /* function changes Point if it is less than radius from Control Point */
  }

#declare MyDeform=deform
 {
  deform { DeformationByControlPoint(x,y,z,1,2,3,2)
  deform { DeformationByControlPoint(x,y,z,7,1,2,4,2)
  deform { DeformationByControlPoint(x,y,z,5,3,1,10)
 }

box
 {
  -1,2
  texture {}
  tesselate {}
  deform { MyDeform }
 }

>> Also, my macro gives the user full control over the deformation. How
>> would the user control the deformation in your patch? (I mean the
>> deformations for meshes.)
>
> Similar to the way patterns and warps are done: a set of predefined
> deformations and maybe function-defined deformations. Maybe warps too.

please notice that you are really convincing
in talking about warps deformations

:-)

ABX


Post a reply to this message

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