[pov-ray]转动的球[图视]

本文介绍如何使用POV-Ray生成循环动画,包括设置初始帧、最终帧、时钟变量以及实现动画循环。

I:source code

1.ini文件

;POV-Ray animation ini file
Antialias=Off
Antialias_Threshold=0.1
Antialias_Depth=2

Input_File_Name="1.pov" 

Initial_Frame=1     //起始帧1,最后一帧200, 总共产生200张图片
Final_Frame=200


Initial_Clock=0    //在1.pov文件中 clock的值为变量 ,利用这个变量,产生不同的过程图片
Final_Clock=1

Cyclic_Animation=on
Pause_when_Done=off

1.pov文件

#include"colors.inc"
#include"stones.inc"

background {
    color Gray
}

camera {
    location <10, 20, 10>
    look_at <0,0,0>
    //  angle 36
  }

  light_source {
      <500, 500, -1000> White
  }

  plane {
      y, -5
      pigment {  checker  Green White
      }
  }


  #macro myball(xx,zz,yy)
  sphere {
          <xx,0,yy>,0.2
          pigment {Red}
          finish {phong .9}
      }
  #end

  #declare hcircle=union {
  #local pii=3.1415;
  #local rr=5;
  #for (deg,0,360,5)
      #local degg=deg*pii/180.0;
      #local yp=sin(degg)*rr;
      #local xp=cos(degg)*rr;
      myball(xp,0,yp)

  #end

  }

#declare cball=union {
    object {
    hcircle
    }

    object {
    hcircle
    rotate x*90
    }

    object {

    hcircle
    rotate z*90
    }

    sphere {
    <0,0,0>,5
    pigment { White   filter .5}
    finish {phong 1}

    }

}


//clock 0 0.1 0.2 0.3 1
object
{
cball
rotate x*360*clock //clock为 200分之1到  200共200帧图片

}

II:Figure

图片描述

III:Video

视频效果如下:
http://pan.baidu.com/s/1eRcp6iI

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值