POV-Ray : Newsgroups : povray.text.scene-files : Wood floor macro Server Time: 14 Dec 2018 15:31:52 GMT
  Wood floor macro (Message 1 to 1 of 1)  
From: Bald Eagle
Subject: Wood floor macro
Date: 5 Apr 2018 01:30:01
Message: <web.5ac57be22ec21c585cafe28e0@news.povray.org>
So, I did the "rush job" version to get it functional.

There's some bits in the code that can be changed, and then there's the
parameters to be passed in through the macro invocation, with 3 optional
textures to override the defaults.

Please test it out, look over the heinous code, and point out any errors,
improvements, etc.

I hastily cobbled together the following to test it.


#version 3.7;
 global_settings {assumed_gamma 1.0}
 #include "colors.inc"
 #include "rand.inc"
 #include "WoodFloor.inc"

 #declare _Width  = 9*12;
 #declare _Depth = 15;
 #declare _PlankWidth = 4;
 #declare _Unit = 1;

 #declare WholeFloor = camera {
  location  <0, 17*12, (_Depth*12)/2>
  right    x*image_width/image_height
  look_at   <0, 0, (_Depth*12)/2+0.1>
 }

 #declare Back = camera {
  location  <0, 9*12, (_Depth*12)>
  right    x*image_width/image_height
  look_at   <0, 0, (_Depth*12)+0.1>
 }
 camera {WholeFloor}

 light_source { <_Width/2, 20*12, _Depth>  color rgb <1, 1, 1>}

 //#declare _Wood1 = texture {pigment {Red}}
 //#declare _Wood2 = texture {pigment {Green}}
 //#declare _Wood3 = texture {pigment {Blue}}

 BuildWoodFloor (_Width, _Depth, _PlankWidth, _Unit, true, _Wood1, _Wood2,
_Wood3)
 #debug concat ( "Max = ", vstr(3, max_extent(Woodfloor), ", ", 3, 0), " \n")
 object {Woodfloor}


Post a reply to this message


Attachments:
Download 'woodfloor.inc.txt' (14 KB)

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