//EXAMPLE OF PROJECTION OF 16-CELL //EDGE FRAMEWORK //Files with predefined colors and textures #include "colors.inc" #include "glass.inc" #include "golds.inc" #include "metals.inc" #include "stones.inc" #include "woods.inc" #include "textures.inc" //Place the camera camera { sky <0,0,1> //Don't change this direction <-1,0,0> //Don't change this right <-4/3,0,0> //Don't change this location <3,8,13> //Camera location look_at <0,0,0> //Where camera is pointing angle 10 //Angle of the view } //Ambient light to "brighten up" darker pictures global_settings { ambient_light White } global_settings { max_trace_level 10 } //Place a light light_source { <10,20,30> color White*2 } //Set a background color background { color White } #declare points = 0; #declare dim = 0; #declare tempvar = 0; //Open data file and read in data #fopen datafile "data.txt" read #read ( datafile, points ) #read ( datafile, dim ) #declare num = points * (dim - 1); #declare x = array[num] { {#read (datafile, tempvar)} } #declare r=.03; //Edges of the projection union{ cylinder { x[0], x[1], r } cylinder { x[0], x[2], r } cylinder { x[0], x[3], r } cylinder { x[1], x[0], r } cylinder { x[1], x[2], r } cylinder { x[1], x[3], r } cylinder { x[2], x[0], r } cylinder { x[2], x[1], r } cylinder { x[2], x[3], r } cylinder { x[3], x[0], r } cylinder { x[3], x[1], r } cylinder { x[3], x[2], r } texture{Lightning2} } #declare s=.06; //Vertices of the projection union{ sphere{q[0],s} sphere{q[1],s} sphere{q[2],s} sphere{q[3],s} sphere{q[4],s} sphere{q[5],s} sphere{q[6],s} sphere{q[7],s} texture {T_Gold_1A} }