POV-Ray : Newsgroups : povray.animations : Waving Flag Animation - source Server Time
24 Nov 2024 05:44:25 EST (-0500)
  Waving Flag Animation - source (Message 1 to 1 of 1)  
From: Code Warrior
Subject: Waving Flag Animation - source
Date: 30 Nov 2001 16:33:54
Message: <3c07fb42$1@news.povray.org>
For those who are looking for a waving flag type object in POV:

--- flag.ini ---------------------------------------------------
; Persistence Of Vision raytracer version 3.5 sample file.

User_Abort_Command=command /C del bounce.txt

Input_File_Name=flag.pov

Initial_Frame=1
Final_Frame=40
Initial_Clock=0
Final_Clock=1

Cyclic_Animation=on
Pause_when_Done=off

--- flag.pov ---------------------------------------------------
#include "colors.inc"
#include "metals.inc"

light_source {
  <-2, 2, -5>
  color rgb 1
}

camera {
  location  <0, -0.2, -1.75>
  look_at   <0, 0,  0>
}

#declare increments = 50;
#declare state = (1-clock) * 2;
#declare x1 = 0.0;
#declare z1 = 0.0;
#declare y1 = 0.0;
#declare y2 = 1.0;

union {
#declare I = 1;
#while (I <= increments)
 #declare x2 = I / increments;
 #declare z2 = sin(((I / increments)+state) * pi) * (I / increments);
 triangle {
  <x1,y1,z1>,<x1,y2,z1>,<x2,y2,z2>
 }
 triangle {
  <x1,y1,z1>,<x2,y2,z2>,<x2,y1,z2>
 }
 #declare I = I + 1;
 #declare x1 = x2;
 #declare z1 = z2;
#end
 texture {
  pigment { image_map { sys "flags/gb.bmp" } }
  finish { ambient 0.2 }
 }
 translate < -0.5, -0.5, 0 >
 scale < 1.5, 1, 0.4 >
}

union {
 cylinder { <-0.8, -10, 0>, <-0.8, 0.66, 0>, 0.025 }
 sphere { <-0.8, 0.66, 0>, 0.045 }
 texture { T_Chrome_4C }
}

plane {
 z, 0.75
 texture {
  pigment { color rgb 1 }
  finish { ambient 0.8 }
 }
}

----------------------------------------------------------------


Post a reply to this message

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