File:Trilite.png

Uploaded by Kostmo
Upload date 2010-09-06T00:45:53Z
MIME type image/png
Dimensions 800 × 600 px
File size 74.3 KB

Summary

Description
English: A doubly-truncated cylinder, illuminated by 3 perpendicular spotlights. Inspired by File:Dualite.jpg. Also known as a "cork plug". [1]
Date
Source Own work
Author Kostmo
PNG development
InfoField
 This image was created with POV-Ray.

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution
This file is licensed under the Creative Commons Attribution 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

Source code

// Author: Karl Ostmo
// Date: 09/05/2010
// Version: 1.2

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

#declare camera_pos = 7;
#declare point_lightsource_pos = 20;

#declare spotlight_distance = 60;

#declare wall_spacing = 3;
#declare object_radius = 0.75;

#declare object_right_edge = wall_spacing - object_radius;
#declare wedge_slope = 0.5;

#declare first_wedge_plane_z_intercept = wall_spacing - wedge_slope*object_right_edge;
#declare first_wedge_plane_distance = first_wedge_plane_z_intercept / sqrt(wedge_slope*wedge_slope + 1);

#declare second_wedge_plane_z_intercept = wall_spacing + wedge_slope*object_right_edge;
#declare second_wedge_plane_distance = second_wedge_plane_z_intercept / sqrt(wedge_slope*wedge_slope + 1);

camera {
	location camera_pos
	look_at	0
}

difference {
	intersection {

		cylinder {
			<wall_spacing - object_radius, wall_spacing, wall_spacing>, <wall_spacing + object_radius, wall_spacing, wall_spacing>, object_radius
		}

		plane {
			<-1, 0, 1/wedge_slope>, first_wedge_plane_distance
		}
	}

	plane {
		<1, 0, 1/wedge_slope>, second_wedge_plane_distance
	}

	pigment {
		Candy_Cane
		scale 0.25
	}
}

#declare planes = array[3] {x, y, z}

#declare lightsource_positions = array[3] {
	<spotlight_distance, wall_spacing, wall_spacing>,
	<wall_spacing, spotlight_distance, wall_spacing>,
	<wall_spacing, wall_spacing, spotlight_distance>
}

#declare lightsource_targets = array[3] {
	<0, wall_spacing, wall_spacing>,
	<wall_spacing, 0, wall_spacing>,
	<wall_spacing, wall_spacing, 0>
}

#declare lightsource_colors = array[3] {
	Red,
	Green,
	Blue
}

#declare Index = 0;
#while(Index < 3)

	light_source {
	    lightsource_positions[Index]
	    color White
	    spotlight
	    radius 1
	    falloff 2.5
	    point_at lightsource_targets[Index]
	}

	plane {
		planes[Index], 0
		pigment {
			lightsource_colors[Index]
		}
	}

	#declare Index = Index + 1;
#end

light_source {
	point_lightsource_pos
	color 0.4
}

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

5 September 2010

76,133 byte

600 pixel

800 pixel

image/png

e2065c1b56cd476c9c0d67e0910544aaff83c122

Category:Axonometric projections Category:CC-BY-3.0 Category:Created with Persistence of Vision Category:Images with Povray source code Category:Self-published work