[pov-ray]技巧小记

1:类似函数的 宏实现

#macro functionA(a,b,c,d)
union{

}
#end

2:for循环的使用

#for (cnt,0,5,1)   // 0 1 2 3 4 5
object (cnt)
#end

3:物体反光程度调节

finish {phong 0}  //1反光最强(镜面反射最强),发光,光滑  0,无明显的反射

4:torus中两个radius代表的意义(如下图)

torus { 
R,r
pigment {
color Red filter 0.9  //filter 选项可以调节物体的透明程度 0:不透明, 1:最透明
}

finish {phong 1}

}

图片描述

5:常用的pre-defined头文件

#include"colors.inc"
#include"stones.inc"
#include"textures.inc"
#include"shapes.inc"
#include"glass.inc"
#include"metals.inc"
#include"woods.inc"

6:union对象的多次重用

#declare complex_obj=union {}

object { complex_obj}

union {object{} object {}}

7:normal中使用bumps来设置球的表面的粗糙程度和pattern

normal { bumps 0.4 scale 0.2 } //bumps只是一种表达粗糙的pattern
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值