POV-Ray : Newsgroups : povray.text.scene-files : Roof tile - for Robert J Becraft (and anybody else, who wants it) Server Time
23 Dec 2024 07:06:43 EST (-0500)
  Roof tile - for Robert J Becraft (and anybody else, who wants it) (Message 1 to 1 of 1)  
From: Ib Rasmussen
Subject: Roof tile - for Robert J Becraft (and anybody else, who wants it)
Date: 8 May 2001 13:23:16
Message: <3AF82B6F.CF56EA20@ibras.dk>
Hi Robert,

I replied to your mail, but my message bounced, so I try here instead.


> How do you get your tile roofs on your Citadel models?  I'd be very
> interested for some of my modelling.

I cheat a bit. It is not single tiles, but half pipes with a gradient
texture. As long as you don't put the camera too close, it looks
convincing.

Regards,
Ib

/************************* Code start ******************************/

#include "colors.inc"
#include "skies.inc"

#version 3.1;
global_settings { assumed_gamma 2.2 }

#declare R = seed(0);

/************************* Declarations ******************************/

/*--------------------- Camera and Lights ---------------------------*/

#declare CamX = 0;
#declare CamY = 1000;
#declare CamZ = -1600;

#declare TestCam=camera {
   location  <CamX, CamY, CamZ>
   angle 40
   look_at   < 0, 700,  0 >
}


#declare MainLight=light_source { <0, 0, 0>, colour White*1.5}
#declare CamLight=light_source { <0, 0, 0>, colour White*0.5 }

/*-------------------------- Textures -------------------------------*/

#declare TileColour = rgb <0.70, 0.28, 0.17>;

#declare T_RoofTile=texture {
   pigment{ gradient z
      color_map{
         [0.900 color TileColour ]
         [1.001 color rgb <0.06, 0.12, 0.01>]
      }
      scale <1, 1, 36>
   }
}

/*------------------------- Objects ----------------------------------*/

#declare TilePartA=difference {
   cylinder { <0, 7.875, -10>, <0, 7.875, 710>, 11.875 }
   cylinder { <0, 7.875, -15>, <0, 7.875, 760>, 10.875 }
   plane { x, 0 rotate <0, 0, -43.6028> translate <0, 7.875, 0> }
   plane {-x, 0 rotate <0, 0,  43.6028> translate <0, 7.875, 0> }
   texture { T_RoofTile translate <0, 0, -10> }
}

#declare TilePartB=difference {
   cylinder { <-10, -2.625, -10>, <-10, -2.625, 710>, 3.625 }
   cylinder { <-10, -2.625, -15>, <-10, -2.625, 760>, 2.625 }
   plane { x, 0 rotate <0, 0,  43.6028> translate <-10, -2.625, 0> }
   plane {-x, 0 rotate <0, 0, -43.6028> translate <-10, -2.625, 0> }
   texture { T_RoofTile translate <0, 0, -10> }
}

#macro TileRoof(bredde)
union{
   #declare pos = 0;
   #while (pos < bredde)
      object { TilePartA rotate <-50, 0, 0> translate <pos, 527.5219,
      -463.0055> } object { TilePartB rotate <-50, 0, 0> translate <pos,
      527.5219, -463.0055> } #declare pos = pos + 20;
   #end
   object { TilePartB rotate <-50, 0, 0> translate <pos, 527.5219,
   -463.0055> } translate <10, 0, 0>
}
#end

#declare RidgeStone=difference {
   cylinder { <0, 0,  0>, <0, 0, 944>, 10 }
   cylinder { <0, 0, -1>, <0, 0, 945>,  8 }
   plane { y, 0 }
   texture { T_RoofTile scale <1, 1, 1.044444> }
}


/***************************** Scene *********************************/

/*--------------- Camera, Lights and Background ---------------------*/

camera { TestCam }

object { MainLight translate < 5000, 5000, -8000> }
object { CamLight translate <CamX, CamY, CamZ> }

sky_sphere { S_Cloud1 }

/*------------------------- Objects ----------------------------------*/

object { TileRoof(940) translate <-470, 0, 0> }
object { TileRoof(940) translate <-470, 0, 0> rotate <0, 180, 0> }
object { RidgeStone rotate <0, 90, 0> translate <-470, 1070, 0> }

/************************* Code end ***********************************/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.