POV-Ray : Newsgroups : povray.general : Need for new pattern - cubediv? : Re: Need for new pattern - cubediv? Server Time
31 Jul 2024 20:12:49 EDT (-0400)
  Re: Need for new pattern - cubediv?  
From: Slime
Date: 21 Sep 2006 03:43:18
Message: <45124296$1@news.povray.org>
> The slope y texture_map solves the problem if we need just 2 directions,
> like a texture for "up" and "down".

Wouldn't it be possible to do something like this? (Sorry for lack of
tabbing, and this isn't tested code)

#declare uppercutoff = (cos(degrees(45)) + 1) * 0.5;
#declare lowercutoff = 1 - uppercutoff;

#declare ZSlope = texture {
slope {z}
texture_map {
[0.5
// -z texture here
]
[0.5
// +z texture here
]
}
}

#declare YSlope = texture {
slope {y}
texture_map {
[lowercutoff
// -y texture here
]
[lowercutoff XSlope]
[uppercutoff XSlope]
[uppercutoff
// +y texture here
]
}
}

texture{
slope {x}
texture_map {
[lowercutoff
// -x texture here
]
[lowercutoff YSlope]
[uppercutoff YSlope]
[uppercutoff
// +x texture here
]
}
}


 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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