Skip to content

Instantly share code, notes, and snippets.

@thewestwind
Created February 26, 2015 20:02
Show Gist options
  • Select an option

  • Save thewestwind/172b944b855913e17f93 to your computer and use it in GitHub Desktop.

Select an option

Save thewestwind/172b944b855913e17f93 to your computer and use it in GitHub Desktop.
// -*- pov -*-
#include "functions.inc"
#include "colors.inc"
#macro Prologue()
global_settings {
assumed_gamma 2.2
}
camera {
orthographic
location y*10
look_at 0
right image_width*z/image_height
angle 70
}
#end
#macro CM_Rainbow(Count)
color_map {
#local X = 0;
#while (X < Count)
[ X/Count color CHSV2RGB(<360*X/Count, 1, 1>) ]
#local X = X + 1;
#end
}
#end
#macro Plane(Pigment)
plane {
y, 0
texture {
Pigment
}
}
#end
// This renders to some face; I'm using the output of a torus function
// as the input to a noise function... looks best at a 16:9 or 8:5
// aspect ratio
// Command line: povray hq.ini +IFace.pov
#version 3.62;
#include "Common.inc"
Prologue()
#local F2 = function(x, y) {
f_torus(x, 0, y, 1, 2)
}
#local F = function(x, y, shift) {
f_noise3d(F2(x+shift, y), F2(y+shift, x), 0)
}
Plane(
pigment {
function { F(x/0.7, z/0.7, 3) }
CM_Rainbow(30)
phase 0.48
}
)
+v
+FN16
+Q0
+w1680
+h1050
-D
+A0.1
+AM2
+J0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment