POV-Ray : Newsgroups : povray.advanced-users : Fishtail math ><}}}*> : Re: Fishtail math ><}}}*> Server Time
30 Jul 2024 14:18:34 EDT (-0400)
  Re: Fishtail math ><}}}*>  
From: ingo
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

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