File talk:3d-ambigram.jpg

维基共享资源,媒体文件资料库
跳转到导航 跳转到搜索

I am not a POV-Ray expert, but here is the source for generating the 3D ambigram image. Feel free to improve, re-render and post the source! --Entirety 15:42, 16 November 2005 (UTC)[回复]

#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"

global_settings {
  radiosity {
    brightness 0.5
    count 100
    recursion_limit 20
  }
}


camera {
  perspective
  angle 12
  location <60, 50, -65>
  up <0,2,0>
  right <2,0,0>
  look_at <2.5, 2.5, 2.5>
}

#declare MyBox = 
texture {
  pigment { color Gray75 }
  finish { reflection 0.05 }
}

/* The ambigram, made out of small cubes */
box{<0,4,1>,<1,5,2> texture {MyBox}}
box{<0,4,2>,<1,5,3> texture {MyBox}}
box{<0,4,3>,<1,5,4> texture {MyBox}}
box{<0,4,4>,<1,5,5> texture {MyBox}}
box{<1,4,4>,<2,5,5> texture {MyBox}}
box{<2,4,4>,<3,5,5> texture {MyBox}}
box{<3,4,4>,<4,5,5> texture {MyBox}}
box{<0,3,1>,<1,4,2> texture {MyBox}}
box{<0,3,4>,<1,4,5> texture {MyBox}}
box{<3,3,4>,<4,4,5> texture {MyBox}}
box{<0,2,1>,<1,3,2> texture {MyBox}}
box{<0,2,2>,<1,3,3> texture {MyBox}}
box{<0,2,3>,<1,3,4> texture {MyBox}}
box{<0,2,4>,<1,3,5> texture {MyBox}}
box{<1,2,4>,<2,3,5> texture {MyBox}}
box{<2,2,4>,<3,3,5> texture {MyBox}}
box{<0,1,1>,<1,2,2> texture {MyBox}}
box{<0,1,4>,<1,2,5> texture {MyBox}}
box{<3,1,4>,<4,2,5> texture {MyBox}}
box{<0,0,0>,<1,1,1> texture {MyBox}}
box{<1,0,0>,<2,1,1> texture {MyBox}}
box{<2,0,0>,<3,1,1> texture {MyBox}}
box{<3,0,0>,<4,1,1> texture {MyBox}}
box{<0,0,1>,<1,1,2> texture {MyBox}}
box{<0,0,4>,<1,1,5> texture {MyBox}}
box{<1,0,4>,<2,1,5> texture {MyBox}}
box{<2,0,4>,<3,1,5> texture {MyBox}}
box{<3,0,4>,<4,1,5> texture {MyBox}}

light_source {
  <1000, 2.5, 2.5>
  color <4,0,0>
  spotlight
  radius 0.001
  falloff 0.4
  tightness 0.1
  area_light <0, 200, 0>, <0, 0, 200>, 30, 30
  jitter
  adaptive 1
  point_at <2.5, 2.5, 2.5>
}

light_source {
  <2.5, 2.5, -1005>
  color <0,4,0>
  spotlight
  radius 0.001
  falloff 0.4
  tightness 0.1
  area_light <200, 0, 0>, <0, 200, 0>, 30, 30
  jitter
  adaptive 1
  point_at <2.5, 2.5, 2.5>
}

light_source {
  <2.5,1000,2.5>
  color <0,0,4>
  spotlight
  radius 0.001
  falloff 0.4
  tightness 0.1
  area_light <200, 0, 0>, <0, 0, 200>, 30, 30
  jitter
  adaptive 1
  point_at <2.5, 2.5, 2.5>
}

light_source {
  <2.5,2.5,2.5>
  color Gray75
  area_light <1, 0, 0>, <0, 1, 0>, 10, 10
  jitter
  adaptive 1
  fade_distance 2
  fade_power 3
}

plane {y, -5
  pigment {
    color White
  }
}

plane {x, -5
  pigment {
    color White
  }
}

plane {z, 10
  pigment {
    color White
  }
}