// This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 // International Public License. // Visit https://creativecommons.org/licenses/by-sa/4.0/. // SPDX-License-Identifier: CC-BY-SA-4.0 // yuqk rndcrnr.pov +W1200 +h900 (quick and ugly) // yuqk rndcrnr.pov +W1200 +h900 +a0.05 +am2 +r3 +j3.33 +d +p #version unofficial 3.8; // yuqk #if (file_exists("version.inc")) #include "version.inc" #end #if (!defined(Fork_yuqk)) #error "This POV-Ray SDL code requires the yuqk fork." #end global_settings { assumed_gamma 1 } #declare Grey10 = srgb <0.1,0.1,0.1>; background { Grey10 } #declare Camera00 = camera { perspective location <2.9,2.9,-2.901> sky y angle 35 right x*(image_width/image_height) look_at <0,0,0> } #declare White = srgb <1,1,1>; #declare Light00 = light_source { <300,150,-400>, White } #declare Red = srgb <1,0,0>; #declare CylinderX = cylinder { -1*x, 1*x, 0.01 pigment { Red } } #declare Green = srgb <0,1,0>; #declare CylinderY = cylinder { -1*y, 1*y, 0.01 pigment { Green } } #declare Blue = srgb <0,0,1>; #declare CylinderZ = cylinder { -1*z, 1*z, 0.01 pigment { Blue } } #include "functions.inc" #declare Radius = 0.5; #declare Circ = 2.0*pi*Radius; #declare CircCrnr = 0.25*Circ; #declare LenLegs = (Circ-CircCrnr)/2.0; #declare HalfWallDepth = 0.010; // Array of points for left leg for f_path function #declare VertexAryLegL = array[3][3] { {-LenLegs,+0.0,-Radius}, {+0.0,+0.0,-Radius}, {-999,-999,-999} } // Array of points for right leg for f_path function #declare VertexAryLegR = array[3][3] { {+Radius,+0.0,+0.0}, {+Radius,+0.0,+LenLegs}, {-999,-999,-999} } // === Connections for 3x3 doubles (64bit floats) f_path #declare Cnct_LR_dbl = f_enc16x_ui4( 0,1, // Connect point 0 to 1 15,15, // Marking end of connections. 0,0, 0,0, 0,0, 0,0, 0,0, 0,0 ); #declare FnLegL = function (x,y,z) { f_path(x,0,z,0,0,HalfWallDepth, VertexAryLegL[0][0],VertexAryLegL[0][1],VertexAryLegL[0][2], VertexAryLegL[1][0],VertexAryLegL[1][1],VertexAryLegL[1][2], VertexAryLegL[2][0],VertexAryLegL[2][1],VertexAryLegL[2][2], Cnct_LR_dbl, 0.0, 0.0, 0.0 ) } #declare FnLegLp = function (x,y,z) { f_path(x,0,z,0,2,HalfWallDepth*1.1, VertexAryLegL[0][0],VertexAryLegL[0][1],VertexAryLegL[0][2], VertexAryLegL[1][0],VertexAryLegL[1][1],VertexAryLegL[1][2], VertexAryLegL[2][0],VertexAryLegL[2][1],VertexAryLegL[2][2], Cnct_LR_dbl, 0.0, 0.0, 0.0 ) } #declare FnLegR = function (x,y,z) { f_path(x,0,z,0,0,HalfWallDepth, VertexAryLegR[0][0],VertexAryLegR[0][1],VertexAryLegR[0][2], VertexAryLegR[1][0],VertexAryLegR[1][1],VertexAryLegR[1][2], VertexAryLegR[2][0],VertexAryLegR[2][1],VertexAryLegR[2][2], Cnct_LR_dbl, 0.0, 0.0, 0.0 ) } #declare FnLegRp = function (x,y,z) { f_path(x,0,z,0,2,HalfWallDepth*1.1, VertexAryLegR[0][0],VertexAryLegR[0][1],VertexAryLegR[0][2], VertexAryLegR[1][0],VertexAryLegR[1][1],VertexAryLegR[1][2], VertexAryLegR[2][0],VertexAryLegR[2][1],VertexAryLegR[2][2], Cnct_LR_dbl, 0.0, 0.0, 0.0 ) } #declare IsoLegL = isosurface { function { FnLegL(x,y,z) } contained_by { box { <-LenLegs,-0,-Radius-HalfWallDepth>,<0,1,-Radius+HalfWallDepth> } } threshold 0 accuracy 0.0005 max_gradient 1.1 } #declare IsoLegR = isosurface { function { FnLegR(x,y,z) } contained_by { box { <+Radius-HalfWallDepth,-0,0>,<+Radius+HalfWallDepth,1,LenLegs> } } threshold 0 accuracy 0.0005 max_gradient 1.1 } #macro ImageMap00(_HF) #if (_HF=0) image_map { "stockholm.jpg" #else "stockholm.jpg" #end #if (_HF=0) map_type 0 interpolate 2 } #end #end #declare Pig_stockholmImage = pigment { ImageMap00(0) scale <1,1125/1000,1> } #declare FnP_stockholmImage = function { pigment { Pig_stockholmImage } } #declare FnP_LegL_R = function (x,y,z) { FnP_stockholmImage(f_range2range(FnLegLp(x,y,z),0,1,0,LenLegs/Circ),y,0).red } #declare FnP_LegL_G = function (x,y,z) { FnP_stockholmImage(f_range2range(FnLegLp(x,y,z),0,1,0,LenLegs/Circ),y,0).green } #declare FnP_LegL_B = function (x,y,z) { FnP_stockholmImage(f_range2range(FnLegLp(x,y,z),0,1,0,LenLegs/Circ),y,0).blue } #declare FnP_LegR_R = function (x,y,z) { FnP_stockholmImage(f_range2range(FnLegRp(x,y,z),0,1,(LenLegs+CircCrnr)/Circ,1),y,0).red } #declare FnP_LegR_G = function (x,y,z) { FnP_stockholmImage(f_range2range(FnLegRp(x,y,z),0,1,(LenLegs+CircCrnr)/Circ,1),y,0).green } #declare FnP_LegR_B = function (x,y,z) { FnP_stockholmImage(f_range2range(FnLegRp(x,y,z),0,1,(LenLegs+CircCrnr)/Circ,1),y,0).blue } #declare Pig_LeftL = pigment { user_defined { function { FnP_LegL_R(x,y,z) }, function { FnP_LegL_G(x,y,z) }, function { FnP_LegL_B(x,y,z) }, , } } #declare Pig_LeftR = pigment { user_defined { function { FnP_LegR_R(x,y,z) }, function { FnP_LegR_G(x,y,z) }, function { FnP_LegR_B(x,y,z) }, , } } #declare ObjLeftL = object { IsoLegL pigment { Pig_LeftL } } #declare ObjLeftR = object { IsoLegR pigment { Pig_LeftR } } #declare FnCrnr = function (x,y,z) { f_elliptical_sphrswp(x,0,z,Radius,Radius,HalfWallDepth,-90,-90,0) } #declare FnCrnrp = function (x,y,z) { f_elliptical_sphrswp(x,0,z,Radius,Radius,HalfWallDepth*1.1,-90,-90,1) } #declare Pink = srgb <1,0.75294,0.79608>; #declare IsoCrnr = isosurface { function { FnCrnr(x,y,z) } contained_by { box { <0,-0,-Radius-HalfWallDepth*2>,<+Radius+HalfWallDepth*2,1,0> } } threshold 0 accuracy 0.0005 max_gradient 1.1 report off } #declare FnP_Crnr_R = function (x,y,z) { FnP_stockholmImage(f_range2range(FnCrnrp(x,y,z),0,1,LenLegs/Circ,(LenLegs+CircCrnr)/Circ),y,0).red } #declare FnP_Crnr_G = function (x,y,z) { FnP_stockholmImage(f_range2range(FnCrnrp(x,y,z),0,1,LenLegs/Circ,(LenLegs+CircCrnr)/Circ),y,0).green } #declare FnP_Crnr_B = function (x,y,z) { FnP_stockholmImage(f_range2range(FnCrnrp(x,y,z),0,1,LenLegs/Circ,(LenLegs+CircCrnr)/Circ),y,0).blue } #declare Pig_Crnr = pigment { user_defined { function { FnP_Crnr_R(x,y,z) }, function { FnP_Crnr_G(x,y,z) }, function { FnP_Crnr_B(x,y,z) }, , } } #declare ObjCrnr = object { IsoCrnr pigment { Pig_Crnr } } #declare Box00 = box { <0,0,0>,<1,1,0.01> } #declare ObjImg = object { Box00 pigment { Pig_stockholmImage } scale rotate x*45 translate <-Circ/2,-1.7,0> rotate y*-45 } //--- scene --- camera { Camera00 } light_source { Light00 } object { CylinderX } object { CylinderY } object { CylinderZ } object { ObjLeftL } object { ObjLeftR } object { ObjCrnr } object { ObjImg }