NaNJAN

2004.10.27 반짝이는 공 그리기

방명록에 강현숙님이 POV-Ray에 대한 질문을 하셔서 그 질문에 답변하기 위해서 씁니다.

먼저 준비작업으로 체크모양의 바닥에 반짝이는 공을 1개 올려놓겠습니다. 공은<0, 0, 0>인 위치에 놓고,크기는 반지름이 0.5짜리의 공을 그렸습니다.


// 파일이름 : sphere.pov

#include "colors.inc"

global_settings {
assumed_gamma 1.0
max_trace_level 5
}


camera {
location <0.0, 3, -5.0>
right x*image_width/image_height
look_at <0.0, 0.0, 0.0>
}

sky_sphere {
pigment {
gradient y
color_map {
[0.0 rgb <0.6,0.7,1.0>]
[0.7 rgb <0.0,0.1,0.8>]
}
}
}

light_source {
<0, 0, 0>
color rgb <1, 1, 1>
translate <-30, 30, -30>
}


plane {
y, -1
texture
{
pigment {
checker
color rgb 1
color blue 1
scale 0.5
}
finish{
diffuse 0.8
ambient 0.1
}
}
}

#declare Ball = sphere {
<0, 0, 0>, 0.5
texture {
pigment {
color rgb <0.8,0.8,1.0>
}
finish{
diffuse 0.3
ambient 0.0
specular 0.6
reflection {
0.8
metallic
}
conserve_energy
}
}
}

object { Ball }

설정

트랙백

댓글