#version 3.7; global_settings{ assumed_gamma 1.0 } #declare SCALE=5; #declare TRACTION=15; #declare ZOOM=2*SCALE+1; #declare C1= camera { location -40*z+50*y up y right x*image_width/image_height look_at 0 angle 15 rotate 120*y }; #declare C2= camera { orthographic location 50*y up ZOOM*z right ZOOM*x*image_width/image_height look_at 0 //angle 15 rotate -180*y } #declare C3 = camera { C2 rotate 90*x } #declare C4 = camera { C3 rotate 90*y } //camera { grid 2 C2 C1 C3 C4 } #local CC=array[4]{C1 C2 C3 C4 }; camera { CC[frame_number] } light_source { -20*z+10*y-5*x, 1 rotate 30*y } #default{ finish{ emission 0.2 diffuse 0.6 reflection 0.2 ambient 0 }} #declare T=texture { checker texture {pigment { color srgb 0.5 } finish { emission .5 diffuse 0.5 reflection 0 } } texture {pigment { color srgb 0.9 } finish { emission .5 diffuse 0.5 reflection 0 } } }; plane { y, 0 texture { T } no_shadow} plane { -z, 300 texture { T } no_shadow} plane { -x, 300 texture { T } no_shadow} #declare A = SCALE*<-1,0,-1>; #declare B = SCALE*<-1,0, 1>; #declare C = SCALE*<1, 0, 1>; #declare D = SCALE*<1, 1/3, -1>; #declare P = (A+B)/2+y/4*TRACTION-x/3*TRACTION; #declare Q = (B+C)/2+y*TRACTION; #declare R = (C+D)/2+y/4*TRACTION+x/3*TRACTION; #declare S = (D+A)/2+y*TRACTION; #macro Point( X ) sphere { 0, 0.25 texture { pigment { color green 1 blue 1 } finish { emission .5 reflection 0 diffuse 0.5 ambient 0 } } translate X } #if (X.y > 0) cylinder { X, , 0.3 texture { pigment { color green 1 } } } #end #end #macro Connect( X, Y ) cylinder { X, Y, 0.05 texture { pigment { color red 1 green abs(X.y-Y.y) } } } #end #macro Curve( X, Y, Z ) #local Spli = spline{ cubic_spline -1, X-(Y-X), 0, X, //0.5, Y, 1, Z 2, Z-(Y-Z), } #local STEP=120; #for(i,0,STEP,1) #local V = Spli(i/STEP); sphere{ V, 0.1 texture { pigment { color blue 1 } } } #end #end Point(A) Point(B) Point(C) Point(D) Connect(A,B) Connect(B,C) Connect(C,D) Connect(D,A) Connect(A,C) Connect(B,D) Curve(A,P,B) Curve(B,Q,C) Curve(C,R,D) Curve(D,S,A)