Skip to content

Instantly share code, notes, and snippets.

@fmeyer
Created July 29, 2023 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fmeyer/1ca7b14678b5dce5edf7ec80fb97a086 to your computer and use it in GitHub Desktop.
Save fmeyer/1ca7b14678b5dce5edf7ec80fb97a086 to your computer and use it in GitHub Desktop.
Povray scene
#declare FrameNumber = clock; // clock ranges from 0 to 1
camera {
location <FrameNumber * 10, FrameNumber * 10, -20>
look_at <0, 0, 0>
angle 60 // Adjust the field of view, larger means wider field of view.
}
// Light source
light_source {
<2, 4, -3>
color rgb <1, 1, 1>
}
// Sky Spherical background
sky_sphere {
pigment {
gradient y
color_map {
[0.000 0.002 color rgb <0.0, 0.2, 1.0>
color rgb <0.0, 0.2, 1.0>]
[0.002 0.200 color rgb <0.2, 0.3, 0.8>
color rgb <0.2, 0.3, 0.8>]
}
scale 2
translate -1
}
pigment {
bozo
turbulence 0.65
octaves 6
omega 0.7
lambda 2
color_map {
[0.0 0.1 color rgb <0.7, 0.8, 0.9>
color rgb <0.7, 0.8, 0.9>]
[0.1 0.5 color rgb <0.7, 0.8, 0.9>
color rgbt <0.7, 0.8, 0.9, 1>]
[0.5 1.0 color rgbt <0.7, 0.8, 0.9, 1>
color rgbt <0.7, 0.8, 0.9, 1>]
}
scale <0.2, 0.5, 0.2>
}
rotate -135*x
}
// Iridescent dynamic torus
torus {
1+sin(2*pi*clock), 0.5+0.5*cos(2*pi*clock) // Major and minor radii varying with time
rotate -90*clock // so we can see it from the top
texture {
pigment {
radial // The color gradient follows radial direction
color_map {
[0.0 color rgb <1, 0, 0>]
[0.2 color rgb <1, 0.65, 0>]
[0.4 color rgb <0, 1, 0>]
[0.6 color rgb <0, 0, 1>]
[0.8 color rgb <0.29, 0, 0.51>]
[1.0 color rgb <0.93, 0.51, 0.93>]
}
quick_color rgb <1,1,1> // white color
scale 0.01
}
normal {
waves 0.5
turbulence 0.5
}
finish {
ambient 0.1
diffuse 0.9
reflection 0.5
specular 0.9
irid {
0.25 // Iridescence amount
thickness 1.0 // Film thickness
turbulence 0.1 // Turbulence
}
}
}
scale <1+sin(2*pi*clock), 1+cos(2*pi*clock), 1+sin(2*pi*clock)> // Change these values to adjust the size
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment