// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 // Copyright 2003 by Tor Olav Kristensen // Email: t o r _ o l a v _ k [ a t ] h o t m a i l [ d o t ] c o m // http://home.no/t-o-k // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 // File: MountainIso_FunctionHeightField.pov #version 3.5; #include "MountainIso.inc" default { finish { ambient color rgb <0, 0, 0> diffuse 1 } } // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 #declare MinX = pMin.x; #declare MinY = pMin.x; #declare MinZ = pMin.z; #declare vSize = pMax - pMin; #declare SizeX = vSize.x; #declare SizeY = vSize.y; #declare SizeZ = vSize.z; #declare Ratio = SizeX/SizeZ; #declare WidthRes = 1000; // Increase for better resolution #declare HeightRes = WidthRes/Ratio; #declare NormalizedFn = function { (Fn(SizeX*x + MinX, SizeZ*z + MinZ) - MinY)/SizeY } height_field { function WidthRes, HeightRes { NormalizedFn(x, 0, 1 - y) } // 1-y ?? // smooth scale vSize translate pMin pigment { color rgb <1, 1, 1> } // no_shadow // double_illuminate } // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 light_source { <2, 4, 3>*30 color rgb <0.87, 0.80, 0.60> } light_source { < -1, 4, -2>*40 color rgb <0.27, 0.27, 0.40> shadowless } camera { location <10.0, 10.0, -12.5> look_at <0.0, 1.2, 0.0> angle 60 } background { color rgb <0.3, 0.8, 1.0> } // ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7