// Credit Mike Williams. #version 3.7; global_settings { assumed_gamma 1.0 radiosity {} } camera { perspective location <5,5,-5.001> sky y angle 35 right x*(image_width/image_height) look_at <0,0,0> } sky_sphere { pigment { function{abs(y)} color_map { [0.0 color blue 0.1] [1.0 color rgb 0.1] } } } light_source {<100,200,-100> colour rgb 1} // ---------------------------------------- #declare R1=0.085; // helix minor radius #declare R2=0.3; // helix major radius #declare R3=2.0; // torus major radius #declare Strands=12; // DNA = double strand #declare Turns=6; // number of helix turns in the loop // Turns*Strands should be an integer // to avoid a discontinuity #include "functions.inc" #declare F1=function { f_helix1(x,z,y, Strands, +Turns, R1, R2, 1, 0.8, -20) } #declare F2=function { f_helix1(x,z,y, Strands, -Turns, R1, R2, 1, 0.8, +20) } #declare Buttermilk = srgb <1,0.9451,0.7098>; #declare ButteryWhite = srgb <1,0.98824,0.91765>; isosurface { function{F1(f_r(x,y,z)-R3, y, f_th(x,y,z))} max_gradient 2.3 contained_by {box { <-2.5,-0.4,-2.5>, <+2.5,+0.4,+2.5>} } pigment { Buttermilk } normal { granite scale 1/25 } finish { brilliance pi/2 } } isosurface { function{F2(f_r(x,y,z)-R3, y, f_th(x,y,z))} max_gradient 2.3 contained_by {box { <-2.5,-0.4,-2.5>, <+2.5,+0.4,+2.5>} } pigment { ButteryWhite } normal { granite scale 1/15 } finish { brilliance pi/2 } }