POV-Ray : Newsgroups : povray.advanced-users : Fishtail math ><}}}*> Server Time
30 Jul 2024 12:27:09 EDT (-0400)
  Fishtail math ><}}}*> (Message 17 to 26 of 26)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: TonyB
Subject: Re: Fishtail math ><}}}*>
Date: 20 Nov 1999 07:48:09
Message: <38369889@news.povray.org>
This just crashed my UVPOV during the creation of the bounding slabs. It
said something about Reallocing Finite to 33...


Post a reply to this message

From: ingo
Subject: Re: Fishtail math ><}}}*>
Date: 20 Nov 1999 08:04:52
Message: <8E84859B8seed7@212.120.113.81>
TonyB wrote:

>This just crashed my UVPOV during the creation of the bounding slabs. It
>said something about Reallocing Finite to 33...
>

Ooops, posted it a bit too ethousiastic.
Add after the #declare Angle statement
#if (Angle !=0)
   and before the last #declare i=0
#end

Also the x-coordinate value of Ccenter seems to be not ok yet.


Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Remco de Korte
Subject: Re: Fishtail math ><}}}*>
Date: 20 Nov 1999 08:52:48
Message: <3836A79B.6502BDE8@xs4all.nl>
Greg M. Johnson wrote:
> 
> I think there is a more serious problem with the sin cos solution.
> 
> The sin cos solution prevents non unique positions along the x axis.
> Many
> kinds of aquatic animals, maybe some fish, would bend their bodies
> around so
> much that there might be two points of the body at some given x.
> 
> Remco de Korte wrote:
> 

I don't understand. This is just the thing that makes sin or cos a
reasonable choice, I thought. 
I'm obviously missing something very important here. The only thing that
I have to support my choice is a working animation that does what it
should do for me, but, admittedly, is probably not what a hardcore
pov-er would consider realistic.

Regards,

Remco


Post a reply to this message

From: ingo
Subject: Re: Fishtail math ><}}}*>
Date: 20 Nov 1999 09:27:18
Message: <8E849EBDBseed7@212.120.113.81>
Remco de Korte wrote:

>Greg M. Johnson wrote:
>> 
>> I think there is a more serious problem with the sin cos solution.
>> 
>> The sin cos solution prevents non unique positions along the x axis.
>> Many
>> kinds of aquatic animals, maybe some fish, would bend their bodies
>> around so
>> much that there might be two points of the body at some given x.
>> 
>> Remco de Korte wrote:
>> 
>
>I don't understand. This is just the thing that makes sin or cos a
>reasonable choice, I thought.......

For a simple fishtail you're right. But sometimes it's a sport doing thing 
a certain way. Run a 60 frame animation of the below scene (~5 minutes), it 
shows what Greg means.

#version 3.1;
global_settings {assumed_gamma 1.0}
light_source {
   < 500, 500,-500>
   rgb 1
}
camera {
   location  <4, 0, -10>
   look_at   <4, 0.0,0.0>
   angle 90
}
// generates number between min & max
// based on Value between 0, 1.
#macro Vmm(Min,Max,Value)
   (Min+((Max-Min)*Value))
#end //macro

#declare Pos=array[150]

#declare i=0;
#while (i<150) 
   #declare Pos[i]=<i/10,0,0>; 
   #declare i=i+1; 
#end

#declare Angle   = radians(Vmm(-4,4,clock));
#if (Angle !=0)
   #declare Length  = Pos[1].x-Pos[0].x;
   #declare Radius  = Length/Angle;
   #declare Ccenter = <0, Radius, 0>;
   
   #declare i=0;
   #while (i<150)
      #if (Pos[i].x=0)
         // do nothing
      #else
         #declare L= Pos[i].x;
         #declare Alpha= L/Radius;
         #declare Pos[i]=
(vrotate(<0,-Radius,0>,<0,0,degrees(Alpha)>))+Ccenter;
      #end
      #declare i=i+1; 
   #end
#end

#declare i=0;
#while (i<150) 
   sphere{ Pos[i],0.3 pigment {rgb <1,0,0>}}
   #declare i=i+1; 
#end


Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Remco de Korte
Subject: Re: Fishtail math ><}}}*>
Date: 20 Nov 1999 11:35:50
Message: <3836CDD1.6CEE9DA6@xs4all.nl>
ingo wrote:
> 
> Remco de Korte wrote:
> 
> >Greg M. Johnson wrote:
> >>
> >> I think there is a more serious problem with the sin cos solution.
> >>
> >> The sin cos solution prevents non unique positions along the x
> axis.
> >> Many
> >> kinds of aquatic animals, maybe some fish, would bend their bodies
> >> around so
> >> much that there might be two points of the body at some given x.
> >>
> >> Remco de Korte wrote:
> >>
> >
> >I don't understand. This is just the thing that makes sin or cos a
> >reasonable choice, I thought.......
> 
> For a simple fishtail you're right. But sometimes it's a sport doing
> thing
> a certain way. Run a 60 frame animation of the below scene (~5
> minutes), it
> shows what Greg means.
> 
> #version 3.1;
> global_settings {assumed_gamma 1.0}
> light_source {
>    < 500, 500,-500>
>    rgb 1
> }
> camera {
>    location  <4, 0, -10>
>    look_at   <4, 0.0,0.0>
>    angle 90
> }
> // generates number between min & max
> // based on Value between 0, 1.
> #macro Vmm(Min,Max,Value)
>    (Min+((Max-Min)*Value))
> #end //macro
> 
> #declare Pos=array[150]
> 
> #declare i=0;
> #while (i<150)
>    #declare Pos[i]=<i/10,0,0>;
>    #declare i=i+1;
> #end
> 
> #declare Angle   = radians(Vmm(-4,4,clock));
> #if (Angle !=0)
>    #declare Length  = Pos[1].x-Pos[0].x;
>    #declare Radius  = Length/Angle;
>    #declare Ccenter = <0, Radius, 0>;
> 
>    #declare i=0;
>    #while (i<150)
>       #if (Pos[i].x=0)
>          // do nothing
>       #else
>          #declare L= Pos[i].x;
>          #declare Alpha= L/Radius;
>          #declare Pos[i]=
> (vrotate(<0,-Radius,0>,<0,0,degrees(Alpha)>))+Ccenter;
>       #end
>       #declare i=i+1;
>    #end
> #end
> 
> #declare i=0;
> #while (i<150)
>    sphere{ Pos[i],0.3 pigment {rgb <1,0,0>}}
>    #declare i=i+1;
> #end
> 
> Ingo
> 
> --
> Photography: http://members.home.nl/ingoogni/
> Pov-Ray    : http://members.home.nl/seed7/

I tried rendering it but I still don't understand.
I admit this doesn't look good, but I didn't know the exact settings for
the animation(clock-values). What I did see was that there's no sin or
cos in your source so that doesn't clarify it to me either.
I'm sorry.
Still, it's not my problem 8)

Ciao!

Remco


Post a reply to this message

From: Remco de Korte
Subject: Re: Fishtail math ><}}}*>
Date: 20 Nov 1999 11:59:26
Message: <3836D35A.4D3714B8@xs4all.nl>
Just to make sure I totally misunderstand, render this:

#version 3.1;
global_settings {assumed_gamma 1.0}
light_source {
   < 500, 500,-500>
   rgb 1
}
camera {
   location  <4, 0, -10>
   look_at   <4, 0.0,0.0>
   angle 90
}

#declare yy_off=sin(clock*10*pi/5);

#declare xx=0; #while (xx<=10)
  #declare yy=sin((xx+clock*10)*pi/5)-yy_off; 
  #sphere{<xx,yy,0>,.5 pigment{rgb<1,0,0>}}
#declare xx=xx+1;#end

with clock going from 0 to 1 (the number of frames is up to you, I tried
20). Apart from the fact that the distance between the spheres isn't
constant (which is easy to fix) what's wrong with it? I guess this is
not what you're looking for but I don't see what is.
And as for Greg's remark ("The sin cos solution prevents non unique
positions along the x axis.") this shows that there's no problem there.
I didn't say you had to use sin AND cos, just one of them is enough, or
use a clever combination to get more interesting wave-forms (I have a
little program that can illustrate that).

Bye,

Remco


Post a reply to this message

From: ingo
Subject: Re: Fishtail math ><}}}*>
Date: 20 Nov 1999 13:09:35
Message: <8E84C0E1Eseed7@212.120.113.81>
Remco de Korte wrote:
>
>I tried rendering it but I still don't understand.
>I admit this doesn't look good, but I didn't know the exact settings for
>the animation(clock-values). 

0 to 1.
I think we're talking a bit "langs elkaar heen".
My point with the anim was to illustrate that you can have non-unique x-
values because there are no sin / cos functions.

>What I did see was that there's no sin or
>cos in your source so that doesn't clarify it to me either.
>I'm sorry.
>Still, it's not my problem 8)

And I've solved mine :)

>Just to make sure I totally misunderstand, render this:
>[...]
>with clock going from 0 to 1 (the number of frames is up to you, I tried
>20). Apart from the fact that the distance between the spheres isn't
>constant (which is easy to fix) what's wrong with it? I guess this is
>not what you're looking for but I don't see what is.

There's noting wrong. My main problem was the non constant distances and 
that's solved.

>And as for Greg's remark ("The sin cos solution prevents non unique
>positions along the x axis.") this shows that there's no problem there.
>I didn't say you had to use sin AND cos, just one of them is enough, or
>use a clever combination to get more interesting wave-forms (I have a
>little program that can illustrate that).

SinCos? I've seen it on your page, not tried it yet, but I will.

Thank you, and Peter, for your comments. It helped me solve my problem.

Tsjuus,
Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Remco de Korte
Subject: Re: Fishtail math ><}}}*>
Date: 20 Nov 1999 14:04:28
Message: <3836F0A7.F9D2B0D4@xs4all.nl>
ingo wrote:
> 
> Remco de Korte wrote:
> >
> >I tried rendering it but I still don't understand.
> >I admit this doesn't look good, but I didn't know the exact settings
> for
> >the animation(clock-values).
> 
> 0 to 1.
> I think we're talking a bit "langs elkaar heen".
> My point with the anim was to illustrate that you can have non-unique
> x-
> values because there are no sin / cos functions.
> 

Okidoki, and my point was that using sin or cos you can do everything
you want 8)
(as a matter of fact, at school I refused to give any attention to sin
or cos and now it is the part of math I use the most)

Remco


Post a reply to this message

From: Peter Popov
Subject: Re: Fishtail math ><}}}*>
Date: 20 Nov 1999 15:05:09
Message: <u=w2OEGxFsONYadZI3BIQp3IwMJt@4ax.com>
On 20 Nov 1999 04:13:41 -0500, ing### [at] homenl (ingo) wrote:

>Peter Popov wrote:
>
>>I got your intentions wrong. This should do what you want, as
>>described in your original post.
>>
>>#declare Pos=array[11]
>>
>>#declare i=0;
>>#while (i<11) #declare Pos[i]=<i,0,0>; #declare i=i+1; #end
>>
>>#declare i=0;
>>#while (i<10)
>>  #declare j=i+1;
>>  #while (j<11)
>>    #declare Pos[i]=
>>    vrotate((Pos[j]-Pos[i]),<0,0,10*clock>)+Pos[i];
>>    #declare j=j+1;
>>  #end
>>  #declare i=i+1;
>>#end
>
>Sorry but no, ten spheres end up at <10,0.9,0> and one at <10,0,0>.
>
>Ingo

Sorry, that was a typo. it should read

#declare Pos=array[11]

#declare i=0; #while (i<11) #declare Pos[i]=<i,0,0>; #declare i=i+1;
#end

#declare i=0;
#while (i<10)
  #declare j=i+1;
  #while (j<11)
    #declare Pos[j]=  // here was the typo
    vrotate((Pos[j]-Pos[i]),<0,0,10*sin(2*pi*clock)>)+Pos[i];
    //the previous line was modified to make a cyclic anim
    #declare j=j+1;
  #end
  #declare i=i+1;
#end

I actually tested it this time :), and it worked.


Peter Popov
ICQ: 15002700


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Fishtail math ><}}}*>
Date: 22 Nov 1999 16:20:40
Message: <3839B2F4.3D337102@my-dejanews.com>
Here's an example of use of the "non sin cos" solution.

Look at "Does a snake's tail move?" in p.b.a, an entry at 1/23/99.

I serially rotated part of the snake's tail relative to the rest of the
snake.  I used sin & cos to rotate the snake.  I did not use, however, sin
or cos to displace body segments a distance along a line normal to the
x-axis. Look at my code included therein......

Remco de Korte wrote:

> ingo wrote:
> >
> > Remco de Korte wrote:
> > >
> > >I tried rendering it but I still don't understand.
> > >I admit this doesn't look good, but I didn't know the exact settings
> > for
> > >the animation(clock-values).
> >
> > 0 to 1.
> > I think we're talking a bit "langs elkaar heen".
> > My point with the anim was to illustrate that you can have non-unique
> > x-
> > values because there are no sin / cos functions.
> >
>
> Okidoki, and my point was that using sin or cos you can do everything
> you want 8)
> (as a matter of fact, at school I refused to give any attention to sin
> or cos and now it is the part of math I use the most)
>
> Remco


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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