POV-Ray : Newsgroups : povray.animations : Animating Isosurface question Server Time
24 Nov 2024 02:28:47 EST (-0500)
  Animating Isosurface question (Message 1 to 6 of 6)  
From: Steve Shelby
Subject: Animating Isosurface question
Date: 17 Jan 2003 08:51:07
Message: <3e280a4b@news.povray.org>
Hello,
I have an isosurface with two forms, as follows:

#declare P1=function{pigment{leopard
   colour_map{[0.0  rgb 0.3]
              [0.1  rgb 0.0]
              [1.0  rgb -.3]}
   scale 0.15
}}
#declare P2=function{pigment{leopard
   colour_map{[0.0  rgb 0.1]
              [0.1  rgb 0.0]
              [1.0  rgb 1.8]}
   scale 0.15

I'd like to be able to animate the transition between the two forms. I have
clockmod and have studied the tutorials, but the answer doesn't seem to be
there. Is there a way to do this?

Thasnk you,
Steve Shelby


Post a reply to this message

From: ABX
Subject: Re: Animating Isosurface question
Date: 17 Jan 2003 08:56:26
Message: <1j2g2vorak2gve9rrinj1d1ffu6hu4dlef@4ax.com>
On Fri, 17 Jan 2003 08:57:17 -0500, "Steve Shelby" <ssh### [at] rexnetnet> wrote:
> #declare P1=function{pigment{leopard ...
> #declare P2=function{pigment{leopard ...

assuming clock goes from 0 to 1 it could be something like:

  #declare P=function{(1-clock)*P1(x,y,z).gray+clock*P2(x,y,z).gray};

such solution in extended form was used in:

http://news.povray.org/povray.binaries.animations/23891/167475/wip.mpg

ABX


Post a reply to this message

From: Andrew Cocker
Subject: Re: Animating Isosurface question
Date: 17 Jan 2003 12:49:10
Message: <3e284216@news.povray.org>
"Steve Shelby" <ssh### [at] rexnetnet> wrote in message news:3e280a4b@news.povray.org...
> Hello,
> I have an isosurface with two forms, as follows:
>
> #declare P1=function{pigment{leopard
>    colour_map{[0.0  rgb 0.3]
>               [0.1  rgb 0.0]
>               [1.0  rgb -.3]}
>    scale 0.15
> }}
> #declare P2=function{pigment{leopard
>    colour_map{[0.0  rgb 0.1]
>               [0.1  rgb 0.0]
>               [1.0  rgb 1.8]}
>    scale 0.15
>
> I'd like to be able to animate the transition between the two forms. I have
> clockmod and have studied the tutorials, but the answer doesn't seem to be
> there. Is there a way to do this?

A more easily understandable way of doing it (for those who, like me, have limited
math
skills) would be:

#include "AutoClck.mcr"

#declare Val_1=0.3;
Declare_From (Val_1,0)
Declare_To_Using (Val_1,1,0.1,"S")

#declare Val_2=-0.3;
Declare_From (Val_2,0)
Declare_To_Using (Val_2,1,1.8,"S")

#declare P1=function{pigment{leopard
    colour_map{[0.0  rgb Val_1]
               [0.1  rgb 0.0]
               [1.0  rgb Val_2]}
    scale 0.15
 }}

This is untested, but it should work.

All the best,

Andy Cocker


Post a reply to this message

From: Steve Shelby
Subject: Re: Animating Isosurface question
Date: 18 Jan 2003 09:57:23
Message: <3e296b53@news.povray.org>
ABX,
Thanks for your reply. That animation is awesome. I forgot to include in my
first post the next line of the isosurface, which is:

isosurface {
   function { y -P (x,0,z).red*0.4}

If  I make P either P1 or P2 it will render, but not just P and the line you
showed me. I'm in over my head with this, so I'm either going to need expert
help or wait until I have enough experience to understand it better.
Steve


ABX <abx### [at] abxartpl> wrote in message
news:1j2g2vorak2gve9rrinj1d1ffu6hu4dlef@4ax.com...
> On Fri, 17 Jan 2003 08:57:17 -0500, "Steve Shelby" <ssh### [at] rexnetnet>
wrote:
> > #declare P1=function{pigment{leopard ...
> > #declare P2=function{pigment{leopard ...
>
> assuming clock goes from 0 to 1 it could be something like:
>
>   #declare P=function{(1-clock)*P1(x,y,z).gray+clock*P2(x,y,z).gray};
>
> such solution in extended form was used in:
>
> http://news.povray.org/povray.binaries.animations/23891/167475/wip.mpg
>
> ABX


Post a reply to this message

From: Steve Shelby
Subject: Re: Animating Isosurface question
Date: 18 Jan 2003 10:01:06
Message: <3e296c32@news.povray.org>
Andrew,
I tried it, no luck. but I just realized I forgot to include the next line
defining the isosurface, which is:

isosurface {
   function { y -P1 (x,0,z).red*0.4}

If that makes any difference.
Steve

Andrew Cocker <mai### [at] andrewcockercouk> wrote in message
news:3e284216@news.povray.org...
> "Steve Shelby" <ssh### [at] rexnetnet> wrote in message
news:3e280a4b@news.povray.org...
> > Hello,
> > I have an isosurface with two forms, as follows:
> >
> > #declare P1=function{pigment{leopard
> >    colour_map{[0.0  rgb 0.3]
> >               [0.1  rgb 0.0]
> >               [1.0  rgb -.3]}
> >    scale 0.15
> > }}
> > #declare P2=function{pigment{leopard
> >    colour_map{[0.0  rgb 0.1]
> >               [0.1  rgb 0.0]
> >               [1.0  rgb 1.8]}
> >    scale 0.15
> >
> > I'd like to be able to animate the transition between the two forms. I
have
> > clockmod and have studied the tutorials, but the answer doesn't seem to
be
> > there. Is there a way to do this?
>
> A more easily understandable way of doing it (for those who, like me, have
limited math
> skills) would be:
>
> #include "AutoClck.mcr"
>
> #declare Val_1=0.3;
> Declare_From (Val_1,0)
> Declare_To_Using (Val_1,1,0.1,"S")
>
> #declare Val_2=-0.3;
> Declare_From (Val_2,0)
> Declare_To_Using (Val_2,1,1.8,"S")
>
> #declare P1=function{pigment{leopard
>     colour_map{[0.0  rgb Val_1]
>                [0.1  rgb 0.0]
>                [1.0  rgb Val_2]}
>     scale 0.15
>  }}
>
> This is untested, but it should work.
>
> All the best,
>
> Andy Cocker
>
>
>
>


Post a reply to this message

From: Steve Shelby
Subject: Re: Animating Isosurface question
Date: 18 Jan 2003 20:42:32
Message: <3e2a0288@news.povray.org>
Success!
After sending the previous message, I realized that the line you sent was
similar to the line I had just sent. After some experimentation, I  arrived
at the following:

isosurface {
   function { y -(1-clock)* P1 (x,0,z).red*0.4-clock*P2(x,0,z).red*0.4}

It works exactly as desired. I'm posting a clip (with 2nd half of loop added
in VideoMach) in povray.binaries.animations.
Thanks a lot for helping me with this.
Steve



ABX <abx### [at] abxartpl> wrote in message
news:1j2g2vorak2gve9rrinj1d1ffu6hu4dlef@4ax.com...
> On Fri, 17 Jan 2003 08:57:17 -0500, "Steve Shelby" <ssh### [at] rexnetnet>
wrote:
> > #declare P1=function{pigment{leopard ...
> > #declare P2=function{pigment{leopard ...
>
> assuming clock goes from 0 to 1 it could be something like:
>
>   #declare P=function{(1-clock)*P1(x,y,z).gray+clock*P2(x,y,z).gray};
>
> such solution in extended form was used in:
>
> http://news.povray.org/povray.binaries.animations/23891/167475/wip.mpg
>
> ABX


Post a reply to this message

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